Repository navigation
feat: subagents, side chats and linked threads open the same way - #39515
Open
juliusmarminge wants to merge 2 commits into
Open
juliusmarminge wants to merge 2 commits into
juliusmarminge wants to merge 2 commits into
Conversation
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosNo All 64 scenario measurements
Baseline: unavailable · PR result: 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. |
juliusmarminge
force-pushed
the
t3code/links/connect-to-interact
branch
from
November 20, 2026 05:36
22ba699 to
eac3dc2
Compare
juliusmarminge
force-pushed
the
t3code/links/unified-side-threads
branch
from
November 20, 2026 05:51
5b86cc2 to
6e11e5d
Compare
juliusmarminge
force-pushed
the
t3code/links/connect-to-interact
branch
from
November 20, 2026 06:34
eac3dc2 to
79192bf
Compare
juliusmarminge
force-pushed
the
t3code/links/unified-side-threads
branch
from
November 20, 2026 06:50
6e11e5d to
97886cb
Compare
juliusmarminge
force-pushed
the
t3code/links/connect-to-interact
branch
from
November 20, 2026 07:07
79192bf to
091cf25
Compare
A plain click on a subagent, a side chat or a linked environment's read-only thread opens it as a tab in the right panel. The modifier, a middle click and the context menu open it on the main screen, and a client setting swaps the two. The side-chat panel surface becomes a general thread surface, shown by one pane with a shared header. A linked thread gets a read-only main-screen route. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nd side chats Where the layout has an inspector, a linked environment's read-only thread now opens in it, with the same header as a subagent or side chat there, and its maximize button gives it the whole screen. Phones keep the existing screen. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
juliusmarminge
force-pushed
the
t3code/links/unified-side-threads
branch
from
November 20, 2026 07:07
97886cb to
b8c5a20
Compare
This branch has not been deployed
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.
Stacked on #39439 (which is stacked on #39406).
Problem
Three kinds of "a thread beside the one you are in" each opened differently and each had its own view. A side chat always opened in the right panel. A subagent always replaced the main screen. A linked environment's read-only thread opened as a third kind of panel tab with its own header, and had no main-screen view at all.
Change
One rule (web and desktop). A plain click, or Enter, on a subagent, a side chat or a linked read-only thread opens it as a tab in the right panel. Cmd-click (Ctrl-click on Windows and Linux), middle-click and Cmd/Ctrl+Enter open it in the main view. The context menu on those rows, cards and chips offers Open in side panel and Open in main view.
A setting. Settings → Chat → Subagents and side chats → Open subagents and side chats in (Side panel, the default, or Main view) picks what the plain click does. Its description names what the modifier does for the current choice ("⌘-click or middle-click opens it in the main view instead", or "…in the side panel instead"). It is a client setting with a reset, and settings search finds it for "side panel", "subagent", "side chat", "linked thread" and "middle click" (asserted in
settingsSearch.test.ts).One surface, one pane. The
side-chatpanel surface becomes a generalthreadsurface (thread:<id>). Whether it is a side chat or a subagent comes from the thread's own lineage, so the surface only names the thread.SideChatPanebecomesSideThreadPane, with one header for every kind: title, what only that kind offers (Add to chat and Delete for a side chat, as onmainsince #38323), Open in main view, Close. The linked thread tab uses the same header. Tabs share title, icon, dedupe, close, reopen-closed-view and the narrow-window sheet.Only the bottom differs. Side chat and a subagent you delegated: the normal composer. A subagent the provider started: the read-only bar it has today. Linked: the read-only bar with Connect to interact.
Main view for all three. Side chats and subagents use the normal thread route. A linked thread gets a new read-only route,
/linked/$viaEnvironmentId/$environmentId/$threadId, built from the same timeline and bar as the tab, with the same failure states. It is deep-linkable, and redirects to the real thread once this client is connected to that environment.Back the other way. Open in main view in the tab header and in the tab's context menu moves the tab to the main view. From the main view of a subagent or side chat, the existing parent link still works.
Mobile. Subagents and side chats already opened in the inspector where the layout has one. A linked read-only thread now does too, with the same inspector header, and Maximize takes it full screen. Phones keep the existing screen. No modifier and no setting on mobile.
One body
#39406 was reworked underneath this PR: a linked thread is now the thread's own stream, reduced by the same reducer and drawn by the same
MessagesTimelineas every other thread (ReadOnlyThreadTimeline). So the section this PR used to have, "Where the linked view shows less", is gone, and so is the code behind it.LinkedThreadno longer adapts a transcript; it is the shared header, the standard timeline and the read-only bar.What this PR does on top so the three bodies match on web:
[data-chat-canvas] .messages-timeline-scroll), which the read-only timeline did not have, so a linked thread's rows ran edge to edge.LinkedThreadnow gives its timeline the same canvas gutters, and its bar, notices, loading and error states sit in the chat's composer lane (chat-composer-lane) with the composer's bottom gap, in the panel and on the main screen. This also replaces the page-only column class the old transcript needed.What still differs, by design: the linked view takes no input (read-only bar with Connect to interact), files, images and published visuals stay on the linked machine, and the rows that need the thread's environment (diffs, fork, revert, approvals, other threads) are absent, as on the guest page.
Not matched exactly: the chat measures its scrollbar and subtracts it from the gutter; the linked view does not, so with classic (non-overlay) scrollbars its gutter is wider by the scrollbar's width. The chat's composer floats over the end of the timeline; the linked bar sits below it.
Decisions where the spec was silent
threadcovers side chats and subagents.linked-threadstays separate because its identity is different (reading environment + environment + thread, with a label and title it carries until the first read). They share the pane header and tab behaviour.side-chatsurfaces, a saved activeside-chat:tab id, and closed-tab history all migrate tothread. Covered by tests.Not done
LinkedThreadFullscreenroute with the same presentation asThreadInspectorFullscreen. It has not been run on a device.The second screenshot is out of date: it shows the old paged transcript. The linked body is now the standard timeline with the chat's gutters. The header and the bar are unchanged. The web run described above was before the rebase; nothing was run in a real client after it.
Scope
Maintainer feature work, requested by Julius.
Verification
vp run check:changedpasses: format, lint, knip, typecheck (42 packages), tests (55 files), React Compiler.vp run i18n:checkpasses. New web strings are translated in all ten locales. Mobile added no strings.packages/client-runtime/src/sideThread.test.ts); surface dedupe, own-thread guard and legacy decoding (rightPanelStore.test.ts,closedViewStore.test.ts); the open helper (lib/sideChatPane.test.ts); the mobile linked opener with and without an inspector (thread-inspector-navigation.test.tsx)./linked/…), timeline subagent card. One added: a provider subagent tab renders the shared header and its read-only bar, and Open in main view moves it. Rerun after the rebase with--project browser:ChatView,RightPanelTabs,MarkdownThreadLink,MessagesTimeline,ThreadRelationshipsControl,GuestPage(117 tests). The read-only context-menu gate has no test of its own: no fixture renders a subagent card on the guest page.Steps to reach each state (for captures)
/side question, or click a row under Side chats in thread details./linked/<via>/<environment>/<thread>.Latest real run
Run for real after the rebase: a local subagent and a linked thread open as two tabs in the same panel, and the linked tab's body is now the same timeline as the subagent's (same prompt pill, "Worked for …" group, gutters), with the read-only bar where the composer would be.
Claude Fable 5.2, Claude Code in T3 Code
🤖 Generated with Claude Code