You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed thread-notes saves discard the edited text when the editor is reopened #935
Priority: P1. Reproduced at commit 6c7a6fbe on 2026-09-05.
Closing thread notes discards the user's edit when persistence fails. The app shows an error, but reopening the editor restores only the old saved note.
Reproduction
Open a thread with notes="Original saved note" in the real App.
Make api.threads.setNotes reject with "Notes save rejected".
Open Thread notes and type "Important unsaved investigation notes".
Click the notes button again to save/close.
The editor closes and the error appears.
Reopen notes: the textarea contains "Original saved note"; the edited text is gone. The host still has only the original.
Confirmed through actual App, ThreadView and useCoder with a rejecting fakeCoder method.
Cause
ThreadView.closeNotes clears the editing state and calls onSetNotes without awaiting success. App.handleSetNotes drops the returned promise; useCoder.setNotes catches the error without returning failure. toggleNotes always initializes the draft from thread.notes, overwriting the failed edit. The outgoing-thread autosave path also uses fire-and-forget delivery.
Acceptance
Preserve failed note edits and provide a retry.
Close/discard only on confirmed save or explicit cancellation.
Keep any failed draft associated with its source thread across navigation.
Test actual App save rejection, reopen and retry; retain the existing successful blur and thread-switch behavior.
Related #194 introduced scratch notes. Separate from #921 composer drafts and #926 queued-prompt edits, which use different state and persistence paths.
Sources: closeNotes, App callback, setNotes.
Runnable audit evidence
Local artifact: docs/issue-drafts/2026-09-05-actions-reproduce.mjs.
Exited 0 with three CONFIRMED assertions against actual app modules. The assertions demonstrate existing defects, not implemented fixes. Artifact currently exists in the audit checkout; the reproduction above stands alone.
Requested disposition: separate Planboard issue, plan:todo.
Failed notes persists now keep the typed draft and expose Retry. closeNotes/thread-switch only discard on confirmed save or Escape; failed drafts stay keyed to the source thread across navigation. App-level tests cover reject/reopen/retry plus the existing blur and thread-switch paths.
Activity
currentbits commentedon Sep 9, 2026
Failed notes persists now keep the typed draft and expose Retry. closeNotes/thread-switch only discard on confirmed save or Escape; failed drafts stay keyed to the source thread across navigation. App-level tests cover reject/reopen/retry plus the existing blur and thread-switch paths.
fix: keep failed thread-notes drafts and retry on save reject (#935) (#…