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
Unsent composer drafts disappear when switching threads in the real App #921
Priority: P1. Reproduced/reviewed at commit 6c7a6fbe on 2026-09-05.
Switching from thread A to B and back silently loses A's unsent prompt.
Reproduction
Open a thread in the app and type a prompt without sending it.
Select another thread in the sidebar.
Return to the first thread.
The composer is empty.
Confirmed by mounting the real App with createFakeCoder and navigating A → B → A. This is not merely a Composer-only test.
Cause
App gates visibleDetail to null while the new selection's detail is fetched. ThreadView's no-detail branch omits Composer, unmounting it. Composer keeps draftsRef, attachmentsByThread and pasteCardsByThread in component-local memory, so the draft map is discarded. Existing test/composer.test.tsx:475 assumes one continuously mounted Composer and misses the real lifecycle. Related to closed #12, but the current symptom is lost drafts rather than drafts leaking between threads.
Acceptance
An unsent prompt survives A → B → A through the real App, including uncached detail loads.
Pending attachments and paste cards remain associated with their source thread.
Switching to another main view and back preserves unsent input too.
Preserve the stale-detail protection: never show A's transcript under B's selection.
Add an App-level regression check; a Composer-only threadId swap is insufficient.
Fixed in 0.24.0 (874e8a4): drafts, attachments and paste cards persist per thread in localStorage (src/composerSession.ts), so they survive thread switches and restarts. Closing in the 2026-10-09 board cleanup (#1532).
Activity
currentbits commentedon Oct 9, 2026
Fixed in 0.24.0 (874e8a4): drafts, attachments and paste cards persist per thread in localStorage (
src/composerSession.ts), so they survive thread switches and restarts. Closing in the 2026-10-09 board cleanup (#1532).