Repository navigation
Reuse one chat page across plain chats, behind a debug switch (851-4336) - #1413
Merged
Merged
Conversation
Work in progress: the page, its identities, the re-point hooks, the per-chat live-rows model and the transcript container's set-aside behaviour. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…d stale focus (851-4336) Co-Authored-By: Claude Fable 5.2 <[email protected]>
…(851-4336) Forget live rows when the last view leaves, clear the composer's undo stack on a chat switch, never mount one workspace in two pages, skip layout for set-aside transcripts, and hold a returning transcript until its live rows arrive. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This was referenced Nov 18, 2026
pondorasti
added a commit
that referenced
this pull request
Nov 19, 2026
The reused chat page shipped behind a debug switch in #1413. Measured on a release build with real chats it costs about the same per switch as a kept-alive page, it makes going back to any visited chat as fast as a warm switch, and it uses the same memory, so it is now on unless workspaceDeck.reusedChatPage is set to false. Co-authored-by: Claude Fable 5.2 <[email protected]>
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-4336 (choose how tabs are presented), under 851-4331.
What this adds
A second way to present chats, off by default, behind the debug default
workspaceDeck.reusedChatPage: instead of keeping five whole pages alive and rebuilding the rest, one page is reused for every plain chat (a workspace that is a single chat pane) and re-pointed at the chat being shown. Anything else (splits, terminals, browser, extra tabs, bots, archived) keeps its own page exactly as today.With the switch off nothing changes for users; that path measures the same as main.
How it works
Workspace.isPlainChat, unit tested). A workspace is never mounted in two pages: a route whose workspace is already mounted reuses that page.ActiveTranscriptProjection(CodevisorUI, unit tested) holds a chat's live rows next to its cached transcript, like the settled rows from Keep a chat's projected rows and composer height with its transcript (851-4335) #1406. Used on macOS in both modes; iOS is unchanged.userSendSignal,transcriptPickSignal,submitRequest) are compared throughChatSignal, so a chat swap is never mistaken for a new signal.Numbers
Debug build, 500-turn chats, main-thread work per switch, same script, fresh launches:
The neighbour step is a few ms slower than a kept-alive flip because hiding and unhiding a transcript makes its hosted rows refresh their environment; that is the next thing to remove before this can become the default.
Known gaps before it can be the default
Tophat (dev app,
TRANSCRIPT_STRESS=1)Switch on:
Switch off:
Checks:
swift testforActiveTranscriptProjectionTests,TranscriptPresentationMountTests,WorkspacePlainChatTests,TranscriptFollowUpActivityTests,TranscriptRestorationTests,PageDeckTests;swift:format:check;swift:lint;build:ios.🤖 Generated with Claude Code