From 99c41ce9422ffd86657cc2c8a38d853b7c34690b Mon Sep 17 00:00:00 2001 From: lucaronin Date: Mon, 23 Feb 2026 14:49:12 +0100 Subject: [PATCH] chore: add .claude-done summary Co-Authored-By: Claude Opus 4.6 --- .claude-done | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/.claude-done b/.claude-done index bfda1c44..0b0ce8fa 100644 --- a/.claude-done +++ b/.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