The code editor document hook was reloading more often than necessary because
`useEffect` depended on the full `file` object (and `projectPath`, which was not
used in the effect body). Save flow also emitted verbose production debug logs
and used a blocking `alert()` for errors.
Changes:
- Refactored `useCodeEditorDocument` to derive stable file primitives:
`fileProjectName`, `filePath`, `fileName`, `fileDiffNewString`,
`fileDiffOldString`.
- Updated `loadFileContent` to use those stable fields while preserving existing
diff-first loading logic (`file.diffInfo`, `new_string`, `old_string`).
- Replaced the effect dependency array with only stable primitive values used by
the effect and removed `projectPath` from dependencies.
- Removed debug `console.log` calls in `handleSave`:
- "Saving file:"
- "Save response:"
- "Save successful:"
- Kept error logging via `console.error` for failure diagnostics.
- Replaced blocking `alert()` on save failure with non-blocking UI feedback:
- Added local `saveError` state in the hook.
- Set `saveError` from `getErrorMessage(error)` in the save catch path.
- Exposed `saveError` to `CodeEditor` and rendered an inline error banner.
- Preserved save lifecycle behavior:
- `setSaving(false)` still runs in `finally`.
- `setSaveSuccess(true)` and 2s timeout reset behavior remain unchanged.