Repository navigation
Handoff: show a handoff's first message as one gray line (#1529) - #1536
Conversation
The handoff's first message now shows one gray, centred line
("Context handed off to a fresh session · Handoff N") instead of the
divider and a page of text; a click opens the full text passed on. The
agent source's write-turn prompt shows nothing. Display only: stored
items keep their text. Uses the existing HO5 element in UserMessageRow,
which now hides all later siblings with CSS.
Announces the seam lines the notes reply and the minimap preview need
(TimelineAssistantRows.tsx, timelineMinimapItems.ts) for the follow-up.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: Claude Opus 5.5 (medium) · read at: 11734c5 blocker: none The machine was full for about 20 minutes, so this browser test was written but not run. The evidence above is from the code: const screen = await renderRow(handoffRow(), /* findActive */ true);
const scopes = [...screen.container.querySelectorAll("[data-thread-find-text]")]
.filter((e) => e.textContent?.includes("Recent conversation"));
const fold = screen.container.querySelector("[data-fork-handoff-line] [hidden]")!;
fold.dispatchEvent(new Event("beforematch"));
// expected { scopes: 1, revealed: true }; the code gives { scopes: 2, revealed: false }minor: the PR body says the hidden panel works "as upstream's folded automation prompts do". It does not yet: upstream's fold also opens itself on Checked and fine:
State question:
Tests: the change extends the existing file with one row per behaviour, and they fail on main. No bloat. 🤖 Generated with Claude Code |
While thread find is open, the handoff row held its text twice: the line's closed panel and upstream's bubble, hidden with CSS. Find counted each match twice and could step to the bubble's copy, which it cannot show, and the panel never opened on a match. The panel now opens on `beforematch` (findRevealRef), like upstream's folded automation prompts, and the fork element marks the scopes of the upstream siblings it hides with upstream's `data-thread-find-ignore`, kept on across re-renders by a MutationObserver on the row. The write turn's prompt gets the same opt-out, so its hidden text is not found either. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fix round r1 (head 6715a02), answering the code lens.
State question: the mark is re-applied on every mutation under the row and removed with the elements; a remount starts fresh and is marked again before find reads it (layout effect). Old or plain messages render no fork element, so nothing is marked. 🤖 Generated with Claude Code |
|
lens: code · reviewer: Gemini 4 Neon (high) · read at: 6715a02 blocker: none round 1, fixed: thread find now gets one scope per handoff row and opens the panel on minor: Checked on the fix (
State question:
|
Part of #1529.
What changes
agentandcommand): both send the same first message.agentsource's write-turn prompt shows nothing. It is known by its server id (handoff-write:<thread>:<run>with its marks) and the line asking for the[T3 handoff notes]marker; a typed look-alike keeps upstream's look.t3_thread_read, the handoff itself and exports read everything. While thread find is open, the closed text stays mounted (hidden) so find still reads it, and a match in it opens it (beforematchvia upstream'sfindRevealRef), as upstream's folded automation prompts do. It is the row's only find copy: the fork element marks the upstream siblings it hides with CSS (the bubble) with upstream'sdata-thread-find-ignore, so each match counts once and find never steps to text it cannot show. The write prompt's hidden bubble gets the same opt-out.UserMessageRownow hides all later siblings with CSS (upstream's "New session" divider, a model-switch line and the bubble), and the line is upstream'sTimelineSystemDividerwith its action button (the same component upstream uses for "New session" and its other system lines). The seam'swhyin.github/fork-seams.jsonis updated.State question: where does the open/closed state live?
In the row's own React state only: it is not stored, not synced and starts closed on every load. Nothing on the server or in settings changes; no new setting (the line shows wherever handoff messages exist).
What is left for #1529 (needs a follow-up PR)
[T3 handoff notes]message) still shows as a normal message. Hiding it needs new lines in an upstream file (TimelineAssistantRows.tsx), and a seam line must be announced in one PR before another adds it (docs/fork/updates.md, "Adding a seam line"). This PR announces them: one element first inAssistantTimelineRowand one inAssistantMetaTimelineRowthat hide their later siblings. Plan for the follow-up: the notes reply shows as one gray line that opens its text, or nothing once its handoff's first message is in the thread (one line in total).timelineMinimapItems.tsthat relabels the handoff's item and drops the write turn's.Tests
apps/web/src/components/fork/handoff/handoffDivider.browser.test.tsx(extended, not added): the first message shows exactly one visible line and opens/closes its full text; the write prompt (also with:fallbackand:fallback:loud) shows nothing; a typed write prompt joins the existing table of look-alikes that keep upstream's look; with find open, a handoff has exactly one find match andbeforematchopens it, and the write prompt has none. 8 pass locally (these fail on main: main shows "Handoff N" plus the bubble).vp run check:changed: format, lint, knip, typecheck, tests pass.🤖 Generated with Claude Code