Repository navigation
Keep the composer's state with its chat (851-4335) - #1415
Merged
Merged
Conversation
The composer card held its caret, slash-menu state, prompt-history position and "sending" guard as view state, and its undo history in the window's shared undo manager. On the reused chat page that state had to be reset by hand on every chat switch, and a submission that finished after a switch cleared the guard of whichever chat was showing. ComposerViewState (CodevisorUI) now holds this per chat: - The "sending" guard and the question being answered belong to the chat that started them, so a late finish cannot unblock another chat or a newer question. - The caret is remembered with the draft it was placed in; for any other draft it goes to the end. - Undo history is kept per chat and per editor, dropped when the draft is changed from outside the editor, so undo never replays one chat's edits into another or into a draft that was replaced. - A chat switch closes an open file or photo picker instead of attaching the picked files to the chat that is now showing. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of 851-4335 (tab state in models), under 851-4331. Closes the composer gaps listed in #1413.
What changed
The composer card held its caret, slash-menu state, prompt-history position and "sending" guard as view state, and its undo history lived in the window's shared undo manager. On the reused chat page that state was reset by hand on each chat switch.
ComposerViewState(CodevisorUI, unit tested) now holds it per chat, looked up from the chat's controller the same waySessionAttachmentImagesis:slashToken,editingQueuedPromptID) are compared throughChatSignal, so a chat swap is not mistaken for an edit.Behaviour changes in the default mode
Small, and both improvements:
Tophat (dev app,
TRANSCRIPT_STRESS=1), reused page on and offChecks:
swift testforComposerViewStateTests,ComposerPromptHistoryTests,TranscriptPresentationMountTests;swift:format:check;swift:lint;build:ios.🤖 Generated with Claude Code