store composer drafts in session storage until sent - #125
store composer drafts in session storage until sent#125maxwellpeterson wants to merge 3 commits into
Conversation
Review: store composer drafts in local storage until sentI read all 8 changed files, ran the affected tests ( 1. Title/body say "local storage" but the code uses
|
|
Review posted to PR #125. SummaryI reviewed all 8 changed files, ran the affected tests (14 pass), Findings I raised:
Verified correct: effect ordering vs. The only requested change is #1; #2 and #3 are documentation improvements. |
ndisidore
left a comment
There was a problem hiding this comment.
Are you sure you don't want localStorage? Session storage goes away when the tab is closed; we did localstorage in CFOSv1 so that you could recover from that.
Possibly overkill: I like the session storage api much more
|
Re @ndisidore's question about I want to keep
So this is deliberate rather than an oversight. If we later decide cross-session draft recovery is worth it, I'd rather do it as a follow-up that also thinks through the capability-URL lifetime (e.g. TTL/expiry, or not persisting capsule URLs at rest at all) rather than widen the storage now. On the title/body wording (@ask-bonk's requested change #1): both the PR title and body now say "session storage" to match the implementation. The comment asks from @ask-bonk (#2 the capsule-URL tradeoff, #3 the mount-effect vs key-change-effect restore path) are addressed in the "address bonk comments" commit — see the note at |
|
Posted a response to PR #125 addressing the outstanding review feedback. SummaryThe PR is code-complete and well-tested; the last commit ("address bonk comments") already handled
I also noted that No code changes were required — the implementation already reflects the recommended decision. |
This PR stores prompt drafts in session storage until they are sent to the agent. This means page refreshes don't wipe composer state, which helps mitigate workspace and conversation creation failures. Prompts typed into the new workspace, new conversation, and existing conversation composers are all covered. Capsules are serialized to their corresponding resource URL for storage, and format specifiers (docs, slides, etc.) are fully preserved.