chore: add .claude-done summary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
22
.claude-done
22
.claude-done
@@ -1,19 +1,3 @@
|
||||
## editor-save-bug — Done
|
||||
|
||||
### What was changed
|
||||
1. **Removed broken auto-save**: Deleted `useAutoSave` hook (debounced save) which was causing the editor to reload previous content on every keystroke.
|
||||
2. **Added explicit Cmd+S save**: New `useSaveNote` + `useEditorSave` hooks. Editor onChange buffers content in a ref; Cmd+S persists to disk. Shows "Saved" toast on success, "Nothing to save" when clean.
|
||||
3. **Fixed rename-before-save**: `handleRenameTab` now calls `savePendingForPath(path)` before executing the rename, ensuring the file on disk is up to date. No more "Failed to rename note" error.
|
||||
|
||||
### Architecture decisions
|
||||
- **No auto-save by design**: Consistent with git-based UX. User explicitly saves with Cmd+S, then commits when ready.
|
||||
- **Pending content tracked via ref** (not state): Avoids unnecessary re-renders on every keystroke. The ref holds `{ path, content }` set by Editor onChange, read by handleSave.
|
||||
- **useEditorSave extracted from App**: Reduces App component cyclomatic complexity (CodeScene quality gate passed).
|
||||
|
||||
### Tests
|
||||
- 471 unit tests passing (was 466 before)
|
||||
- New: `useSaveNote.test.ts` (3 tests), `useEditorSave.test.ts` (5 tests)
|
||||
- Updated: `App.test.tsx` (Cmd+S now shows "Nothing to save" when no pending content)
|
||||
- E2E: 2 tests passing (editor loads + Cmd+S shortcut works)
|
||||
- Coverage: 78.82% (above 70% threshold)
|
||||
- CodeScene quality gates: passed
|
||||
Task: vault-picker-local
|
||||
Summary: Added local vault creation options to vault picker
|
||||
Commits: 5
|
||||
|
||||
Reference in New Issue
Block a user