Skip to content

fix(native): transcript review fixes, history control, output on expand - #22

Merged
rynfar merged 4 commits into
nativefrom
nw/w1-followup
Nov 2, 2026
Merged

rynfar merged 4 commits into
nativefrom
nw/w1-followup

Conversation

@rynfar

@rynfar rynfar commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Problem

The Sol 6.1 review of #17 found four logic bugs, an accessibility gap and four performance risks in the transcript. Three pieces of follow-up work were also still open: the history control, bounded markdown states and command output on expand.

Fixes

Each logic fix started with a failing test ported from the TS test the review cited.

  1. [P1] Running provider-native subagents collapsed. derive_activity now follows deriveRunlessWorkStartedAt: a provider-native subagent thread with an active runless root turn is working, and runless entries form the live response (runIdIsActiveResponse, the active-tool tail, the live runless fold guard). Port of "folds each run of a provider-native subagent thread like a normal turn": running yields […, user:resume, working, work-live].
  2. [P1] Completed replies vanished after a steer. complete_superseded_reply_ids ports completeSupersededReplyEntryIds. Attempts now carry completedAt, and a reply finished before its attempt was superseded is exempt from both folds. Port of "a steer that supersedes an attempt" (both run states, plus the cut-off case).
  3. [P2] /compact grew extra Working/Thinking rows. New compaction.rs ports the compaction bookkeeping: the appendWorkingRow guards, compactionOnlyRunFinished, compact-on-return using the Working row, IDLE_COMPACTING_LABELS / IDLE_COMPACTION_TITLES. Port of "shows each compaction trigger as one live status" (all three reasons, running and finishing).
  4. [P2] Thinking persisted after the provider turn ended. LatestRun.turn_ended comes from the run's active attempt's latest provider turn (summarizeThreadRun), and the Thinking row honours it. Port of "does not show Thinking once the open run's provider turn has ended", plus an activity-level test.
  5. [P2] Click-only controls. Copy, code-block Copy, Show full message, Expand plan, work-row disclosure, group headers, live and Thinking rows, folds, subagent rows, fork and Open chat are now tab stops (tab_index) with the 2px ring on keyboard focus (§4.2). GPUI delivers Enter and Space as a click.
  6. [P1] Expanded groups built every member. An open group renders its members in its own list (Infer sizing, capped at min(288, 50% of window) plus room for opened members; 384 for a reasoning trace), so only rows in view are built. A group of thoughts creates markdown states only for the thoughts on screen.
  7. [P2] Streaming cloned every row twice. Rows are Arc<TimelineRow> and keep their identity across derives (computeStableMessagesTimelineRows). A streamed token swaps only the changed row in place, and the view diffs by pointer. Entries patch items changed in place without rebuilding the map (canRederiveInPlace), and plan entries stay cached until their status changes. Measured on real data: warm derive per update is 6.6 µs for 221 items.
  8. [P2] Entry cache ignored nodes. A new node re-resolves cached entries whose attempt was unresolved (a node's root and parent never change). Test included.
  9. [P2] The timer repainted the whole view. WorkingTimer is its own view. It ticks itself and notifies only if it was painted since the last tick, so it stops while scrolled out of the list's render window or while the window is hidden. The ThreadView ticker is gone.
  10. History UI. Item 0 of the list is the web's TimelineHistoryControl: "Load earlier turns" between hairlines, "Loading earlier turns…" while loading, and the error line. Clicking again retries through AppState::load_older_history. It updates on AppEvent::History without touching rows. Prepended rows splice below the control; GPUI's splice keeps the logical scroll top. I removed the scroll-position auto-load, because the web only loads on the explicit control.
  11. Markdown states are still created only when a row renders. Past 48 states, any not drawn in the last two frames are dropped and rebuilt if scrolled back to.
  12. Output on expand. Opening a command or tool with outputOmitted calls orchestration.getTurnItem through the merged ClientHandle::request / AppState::rpc. It fetches once while the item runs (revision: "live") and again when it settles. States: Loading output…, Couldn't load output, Output is no longer available, No output. Claude's {stdout,stderr} envelope is unwrapped. Cached per item, bounded at 64.

Wire fields added with serde(default): AppThread.creationSource, Run.activeAttemptId, RunAttempt.completedAt. The conformance harness passes.

Verification

  • cargo test -p t3-core -p t3-client: 82 core tests, including the new ports and a test that a streamed token replaces only its own row. Workspace clippy with -D warnings, gen-theme --check and parity/sync.test.ts pass.
  • timeline_sweep against the real-data server (read-only, counts only): 59 threads, 4,439 visible items in bounded snapshots, 1,133 rows, 0 empty labels. Warm derive is 6.6 µs.
  • Runtime, with a throwaway local flag that opened every fold, group and entry (not committed):
    • smoke showcase thread: 16 rows, 4 withheld outputs fetched and loaded.
    • largest real thread (read-only): 184 rows, nested group lists rendered, 112 command outputs loaded via getTurnItem.
    • no panics or warnings in either.
  • No screenshots: Screen Recording permission isn't available to me.

Known gaps

…e cases

Provider-native subagent threads now work through their runless root turn, so a running child keeps its working and live rows instead of folding. A reply that finished before a steer superseded its attempt stays visible (attempts carry completedAt). A /compact turn shows one live status with no extra Working or Thinking rows, with T3 Code's idle compaction labels and titles. Thinking stops once the open run's provider turn has ended. Cached entries re-resolve their attempt when a new node arrives. Each fix has a failing test ported from MessagesTimeline.logic.test.ts first.
Rows are shared Arcs that keep their identity across derives (computeStableMessagesTimelineRows); a streamed token swaps the one row that changed instead of cloning every row, and entries patch changed items in place without rebuilding their map. Plans stay cached until their status changes. Adds the getTurnItem request and decode helpers for withheld output.
The transcript shows the web's Load earlier turns control with its loading label and error line (clicking again retries); rows prepend below it with the scroll anchored. Open work groups render their members in their own virtualized list, so a group of a thousand tools builds only the rows in view. Opening a command or tool with withheld output fetches it with orchestration.getTurnItem, once while it runs and again when it settles, with loading, missing and error states. Copy, disclosure, fold and link controls are keyboard tab stops with a focus ring. The working timer is its own view that ticks only while painted, and markdown states for rows the list no longer draws are dropped past a small bound.
@rynfar
rynfar merged commit eee12d7 into native Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant