Repository navigation
Handoff: fold request, notes, and handoff into one gray line with tokens (#1529) - #1565
Conversation
|
lens: code · reviewer: GPT-6.2 Sol (high) · read at: c0a5c36 State question answered: Open state is local and reset on remount. A confirmed orphan write turn with marked notes gets a closed, revealable notes panel. Before any notes arrive, the request has no accessible panel. Once the handoff arrives, the companions move to its panel and the server still selects their old Find IDs. A retry reuses the body with a distinct ID. Old or partial user rows fall back to the normal timeline when the signature is missing, and empty or whitespace-only text has no token label. Confirmed non-write replies and typed look-alikes with ordinary message IDs stay visible. The minimap uses the same compact label and drops the write turn. Both announced seams match the added source lines. Findings are from the pinned source and fixture review. |
|
Round-1 review fixes pushed at
|
|
lens: code · reviewer: GPT-6.2 Sol (high) · read at: af2d685 round 1, fixed: Relocated sections keep the original request and notes IDs. With the owning fold mounted, the highlighter opens it and selects the requested text. State question answered. A failed handoff can retry with the full stored body. The timeline collapses it, while the Find RPC still returns both IDs. A confirmed orphan write turn with marked notes can open its own fold before the handoff arrives. While only the request exists, it stays hidden without a fold. A remount resets the fold. Partial history without a confirmed write turn preserves ordinary replies and their meta bars. Old rows missing the fresh-message signature retain upstream rendering, and an empty token estimate emits no count. Both source additions match the announced seams. Two capacity-gated source-level checks reproduced selection of the retry ID and list navigation to the old companion index when no range is mounted. |
|
Fix round 2 pushed at
Verified locally: failing-first repro on both offscreen tests, then 16/16 passing ( |
Fixes #1529. Follow-up to #1536.
What changes
handoff-write:<thread>:<run>, "Sent by T3 Code") stays hidden with no bubble.[T3 handoff notes]assistant reply (and itsAssistantMetaTimelineRowaction/timestamp bar) is hidden once the handoff's first message is in the thread, or shown as a single collapsibleHandoff notesgray line before the handoff message arrives. Non-write-turn assistant replies starting with[T3 handoff notes]keep upstream's look.ChevronDownIcon), closed by default. Clicking folds out the hidden items (handoff request,[T3 handoff notes]reply, and the handoff message with itsHandoff Nheader inside) and clicking again folds them back.Handoff Ncounter from the collapsed line (Context handed off).Context handed off · ~4.20K tokens, using upstream's ~4 UTF-8 bytes/token estimate and@t3tools/shared/usageFormat'sformatTokens; omitted when 0/unavailable).data-thread-find-ignore(cleaned up on unmount) so thread find counts each hidden item once inside the singlefindRevealRefpanel and opens the fold onbeforematch. When a handoff is retried (:retry1), only the first handoff message for that source run attaches the request and notes reply so find never duplicates them.timelineMinimapItems.tsdrops the write turn (prompt + notes reply) and shows the shortContext handed off · ~... tokenslabel instead of the raw handoff text.t3_thread_read, handoffs, exports unchanged).TimelineAssistantRows.tsxandtimelineMinimapItems.tsfromannouncedtoaddedin.github/fork-seams.json.docs/fork/handoff.md.State question: where does the open/closed state live?
In each row's own React state only (
useState(false)): not persisted, not synced, and starts closed on every load. Thread companion lookup reads from the existing quiet thread projection atom (and falls back cleanly when absent or partial).Verification
vp test run apps/web/src/components/fork/handoff/handoffDivider.browser.test.tsx apps/web/src/components/chat/timelineMinimapItems.test.ts: 18/18 passed (11 browser tests in Chromium + 7 minimap unit tests).vp fmt&vp linton all changed files: 0 warnings, 0 errors.vp run @t3tools/web#typecheck: passed.fork-schema-check,fork-upstream-files-check,fork-seam-check --config-ref origin/main,fork-test-names-check) + 201 fork-checks self-tests + 33fork-changes-listtests: all passed.