Repository navigation
feat(fork): open hand-started threads in a chosen display mode - #156
Merged
Merged
Conversation
A user who always works in one display mode, such as Chat + Replies, had to switch every new thread by hand. Settings -> Threads -> New threads -> Display mode now sets the mode for threads the user starts in the web or desktop app. The client launchThread RPC copies that mode into the thread's entry before the thread is created, so the agent gets the mode's note with the first message. MCP, scheduled tasks, server and mobile launches do not go through this step and stay Normal. A failed launch removes the entry it wrote. Changing the setting leaves existing threads as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
1 task
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.
This pull request adds a Settings choice for the display mode of new threads that you start by hand.
改了什么行为
Behaviour change: yes, a user who picks a mode in Settings → Threads → New threads → Display mode sees the threads they start from the message box in the web or desktop app open in that mode; threads that agents, MCP, scheduled tasks, the server, side chats or the mobile app start keep opening in Normal.
Why
A user who always works in one mode, such as Chat + Replies, had to switch each new thread by hand.
Checks
A server test table covers each kind of launch, a thread that already exists, a failed lookup and a failed launch. The repo's checks for changed files pass. In the web app, a thread sent from the message box opened in Chat + Replies and its first message carried the note. A thread from
t3 thread startstayed Normal. The Settings row was checked at desktop and phone width.How to undo
Revert the commit. The saved setting is then ignored, and threads keep the modes they have.
Design notes
launchThreadRPC. Scheduled tasks and session imports also carry thewebsource, but they reachThreadLaunchServiceanother way, so the RPC is the one place that tells a hand start.forClientLaunchin the new fork fileNewThreadDisplayMode.tswraps the intake call there. It acts only when the request namescreationSource: "web", has a thread id and does not reuse a thread, so scripts that omit the source stay Normal.threadDisplayModes[threadId]. The existing wrapper reads that entry when the run starts, so the first message gets the mode's note. It writes nothing when the entry already matches or the thread exists. A failed save logs a warning and the thread starts in Normal, because a display choice must not block work. A failed launch removes the entry it wrote when no thread exists.packages/contracts/src/settings.ts+5,apps/server/src/ws.ts+2 −1,ProjectDefaultsSettings.tsx+2,settingsSearch.ts+8. The README's display mode list gains one line.