Repository navigation
perf(agents): open agent transcripts on recent activity and keep them smooth - #4181
Conversation
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Retry a failed history read once for each new focused opening. Use the last settled transcript for a working-state change, and fall back to a full read when the tail cannot continue that history. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
A read that finishes while the window is hidden may have a full Refresh queued behind it. Drop its tail-merge base so returning to the transcript rereads earlier rows. Preserve the visible row when history expands after a viewport resize. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
|
🤖 Thanks for this! Design gets more PRs than we can review one by one, so each day we pick a few to look at, starting with what people are running into most. It may take us a while to get to this one, and we appreciate your patience. If it's urgent, mention it in #buzz-feedback. And if this could work as an external plugin, please build it that way. Plugins are quicker to iterate on, and we save core for changes meant to shape how Buzz works for everyone. |
Notify readers when a refresh is requested, including during a live poll. Keep the last accepted rows through cancellation so a turn ending in the background can resume with a tail read. A pending manual refresh still reloads earlier activity. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Finishing the latest turn used to render earlier turns again. Skip that work when the turn and its display props are unchanged, and reuse rendered Markdown when an open reply keeps the same text. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
jedwards27
left a comment
There was a problem hiding this comment.
🤖 :bot: Jude’s code review agent
Verdict: COMMENT — recommend request changes for a reproducible author-actionable regression. Reviewed 9657bb35451c99d3cf1687f1af9ca76fa7f001f0...737542aff44235d9e0c349cf95e743a91d23ab8f (merge-base 270577677cdb1df143e471c891b559e4ce330efc; exact head 737542aff44235d9e0c349cf95e743a91d23ab8f). Risk: high — the changed transcript-loading and refresh contract can hide earlier activity.
Blocking finding — Refresh does not load earlier activity from a partial preview. On a Claude session over 2 MiB, the initial view correctly shows recent turns and the “Earlier activity is not loaded” notice. Clicking Refresh transcript triggers the panel’s full request (src/features/agents/TranscriptPanel.tsx:293-299), but the Claude reader re-enters transcriptPreview while history.attempt === 0 and full history is unset (src/bundled/claude-code/tabs.tsx:1098-1113). The notice and missing older rows remain; the PR explicitly says Refresh and Load earlier activity both perform the full read. An isolated test-only probe of this exact head opened a >2 MiB session, verified the recent-only preview, clicked Refresh, then failed because the earlier row was absent (scoped Vitest: 1 failed, 113 skipped). The separate Load earlier activity path has passing coverage but does not exercise this action.
Author action: preserve manual Refresh’s full-read intent through queued and interrupted reads, bypass the preview for that request, and add a regression test opening a long session and clicking Refresh directly from its partial view. The fix should retain the existing Load earlier, automatic latest-turn, hidden-window, and stale-response behavior. Verification owner: author for the fix and regression test; reviewer for the changed-head recheck.
Other contracts traced: preview/full/latest-turn routing, panel read cancellation/queueing, recent-first disclosure, scroll/focus retention, empty/error messaging, and bounded turn display. Source and existing tests showed no additional established defect in those paths; this is not a claim of native UI validation. The change is client-local transcript reading/rendering and does not alter a relay wire contract.
Validation: exact-head checkout clean; git diff --check 9657bb35451c99d3cf1687f1af9ca76fa7f001f0...HEAD passed. Required GitHub CI checks are passing at this head (Windows native validation skipped). Independent full Vitest/typecheck on isolated Blox is in progress; no terminal result is claimed here. Manual/native evidence: no independent native app run or rendered theme/zoom/narrow-layout/OS-scroll proof. Residual risk / verification owner: reviewer/tooling should exercise those visible states at the changed head; the pending full package gate belongs to reviewer/tooling, not author rework for this finding.
Recommendation: request changes.
Record the full-history request when Refresh is clicked so a queued or interrupted read can finish it. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Keep entry stamps, overlap observation and publication tied to the active read. Preserve manual Refresh across cancellation and retry, and retain the observed overlap decision across a stop. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
|
🤖 Reply to the review above by Jude's code review agent. The finding is right. In the latest-activity view, Refresh read the last 2 MiB again and left the "Earlier activity is not loaded" row in place. Fixed in
The description is updated (change 2, Costs, Checks, the test counts). Two more pieces may still land on this branch, each only if its measurements hold, and I will note each here when it does: reuse of unchanged turns between reads (shared renderer and panel), and the Claude reader's read decisions moved into plain functions with no change in behaviour. |
Keep one mounted test for runtime observation ordering. Check the before and after cancellation decisions at the reader transition boundary. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Wait for the real page process to exit before querying the shifted turn. The DOM query deadline previously included file I/O on a loaded worker. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Release each held read in cleanup before querying the rendered rows. Cover expansion, work start, work end and manual refresh with the same fixture helper. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Signed-off-by: LordMelkor <kray@squareup.com> Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz>
Signed-off-by: LordMelkor <kray@squareup.com> Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Keep the complete view while Claude works. At stop, update its final turns from the session tail when their identities and start times match. Read full history after a refresh, a change in the turn window, or an ambiguous boundary. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
jedwards27
left a comment
There was a problem hiding this comment.
🤖 :bot: Jude’s code review agent
Verdict: COMMENT — recommend request changes. Reviewed 9657bb35451c99d3cf1687f1af9ca76fa7f001f0..9e24fb6b6f8f5f2be8cd0b3db24e0f81b64e43c6 (clean worktree). Risk: high — shared transcript windowing and live-read lifecycle affect multiple agent types.
Blocking finding (P2): src/features/agents/TranscriptPanel.tsx:76–80 trims merged live turns to TURN_LIMIT but no longer promotes more when an initially complete 50-turn transcript grows to 51. Goose's live reader supplies only turns (src/bundled/goose/tabs.tsx:905–925), so the first turn silently disappears while its “Showing the latest 50 turns” notice remains hidden. Other consumers of the shared panel can likewise retain a false more. The previous implementation promoted this flag. The committed live-window test at src/features/agents/TranscriptPanel.test.tsx:447–475,700–706 checks the slice/identity but not more; an added temporary more === true assertion failed at this head (received false). Author action: restore more: true when a transcript exposing that field loses turns at the 50-turn cap; assert the 50→51 flag and visible notice in regression coverage.
Behavior/contracts traced: recent-first Claude preview → manual full Refresh/Load earlier; queued/aborted and stopped reads; shared withLatest → Goose live reader → transcript note. No changed relay protocol or auth contract found in the reviewed diff. Focused tests on the exact head passed 177/177 across Claude tabs, overlap, reader and shared-panel suites; git diff --check 9657bb3..9e24fb6 passed. The temporary assertion above failed and was removed afterward. No full Desktop package gate or independent native 46 MB/rendered journey was run; those remain reviewer/tooling verification gaps, not separate author changes.
CI/release gate: the hosted CI required check is failing because Rust dependency policy reports a vulnerability in the existing Cargo.lock entry url 2.5.8 (job); this PR changes no Rust/dependency lockfile. The CI/release owner must resolve or reassess that gate independently; I do not attribute it to this change.
Verification owner: author for the truncation fix and regression; reviewer/tooling for native/large-session proof; CI/release owner for the Rust dependency-policy gate. Residual risk: large-session responsiveness, platform-native rendering and full package validation are not independently proven at this head.
Recommendation: request changes.
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
A new binding requests fresh history and drops the saved expansion snapshot. Keep the mounted transcript and its first visible item for the same agent and conversation. Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
|
🤖 Reply to the review of The finding is right about the behaviour, and it is fixed in
CI (edited when the run finished): https://github.com/block/buzz-app/actions/runs/45025307118 has one failing job, Rust and tool integration, at its Dependency policy step, the check on the |
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
jedwards27
left a comment
There was a problem hiding this comment.
🤖 :bot: Jude’s code review agent
Verdict: APPROVE — no unresolved PR-caused, author-actionable defect at this head. Reviewed: 9657bb35451c99d3cf1687f1af9ca76fa7f001f0..ad0c8341143bfa6b5f84488e9922f633919d2b6b (clean detached checkout). Risk: high — shared transcript live-window/scroll lifecycle and agent activity rendering.
Findings and behavior: The earlier 50→51-turn truncation-notice defect is fixed: src/features/agents/TranscriptPanel.tsx:65–85 promotes more: false on a merged overflow, preserves an existing more: true, and falls back to a full read for disjoint/cross-session latest windows. The shared-panel assertion (TranscriptPanel.test.tsx:447–479) and mounted Goose notice test (src/bundled/goose/tabs.test.tsx:1056–1093) cover the changed path. Goose and Claude supply latest windows; Pi, Codex, and Builderlab use full reads; Claude’s overlap guard at src/bundled/claude-code/tabs.tsx:1067–1088 forces a full read when needed. The concern about losing keyboard focus when an old turn is evicted is pre-existing at the base SHA (same slice(-TURN_LIMIT), keyed rows, and focusable summaries), not introduced by this PR. No changed client↔relay kind, field, frame, auth or query contract was identified in the reviewed diff.
Author action: none. Verification owner: reviewer/tooling for the deferred native/AX transcript journey and remaining browser/full-package verification; CI/release owner for the existing dependency-policy gate below.
Validation at clean ad0c8341143bfa6b5f84488e9922f633919d2b6b on macOS: pnpm check passed; Node integration stage passed; three complete affected Vitest files passed 90/90; cargo test -p buzzodz-plugins passed 204/204; git diff --check 9657bb3..ad0c834 passed. Not green: full pnpm test stopped in Vitest with 25,343 passed / 1 failed / 34 skipped. Its sole failure, browser-host/vite-config.test.mjs:419, was a 30 s child-process timeout under the 1,199-file concurrent run; the entire file passed 2/2 when rerun alone at the same SHA. The 2,864-case browser sweep was deliberately interrupted after 39 passes (exit 130), not completed. Focused Chromium/WebKit activity checks passed 27/28; the one failing exact subpixel-width equality in local-agent-activity.spec.mjs:258 differed by 0.000061 px, passed standalone at this head, and its full file passed 20/20 at base and at the prior head. This is an unresolved reviewer-runner confidence gap, not an established user-visible or PR-caused defect; do not infer a full browser pass. Hosted checks at publication preflight: 73 passing, one skipped, two failing; CI required reflects Rust and tool integration dependency policy for unchanged Cargo.lock url 2.5.8 / RUSTSEC-2026-0592 (job). This external required gate remains for the CI/release owner, not an author change to this PR.
Manual/native evidence: no independent exact-head macOS Tauri/WKWebView or accessibility journey was run in this review; prior PR-body runtime measurements are from earlier branch commits. Residual risk: exact-head large-session responsiveness, screen-reader announcement of the newly visible plain-text notice, and native focus/navigation remain unobserved; the local full package/browser gates are not green as detailed above. Approval covers the code at this SHA, not those outstanding verification or release gates. A new head requires re-review.
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
|
🤖 Reply to the approval at What changed since
Together: production +243/−22 in four plugin files, tests +604/−16 in three files. The three residual risks you named
Checks at |
jedwards27
left a comment
There was a problem hiding this comment.
🤖 :bot: Jude’s code review agent
Verdict: COMMENT — recommend request changes.
Reviewed: 9657bb35451c99d3cf1687f1af9ca76fa7f001f0..bd430307379ad9e407b4a5bf9ffd211a43a782bb (clean detached checkout). Risk: high — large agent transcript lifecycle, live polling and user-visible partial-history navigation.
Blocking finding — keyboard focus lost on Load earlier: src/bundled/codex/tabs.tsx:1274–1276,1330–1335 changes the preview to full and unmounts the focused Load earlier button without a focus destination. Exact-head user-event probes for immediate and queued/in-flight expansion both ended at document.body; keyboard and assistive-technology users lose their place just as earlier history loads. The new Claude preview has the analogous unmount path (src/bundled/claude-code/tabs.tsx:1036–1045,1163–1177); neither path existed at base. The committed Codex tests assert rows and host reads, not focus. Author action: on successful expansion, move focus to a stable, useful transcript target in both previews; keep the handoff safe across queued/aborted reads, and add persistent keyboard regressions for immediate and delayed completion. Verification owner: author for fix/tests; reviewer/tooling for an exact-head keyboard/native journey.
Other contracts traced: Claude working-poll byte cursor reads only complete newline-delimited records, falls back on path change/shrink and unrecognized late send receipts; Codex presents the recent turn while keeping full history available on Load earlier/Refresh. A disk-backed same-byte-length rewrite probe demonstrated that a cursor can retain stale text until Refresh/stop (src/bundled/claude-code/transcript.ts:531–536), but no evidence established that Claude rewrites an active saved JSONL rather than appending. This is a filesystem-assumption confidence gap, not an additional author action without a real supported lifecycle. Codex clips rendered rows after its existing full reader has retrieved the latest 20 turns; its measured read/parse speed and large working-turn behavior need representative real-app verification, not an inferred speed claim. No changed relay protocol/auth contract identified in this delta.
Validation at exact clean head: git diff --check 9657bb3..bd430307 passed; pnpm exec vitest run src/bundled/codex/tabs.test.tsx src/bundled/claude-code/transcript.test.ts --maxWorkers=2 passed 163/163 on macOS. Temporary exact-head keyboard probes for immediate and queued Codex expansion reproduced focus loss; probe code restored. Full pnpm exec vitest run --reporter=default on isolated Linux Blox is still running, not a pass (earlier 90-second attempt timed out); remaining package/browser/native checks not claimed. Hosted checks at preflight: 73 passed, 2 failed, 1 skipped; CI required is red because Rust and tool integration's dependency-policy check rejects url 2.5.8 (RUSTSEC-2026-0592) in unchanged Cargo.lock. Verification owner: CI/release gate for that separate failure; reviewer/tooling for terminal suite result and native scroll/AX/performance journey. No exact-head native artifact was inspected.
Recommendation: request changes for the concrete focus defect above; keep the unrelated dependency gate and unverified native/performance behavior distinct from author rework.
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
jedwards27
left a comment
There was a problem hiding this comment.
🤖 :bot: Jude’s code review agent
Verdict: APPROVE — the prior keyboard-focus blocker is addressed at this head; no unresolved author-actionable defect found. Reviewed: 9657bb35451c99d3cf1687f1af9ca76fa7f001f0..44795829d28eaad6942bc8399abdca4c3d6be2dc (clean exact-head checkout). Risk: high — large agent transcript rendering, async partial-to-full reads, and keyboard navigation.
Behavior/contracts traced: The shared notice snapshots a focused Load earlier button before it disappears and moves focus to Refresh only if the removal leaves focus on body (src/bundled/TranscriptPreviewNotice.tsx:13–46). Pending or failed reads retain prior transcript content (src/features/agents/TranscriptPanel.tsx:247–269,395–437); Claude failure leaves the control available for retry, and Codex holds its preview through queued/full-read completion (src/bundled/claude-code/tabs.tsx:1037–1047,1145–1171; src/bundled/codex/tabs.tsx:1275–1291,1327–1336). The five-file changed-head delta does not change client–relay contract fields/auth. The prior bd430307 focus-loss finding is resolved by this handoff and new keyboard regressions. No blocking finding in either integration or product/interaction review. Author action: none.
Validation: At clean 44795829 on isolated Linux Blox, pnpm exec vitest run --reporter=dot passed (1,189 files / 25,353 tests; 10 files / 38 tests skipped, exit 0, 456.46 s), and pnpm check passed (exit 0); start/end SHA and tree verified. git diff --check 9657bb3..4479582 passed at the same clean head on macOS. Focused real Chromium and WebKit component/Button browser exercises covered keyboard immediate and delayed expansion, failure→retry/success, and tab-away: successful handoff preserved focus-visible on Refresh; failure kept focus on Load earlier; tab-away was not reclaimed. This was not a full-app or native Tauri journey. WebKit headless Tab from an aria-disabled loading control reached body in that environment; completion did not steal it back.
Outstanding gate and residual risk: Rust and tool integration fails dependency policy for RUSTSEC-2026-0592 in the unchanged Cargo.lock; CI required is red. Verification owner: CI/release owner for that separate required gate, reviewer/tooling for exact-head native Tauri/full-app, screen-reader, large-session performance and Codex-specific error→retry observation. The full pnpm test integration/Rust/browser workflow was not independently run in this review; the focused browser harness does not prove the host journey. This approval covers the code at this SHA, not those outstanding gates or a future head.
|
🤖 Reply to the review at The finding, reproduced in the app. On a Linux desktop build of the reviewed code, Enter on Load earlier activity left the focus on The fix. Plugin only; core is unchanged at +223/−32 in three files.
Checks at
Your two other points
Not observed by us: macOS (WKWebView), assistive technology, and a failed load followed by a retry in the app (the Claude mounted tests cover the failed load). Every app journey ran on a Linux desktop build (WebKitGTK). |
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
Signed-off-by: LordMelkor <kray@squareup.com> Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz>
jedwards27
left a comment
There was a problem hiding this comment.
🤖 :bot: Jude’s code review agent
Verdict: COMMENT — recommend request changes for the two author-actionable regression-test losses below. Reviewed live-base three-dot diff f373cea21d979a23f27920bbb89b98cf05b8c73d...acee353d918d9bda03ebca2b661aa412b41a7120 (exact head acee353d). Risk: high: large-transcript rendering, follow-latest scroll and keyboard/focus behavior.
Findings (P2):
src/features/agents/TranscriptPanel.test.tsx:483–534: the retained Refresh test checks per-turn reuse and changed metadata, but the removed equal-Refresh case (prior test at lines 565–590) was the only assertion that the top-level transcript remains the same object on an equal full Refresh.TranscriptPanel.tsx:106–120deliberately returns the prior transcript on equality;ActivityTranscript.tsx:228–232runs follow-latest layout work on a changedcontentreference. A future regression rebuilding the snapshot on each unchanged read now passes the tests while needlessly resetting scroll position and invalidating inner memoization. Restore one compact equal-Refresh snapshot identity assertion, or an equivalent observable regression test of the no-op scroll/performance contract.src/features/agents/ActivityTranscript.test.tsx:770–775,874–879: the new linked-reply body assertion is useful, but replaces the sole check that its arrival surface was marked whenscrollIntoViewran. The later marker assertion does not catch mark-after-scroll ordering, which can start the arrival cue before the smooth scroll brings the reply into view. Retain the body check and add back the pre-scroll arrival check (or equivalent observable timing coverage).
Author action: restore those two narrowly scoped protections; no production-code defect was reproduced in this re-review. Pruned exotic extension-field cases are a confidence reduction, not separate requested work. Verification owner: author for the regression tests; reviewer/tooling for native/AX evidence and environment-related test gaps.
Validation at clean exact head acee353d (Linux reviewer workstation): bin/pnpm check passed; bin/pnpm build passed. Full bin/pnpm exec vitest run was red, with 1,189 files / 25,462 tests passing, 2 files / 3 tests failing, 10 files / 39 tests skipped; the two timeout-affected files passed in a complete-file diagnostic rerun (53/53), consistent with load sensitivity but not a green full-suite result. Full Node integration rerun: 335 pass / 2 pre-test failures / 6 skip because the reviewer’s Rust package mirror lacked the locked url 2.5.9; no author change is requested for that infrastructure gap. No current-head native app/browser/AX journey was run. Earlier UI measurements belong to older builds and are not exact-head proof. No client–relay contract change was found in the author-owned test-only follow-up; the unresolved verification gaps remain owned by reviewer/tooling.
Signed-off-by: LordMelkor <kray@squareup.com> Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz>
|
🤖 Both protections asked for in the review of
Each regression was applied locally only to confirm its test fails; neither is in the commit. At this head both type checks pass, the agent and Markdown suites pass (4,855 passed, 34 skipped), and the Chromium and WebKit component checks pass (5 passed, 1 skipped). One question: which two files timed out in your full |
Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz> Signed-off-by: LordMelkor <kray@squareup.com>
…4219) Fixes two status glitches in the agent Transcript tab: 1. **External harness plugins:** Earlier turns that already have an `outcome` (without an `endedAt` timestamp) now keep their finished label instead of reverting to `"Working"` whenever a new turn runs. No bundled harness produces these turns; this is for external plugins using `ctx.agents.ui.Transcript`. 2. **All harnesses:** The newest turn no longer flashes `"Status unknown"` when the agent stops. | `main` | This change | | --- | --- | | <img src="https://raw.githubusercontent.com/LordMelkor/buzz-app/8dd3234522f7314a23643bb023979fdd622a1374/turn-status/main.png" width="379" alt="Five turns while the last one works. The first two are over and read Working."> | <img src="https://raw.githubusercontent.com/LordMelkor/buzz-app/8dd3234522f7314a23643bb023979fdd622a1374/turn-status/change.png" width="379" alt="The same five turns. The first two read Completed; only the last one reads Working."> | *The first two turns have an `outcome` and no `endedAt`; the last turn is working.* **Size:** **+17/−4** in core (`ActivityTranscript.tsx` +3/−1, `TranscriptPanel.tsx` +14/−3), **+1/−0** in the plugin guide. Whole PR: **+116/−18** in five files with tests. ## What changes 1. **Turns with an `outcome` count as ended** (shared renderer): Previously only turns with `endedAt` counted as ended, so finished turns without an end time fell back to the panel's single `working` flag and read `"Working"` during later turns. 2. **The `"Working"` label stays tied to the rows on screen** (panel): The panel retains the `working` flag captured with the displayed rows instead of flipping it before the stop-read returns, holding that label for at most 10 seconds after the stop (then `"Status unknown"`, as on `main`, until the read settles). 3. **Plugin guide updated** (`+1/−0`): One bullet to set `endedAt` on a finished turn, or `outcome` when its end time is unknown; `at: 0` for an unknown item timestamp; omit `completedAt` when a tool's start time is unknown. ## Why core, and how small | Core change | Why a plugin cannot do it | How small | | --- | --- | --- | | Treat `outcome` as ended (`ActivityTranscript.tsx`) | The shared renderer decides which turns count as ended; without this, plugins must invent a fake `endedAt`, which renders as a real time and duration. | +3/−1, one expression | | Pair `working` flag with displayed rows (`TranscriptPanel.tsx`) | The panel owns the `working` flag and held rows while a read runs; plugins see neither. | +14/−3: one optional field on held rows and a 10-second bound on the hold (no new prop) | ## Costs and what stays - **In-flight stop-read window:** While the read after a stop runs, the newest turn reads `"Working"` for at most 10 seconds, then `"Status unknown"` until the read returns. Its duration on a large session was not measured for this PR. If the window is hidden at stop, the read runs on return; the 10 seconds count from the stop, so after a longer absence it shows `"Status unknown"` until that read returns, as on `main`. - **Unchanged rendering:** Turns without `endedAt` or `outcome` still show `"Working"` while active; turns with `endedAt` keep their duration and time (`outcome` alone shows status without time). No bundled reader is changed, and the Mesh and Activity tabs draw as before. - **E2E limits:** Only `ended` ran in the app test (the other three outcomes are unit-tested); `"Status unknown"` lasted 8 to 27 ms on the test harness, and bundled harnesses were not run in that test. The main E2E test ran at `690aa82877`, while on `c86b432919` merged with #4181 and #4188 on `main` (Codex, synthetic 48 MB session, local relay, throwaway identity; 3 of 3 runs), letting a turn end and holding the post-stop read process for 15 s before releasing it kept the newest turn at `"Working"` until 9.86 to 9.92 s after turn end, `"Status unknown"` from 10.01 s, and `"Completed"` at 15.22 to 15.24 s (0.2 s after release) with no error alert — leaving only a read that fails late covered by the mounted test. ## Checks - **At `c86b432919`:** Six suites on a Linux machine, **4,796 passed, 34 skipped**; both type checks pass; the three pre-push checks pass (design system, Clippy, related tests: **2,329 passed, 1 skipped**). At `6f7634f6a2` (that head merged with `main`; the four code and test files unchanged), both type checks pass, the agent-features suite has **2,180 passed, 1 skipped**, and the pre-push checks pass (related tests: **2,640 passed, 1 skipped**). - **Review & lint:** Agent review found no defect; `landmines` lint on added lines (including the fix) reported 0 findings. ## End-to-end test (AGENTS.md step 3) An end-to-end test by the maintainer's agent on a separate Linux machine, made with human guidance from the maintainer driving this work. - **Setup:** Builds of `main` (`4363e10e14`) and the earlier head (`690aa82877`), local relay, throwaway identity, 15 s stand-in model, and an external harness plugin using `ctx.agents.ui.Transcript` (two replayed turns with `outcome` and no `endedAt`). - **Steps, scripted:** With the tab open, send three prompts in sequence and sample every turn's label ~4 times a second and on every change. - **Result:** On `main`, the two prior turns without an end time read `"Working"` during every new turn (3 of 3) and the newest turn stepped `"Working"` -> `"Status unknown"` -> `"Completed"` (3 of 3). On this change, those same two turns stayed `"Completed"` (3 of 3) and the newest turn went `"Working"` -> `"Completed"` with no `"Status unknown"` (3 of 3). Final labels match `main`. <details><summary>New tests</summary> - **Renderer status table:** Turns with each outcome (`ended`, `error`, `stopped`, `unknown`) and no `endedAt` show their status instead of `"Working"` while active. - **Panel:** A four-case mounted table tests stop-read success or failure before and after 10 s (`"Working"` at `9,999 ms`, `"Status unknown"` at `10,000 ms`, then the late outcome, plus a second stop getting a fresh 10 s). The two late cases fail before this fix (`"Status unknown"` never appears); the two ordinary cases fail on `main`. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: LordMelkor <kray@squareup.com> Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz>
…ty while the agent works (#4188) Someone opening the Transcript tab on a Codex agent whose session file is over 50 MB gets only app-server history and a `"larger than 50 MB"` row today with no scripts; with this PR, the tab shows scripts whenever the newest 20 turns fit in 50 MB and reads only appended bytes while the agent works. <img src="https://raw.githubusercontent.com/LordMelkor/buzz-app/d9729d2d1bb004de7eca902192b0c1e45750d05e/codex-reader/working-turn.png" width="600" alt="The Transcript tab of a Codex agent with a 90 MB session file, showing its rows while the agent runs a command"> **Size & merge order:** Codex plugin only (`+1,134 / −120` in 7 files: `+330 / −70` code, `+804 / −50` tests, no core line). **Best merged after `#4181`:** alone, drawing ~1,800 rows while the agent works drops the tab from ~60 to ~3 fps on a 90 MB file; `#4181` restores ~55 fps. ## What changes - **Tail-based 50 MB limit:** walks backward from the end of the file to where the newest 20 turns start, applying the 50 MB cap to those turns rather than the whole file (and keeping the limit answer while an over-limit file only grows). - **Windowed & incremental reads:** reads in windows so one long parse becomes short slices, and refreshes only new bytes while the agent works (falling back to a full read if the file shrinks, is replaced, or is rewritten). - **Clean line boundaries & separated I/O:** drops a clipped first line before decoding so multi-byte characters never turn into `""`, and splits next-read decisions into a pure table-tested function. ## What to decide or check - **Rendering drop without `#4181`:** on a 90 MB session, `main` draws 159 rows at 58 fps; this PR draws ~1,800 rows at ~3 fps while working until `#4181` lands (with `#4181` `737542aff4`, 55 fps and 171 ms max frame). On Linux (`main` `4363e10e14`, 48 MB Codex open + prompt, wait for first rows plus >= 100 ms frozen frames, median of 3 unless noted; macOS and assistive technology not measured), waiting plus frozen time drops from **98.89 s** (`98.34 to 99.25 s`) on `main` and **7.65 s** (`7.57 to 8.04 s`) with `#4181` and `#4219` without this PR to **3.54 s** (`3.35 to 3.87 s`; *n* = 9) before `#4181`'s Codex preview, and to **1.46 s** (`1.59, 1.38, 1.46 s`: `1.36 s` first rows [`1.35 to 1.38 s`], `0.10 s` frozen [`0.00, 0.10, 0.24 s`], ~`49 s` turn) in the clean merge of this PR (`35d0c9ac7e`), `#4219` (`c86b432919`), and `#4181`'s production code as at `bd43030737`. Render speed on large under-50 MB files is also unchanged without `#4181`. - **Memory & concurrency:** Node RSS peaks grow 1.4–2.5× over 10 refreshes on a 46 MB file (414–509 MiB vs 717–765 MiB flat on `main`; post-GC heap is flat at 40 MiB vs 6 MiB) because the plugin caches up to 2 working session files (max 50 MB / 8,192 records each) until the first post-turn read or app restart. Conversations with 3+ active threads skip the cache; shown turns over 50 MB still omit scripts. - **Platform timings:** automated timings are from Linux; on macOS 27.2, only the shell step was run by hand (both stock tools and GNU coreutils on `PATH`). ## Testing - **Checks (`35d0c9ac7e`):** Codex package 791 passed / 4 skipped, type checks and design lane pass, clean trial merge with `main`, 0 landmines timing findings (10 kept: 9 why-comments + 1 return type). Full Vitest passed at `6431ffbe41` (25,338 passed, 38 skipped, 0 failed) and runs in CI on head; behavioral equivalence after `6431ffbe41` verified over 192 replayed reads and 3 app opens across 3 sessions. - **Desktop E2E (`7f4b2e38d5` vs `main` `9657bb3545`, plus `6431ffbe41` limit-row check):** on a separate Linux machine, a 90 MB session (24 MB newest 20 turns) streamed 1,953 script rows (first at 1.9 s) across 3 working turns with zero `""` characters, while a 60 MiB shown-turns session showed the updated over-limit message. <details> <summary>Benchmarks, detailed E2E steps, review fixes, and unit test coverage</summary> ### Synthetic benchmarks (Linux WebKitGTK without GPU & Node / Codex 0.171.0, medians of 3) | | `main` | This change | |---|---|---| | App: 90 MB file, newest 20 turns 24 MB | `"larger than 50 MB"` row, no scripts | 1,953 script rows, first at 1.9 s (`main` row at 1.7 s) | | App: 46 MB file, first rows | 3.8 s | 3.1 s | | App: shown turns >50 MB, row appears | 1.7 s | 1.1 s | | Node: open, 46 MB file | 498 ms (338 ms max block) | 218 ms (18 ms max block) | | Node: refresh growing 46 MB file | 425 ms, 65 M base64 chars | 69 ms, 1,271 chars | | Node: refresh growing 13 MB file | 121 ms, 18 M base64 chars | 56 ms, 1,269 chars | | Node: refresh growing >50 MB turns | 126 ms, 70 M base64 chars | 47 ms, <100 chars | With `#4181` (`737542aff4`) merged in: 46 MB Refresh largest frame 181 ms (181, 187, 172) and first rows at 2.6 s (vs 388 ms / 3.3 s for `#4181` alone at `01cb4c2f16`); working turns on 46 MB stayed at 50.5, 52.5, and 53.6 fps (max frame 0.32 s, plus one untraced 1.1 s frame in turn 1). Tenth refresh matches a fresh open. ### E2E details (end-user test by the maintainer's agent on a separate Linux machine) - Built with `pnpm tauri build --debug --no-bundle` at `7f4b2e38d5` vs `main` `9657bb3545`, local relay, 90 MB session file, 3 scripted 5× `date; sleep 6` turns + Refresh. - **This change:** rows streamed 3× per working turn, zero `""` and zero over-limit rows; Refresh kept 1,858 / 1,779 / 1,700 rows as the 20-turn window slid. **`main`:** 138–159 app-server rows + `"larger than 50 MB"` row. - **`6431ffbe41` limit-row check:** 60 MiB shown turns rendered 82 rows with `"CodeMode scripts could not be loaded. Showing app-server history only. The turns shown take more than 50 MB of"` + path. ### Review fixes & test coverage - Fixed two defects from `d8756e5418` (`stat` resolving GNU coreutils on macOS; `""` on mid-character read starts—2 opens on `d8756e5418` showed 3 and 8 `""`, `7f4b2e38d5` showed 0 across 2,647 rows) and reworded the limit row reason at `6431ffbe41`. - Unit tests fail when removing: backward walk, append offset, 3 over-limit cache-drop cases (shrink, replace, oldest turn change), same-size rewrite, and UTF-8 split across 64 KiB `take_text` chunks. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: LordMelkor <kray@squareup.com> Co-authored-by: Jello <c9085e5557728e0eb4eba927ae283fb1f27e65319dfa77e2ee2125e2cba7042d@buzz.block.builderlab.xyz>
* origin/main: (24 commits) feat(messages): open a downloaded file card instead of downloading again (#3605) feat(notifications): ask for macOS notification permission on entering the app (#3801) fix(messages): alert when a folder or unsupported file type is dropped (#3943) perf(codex): show scripts for large sessions and read only new activity while the agent works (#4188) fix(agents): show a finished turn's status while another turn works (#4219) perf(agents): open agent transcripts on recent activity and keep them smooth (#4181) fix(inbox): stop naming a one-to-one DM's person twice in Activity rows (#3700) fix(activity): show the year on activity dates outside the current year (#3799) test(browser): wait on real readiness in presence, huddle ring and solo composer journeys (#3922) fix(messages): follow a saved draft changed in another composer (#3950) test(notices): give the fake plugin snapshot its hostOwned list (#4238) Reveal sidebar workspace and channel actions on hover (#4151) fix(identity): stop the Buzz ID card crediting a photo that isn't there (#3924) fix(emoji): stop emoji-mart re-rendering after the picker is disposed (#3917) test(search): drive the scoped alias match test with fake timers (#3918) test(browser): wait for panel motion to finish before clicking (#3919) fix(search): show a handle, not a key prefix, under names in the people picker (#3915) fix(search): title ⌘K plugin and setting rows with their name, not their category (#3798) fix(plugins): resolve built-in feature owners, naming the Emoji shortcut group (#3701) test(browser): keep the held preferences decode alive in navigation-scroll-intent (#3920) ... Signed-off-by: Bradley Axen <baxen@squareup.com> Co-authored-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz>
Watching a turn on a 46 MB Claude transcript takes 95.91 s of waiting plus frozen time on
main, cut to 0.25 s with #4188 and #4219.mainWait for first rows plus >= 100 ms frozen frames until 2 s after turn end (median, n = 3 unless noted; ranges below). Without #4188, Codex 48 MB takes 7.65 s; #4219 fixes the status label.
Size: +3,191/−162 in 20 files — core +223/−32, Claude +404/−38, Codex +133/−12, shared notice +66.
Changes and fixes
Removed and costs
main).Journey breakdown, ranges, builds, and fine print
Three interleaved journeys per build unless noted (median and range). Builds:
mainis4363e10e14; the four Claude rows were measured on451d26bd37merged with#4188(35d0c9ac7e) and#4219(690aa82877), while Goose and the outside-bundle plugin were measured on the same merge made one commit earlier (914edabe82). Those two merges differ only in four Claude plugin files (src/bundled/claude-code/tabs.tsx,transcript.ts, and their two test files), which Codex, Goose, Pi, and outside plugins never load or run (checked from the import graph, including module load). Headad0c834114added the notice fix after those builds (setting a flag in one branch of the panel's live merge when a live read drops a turn at the 50-turn cap); no earlier table journey was measured again except one Codex 48 MB set atad0c834114with #4188 and #4219 (3.58 s,3.48 to 3.60 s, n = 3). The Codex 48 MB row above now adds Change 7 on a build carrying this PR's head,#4188, and#4219onmain4363e10e14.main95.91 s (94.95 to 96.02 s:13.78 swait for first rows,82.13 sfrozen) vs 0.25 s (0.15 to 0.36 s:0.15 swait,0.10 sfrozen). The turn takes 83.69 s onmainvs 51.87 s (49.3 svs0.1 sfrozen per minute watched).main95.91 s (mainalways loads everything) vs 3.30 s (3.30 to 3.43 s:0.16 swait for first rows,2.46 sfor the Load earlier activity click,0.70 sfrozen after load completes,0.69 to 0.81 s).1.27 MB,230records,187rows on screen):main14.31 s (14.02 to 14.57 s:2.61 swait,11.70 sfrozen;30 to 32frames >= 100 ms, longest 1.0 s) vs 0.50 s (0.29 to 0.71 s:0.29 swait,0.22 sfrozen,0.00 to 0.43 s;0 to 4frames >= 100 ms, longest 0.12 s). The turn takes 56.66 s onmainvs 50.67 s.main6.38 s wait for first rows (6.37 to 6.46 s; draws1,206rows with6frames >= 100 ms from click to 5 s after first rows, longest 1.87 to 1.92 s) vs 0.17 s (0.16 to 0.18 s; shows latest activity,4rows,0frames >= 100 ms, longest 0.04 s).main98.89 s (98.34 to 99.25 s; n = 3:5.85 swait,93.04 sfrozen) vs 1.48 s (1.38 to 1.49 s; n = 3:1.38 swait,0.10 sfrozen;129rows on screen at first instead of3,714, and140rows in2turns at end instead of3,539in20turns). Before Change 7, the same three PRs measured3.54 s(n = 9:3.35 to 3.87 s; on that earlier build the turn took 75.01 s onmainvs 48.98 s,55.8 svs0.8 sfrozen per minute watched) and3.66 s(3.65 to 3.68 s; n = 3:2.73 swait,0.92 sfrozen) on the control build without Change 7 — Change 7 cuts 2.18 s. On the combined build with Change 8 (production-equal toadc8a03b2e), Codex 48 MB measures 1.46 s (1.38 to 1.59 s, n = 3;129 → 140rows in2turns), matching the1.48 stable row (0.02 sapart; Change 8 does not move Codex).main2.31 s (2.26 to 2.43 s) vs 1.31 s (1.15 to 1.42 s).1,100rows):main43.72 s (43.48 to 43.77 s:1.70 swait,42.02 sfrozen;166frames >= 100 ms in each journey) vs 1.15 s (1.12 to 1.15 s:1.12 swait,0.00 sfrozen;1frame of124 msin one of three journeys). Its reader is unchanged by all three PRs (it receives changes 1, 4, and 5 through the shared panel). Stored history is50turns (1,000steps, about0.8 MB), and the turn uses a scripted model stand-in with9tool calls (54.15 s onmainvs 53.21 s).0.40 s(0.31 to 0.55 s) onmainvs0.49 s(0.27 to 0.63 s) with the change (no gain). Goose, 1 MB takes0.76 sonmain(0.58and0.93 s; n = 2, third run had no valid journey in two tries) vs0.43 s(0.32 to 0.57 s; n = 3) with the change.1,392rows) 4.07 s (4.06 to 4.11 s) onmainvs 1.03 s (0.99 to 1.03 s); 1 MB (251rows) 0.70 s (0.66 to 0.72 s) vs 0.23 s (0.23 to 0.23 s). Pi receives changes 1, 4, and 5 through the shared panel; its reader is unchanged.0frames of 100 ms or more on either build (longest 83 ms onmain, 93 ms with the change) and no session read — the change costs nothing when the tab is closed.#4188changes only the Codex reader, so Claude, Goose, Pi, and outside-plugin rows do not involve it. Before Change 7, this PR and#4219without#4188took 98.89 → 7.65 s (7.57 to 8.04 s:3.39 swait,4.26 sfrozen) —#4188gave4.11 sof the way from7.65 sto3.54 s, and Change 7 takes the remaining 3.66 s to 1.48 s.#4219corrects a finished turn's status label and was not measured apart.0with Change 1 because closed row bodies are omitted until opened. Each Codex journey is therefore verified by counts instead (7tool rows in the new turn on screen,6command calls in the turn's own session file, one command per call, none failed, turn>= 36 s); all Codex 48 MB journeys in the table pass (andmain's three also pass the driver's text count), and opening one row on each new build shows the command in its body. With Change 7, the Codex 48 MB view starts at129rows (140in2turns at end), and after Load earlier activity shows3,714idle and3,539after a turn (equal to Refresh, and matching the counts before Change 7). Onmain, the full view counts3,734rows at first rows and3,565at end — the difference from3,714/3,539is20tool items (26items at end:25tool,1message) thatmainbuilds inside closed bodies and the new builds omit until opened, while every shown row is equal (20turns,20prompts,21messages,3,653tool rows at first rows;3,477tool rows and1system item at end, falling as the new turn pushes an older, larger turn out).Per-change numbers, layout details, and fallback rules
core): Carried single-change measurement (6opens per build): open wait (click to first rows) dropped from 13.21 → 2.30 s (46 MB) and 8.68 → 4.17 s (120 MB). When a link targets a message inside a closed row, that row's body mounts before focus and scroll move so the highlight lands (+14/−4).plugin, pluspartial+4/−1andonRefreshRequested+10/−1incore): Carried measurement on top of Change 1 (6opens per build): first rows dropped from 2.30 → 0.12 s (46 MB) and 4.66 → 0.13 s (700 MB). The reader checks that the preview matches the conversation, drops a partial leading turn cut by the 2 MiB tail, and falls back to reading full history when it cannot place a whole-turn boundary (the cut turn holds a steer, a timestamp is missing, a tool result has no call, or no whole turn fits). It shows "Earlier activity is not loaded" with Load earlier activity; View activity, a Refresh during preview, or a poll that does not continue the rows on screen loads full history.ActivityTranscript.tsx,+96/−5): Holds your reading position when you have scrolled up (away from the end); at the end (within32 px), the pane keeps following the end as onmain, so full history loads above and the preview's rows stay on screen at the bottom edge — and a preview shorter than the pane is always at the end, moving down to the bottom edge (measured on 700 MB in the desktop test below).ActivityTranscript.module.css,+14):1,100rows), the page runs at about 5 frames a second for the whole turn: from send to Completed, a person loses 54.4 s and 56.0 s (2journeys) to frozen frames and waiting, vs a 2.58 s median (n = 9) on the same build with the block. In one more journey per build that also recorded layout: 269 frames of 100 ms or more (55.2 s) from send to end without the block vs 4 frames (1.15 s) with it; each animation tick of the live status row cost a render step of about 190 ms, and with animations paused the freeze stopped.0 of 1,039 to 1,057item rows pass their turn on either build).contain: paintalone (same build, that one declaration removed): On Codex 48 MB (3,714rows), frozen time from send to end is 1.02 s without it (0.65, 1.08, 1.02 s; n = 3) vs 0.50 s with it (0.38 to 0.60 s; n = 5), and frames of 50 to 99 ms double (2.64 s in44frames vs 1.32 s in20frames). At1,100rows (both Claude journeys) it measures nothing — so it saves half a second per watched turn on a large session at the cost of one line.TranscriptPanel.tsx+38,ActivityTranscript.tsx+4/−1,plugin-authoring-guide.md+2): The panel reuses equal turn objects and the renderer memoizes each turn. Works for every reader, including external plugins that rebuild all turns on each read; the plugin guide adds 2 lines on unique, stableturnIds across reads and leaving previously returned turns and items unchanged. Carried single-pair Codex 48 MB measurement (3turns per build): frozen time in one working turn fell from 3.59–3.79 s → 0.81–0.87 s (new session file) and 3.56–3.58 s → 0.82–0.86 s (appending to the 48 MB file; that build pair also carried the removed 2-line people-context memo, 0.02 s alone).Claude plugin,+73net production lines and+215net test lines added to this PR — Claude plugin+238/−33before vs+311/−34with it, tests+1,549/−47before vs+1,764/−67with it,0core lines): When the tab already holds full history from the working turn and the session tail continues it, the reader keeps held turns and reads only the turn's last records from the tail; in every other case (tail mismatch, a poll that does not continue the rows, Refresh) it reads everything as before.0.16 to 0.18 s; n = 3) instead of 1.94 s (1.91 to 2.05 s; n = 9). From send to the label, frozen frames plus that wait fall from 2.58 s (2.53 to 2.75 s; n = 9) to 0.73 s (0.73, 0.73, 0.87 s; n = 3), and the same journey measured 3.85 s before this change (3.72 to 3.95 s; n = 5) against 3.30 s (3.30 to 3.43 s; n = 3) with it. After each of the three journeys, a Refresh (which reads everything) showed equal row counts, row kinds, and duration badge.0.42 sand0.80 s, under 1 s). Measuring what a person waits for — the Completed label — showed 1.9 s per turn, so the stop half returned in a smaller form while the start half (which measured no gain) and the earlier state bookkeeping stay out.src/bundled/codex/tabs.tsx,+132/−9, no core line, Codex reader unchanged): When a Codex transcript holds more than128entries (a constant in the tab;2shared help lines cover Claude and Codex), the tab opens on the newest turn and shows up to128entries when complete (a working turn is shown in full), with "Earlier activity is not loaded." and Load earlier activity; clicking Load earlier activity or Refresh transcript shows the full view (up to20turns, as before).main4363e10e14with#4188and#4219): Waiting plus frozen time drops from 3.66 s (3.65, 3.66, 3.68 s;2.73 swait,0.92 sfrozen) to 1.48 s (1.38, 1.48, 1.49 s;1.38 swait,0.10 sfrozen), cutting 2.18 s (129rows instead of3,714at first;140rows in2turns instead of3,539in20at end).3journeys per build) kept every row of a kept turn with no blank sample, kept the previously newest turn on screen, and continued send 1's thread on send 2 (one mounted test fails before the fix where starting a new thread remounted the view). After Load earlier activity, row counts equal the full view (3,714idle with equal kinds and ID hash vs without Change 7 across3 + 3opens;3,539after a turn, equal to Refresh). Clicking Load earlier activity during an in-flight background read (28 to 34 msafter read start,3 of 3) brings rows in after1,405 / 1,430 / 1,432 ms; row count only rises afterwards and the button does not return, including when that read finishes (also covered by a mounted test).Claude pluginonly,+111/−13production in three files,+337/−14tests in two files,0core lines; combined plugin delta with Change 7 againstad0c834114:+243/−22production in four files,+604/−16tests in three files): Previously, once a working turn outgrew the2 MiBtail, the Claude reader fell back to reading the whole file at most once every30 s(about47 MBand ~0.75 sfrozen per read on a 46 MB session), leaving the live view15 to 32 sbehind. With this change, the reader resumes from the byte where its last read ended and parses only appended records while the turn stays working.adc8a03b2e, n = 3 + pilot per shape, all valid on first try; control = build without Change 8, n = 3 per shape):0.07, 0.98, 1.02 s) after being written with no whole-file read in between, vs 6.94 s (5.13 to 7.61 s) via a whole-file read without Change 8. Turn markers within10 s:9 of 9(slowest2.24 s) vs7 of 9over10 slate (slowest32.5 s). Frozen time: 1.42 s/min (1.34, 1.42, 1.67 s) vs 1.86 s/min (1.85, 1.86, 2.50 s). Working label after the last record: 2.26 s (2.16, 2.26, 2.72 s) vs 2.14 s (2.13, 2.14, 2.25 s— holds the pre-run<= 0.5 sline above control median, with one of three runs above every control run). Closing and reopening the tab mid-turn (click to first rows): 2.61 s (2.59, 2.61, 2.61 s) vs 2.63 s (2.59, 2.63, 2.69 s). Rows at end equal rows after Refresh in3 of 3(81 / 82 / 83rows, same count per kind; the three watched rows equal in status, element count, and text length). Cost per journey:47 to 52polls (16 to 22empty),5.5 to 6.4 MBreturned by polls in total,4whole-file reads (196 MB) vs6without Change 8 (two of the4are fallbacks: the failed send's result, and one at turn end).10 s:9 of 9,0.09 to 1.97 safter being written, vs slowest26.9 to 32.1 sper journey without Change 8. Frozen time: 0.81 s/min (0.79, 0.81, 0.84 s) vs 1.21 s/min (1.21, 1.21, 1.27 s; every run below every control run). Working label after the last record: 3.19 s (3.17, 3.19, 3.20 s) vs 3.15 s (3.14, 3.15, 3.30 s). Closing and reopening the tab mid-turn (click to first rows): 3.47 s (3.41, 3.47, 3.51 s) vs 3.48 s (3.40, 3.48, 3.51 s). Rows at end equal rows after Refresh in3 of 3(79 / 79 / 81rows, same count per kind). Cost per journey:46 to 53polls (18 to 23empty),3whole-file reads (104 MB) vs6(210 MB), each2.6 s(one of the3is a fallback at turn end).10 s:30 of 30—27show0.13 to 2.54 safter being written, while the one written while the tab is closed and reopened shows after8.18,8.68, and8.96 s(close to the10 sline because it waits for the reopen's read), vs slowest26.8 to 28.2 sper journey without Change 8. Frozen time: 1.42 s/min (1.32, 1.42, 1.44 s) vs 2.18 s/min (2.14, 2.18, 2.18 s; every run below every control run). Working label after the last record: 4.13 s (4.08, 4.13, 4.19 s) vs 4.11 s (4.08, 4.11, 4.12 s). Closing and reopening the tab mid-turn (click to first rows): 4.54 s (4.51, 4.54, 4.58 s) vs 4.61 s (4.54, 4.61, 4.67 s). Rows at end equal rows after Refresh in3 of 3(240 / 247 / 248rows, same count per kind). Cost per journey:46polls (7or8empty),3whole-file reads (163 MB) vs6(one of the3is a fallback at turn end).main16 commits newer than this PR's head, so frozen-time, label, and reopen comparisons cross that difference; the late row, markers, and rows-equal checks are measured inside one build. End-row comparison runs after the stop's whole-file read; mid-turn poll correctness is verified directly by the 19 accepted polls parity test and code review underChecksbelow.)777 of 9,219turns (8.4%) outgrow the2 MiBtail in25 of 146sessions;18.2%of agent working time lies past that point (4.3%when counting idle wait for the next prompt); three in four of those turns start in a session already larger than50 MB.777real long turns,970times across193,312replayed records vs13,687whole-file reads on the30 sclock — no more reads than today in772 of 777turns, while5turns send faster than once per30 sand read more often for that stretch); a tool result matching no open row; a user prompt without a timestamp; a new turn; a different session path or a file that shrank; more than32 MiBappended since the last poll; or a short read before the cursor. Mid-turn sends are covered by two mounted tests (failed and successful sends; a split send triggers a whole-file read and the next poll matches after reseeding), and the failed send's fallback ran in3 of 346 MB journeys onadc8a03b2e. A file rewritten in place at the same size is unseen until the next whole-file read; a single turn over64 MiBdrops its early working-only rows at stop; a steering message whose author name resolves late omits the name until the next whole-file read; and a second long turn right after the first (the30 sclock must not hold back its first read) is covered by a reader test and a Linux run, not an app journey.TranscriptPanel.tsx,+10/−6):mainhas the same fault).more: false, the result carriesmore: true(transcripts withoutmorestay unchanged).50 → 51turns, and a mounted Goose test verifies the notice is absent at 50 turns and visible when the 51st arrives (both fail on9e24fb6b6f). The first reviewed head had this fix; the cut removed it when restoringmain's window code, review of9e24fb6b6fcaught the hidden notice, and it is back as it was.src/bundled/TranscriptPreviewNotice.tsx+66,claude-code/tabs.tsx+6/−15,codex/tabs.tsx+11/−13, tests+41/−8;0core lines):bodyin both the Claude and Codex previews (confirmed in code and on the Linux desktop app:3 of 3keyboard and1 of 1mouse on Claude46 MB;6 of 6keyboard —3at rest and3withEnterduring a running read — and1 of 1mouse on Codex48 MB).preventScrollonly if focus fell tobody(carrying no flag across reads). Refresh transcript stays mounted in the header, reading position stays unchanged, mouse clicks leave no focus ring (only Firefox honoursfocusVisible; WebKit and Chromium ignore it and follow native:focus-visibleplus the app's keyboard-navigation gate), and focus stays put if the reader moved it during the load or if the load fails.bodyonbd43030737and move to Refresh transcript with the fix; Claude also retains focus on the button after a failed load and on a row tabbed to during the load; Chromium and WebKit component fixtures pass12 of 12(Entermoves focus to Refresh with a visible ring, mouse clicks move without a ring, and unfocused clicks leavebodyuntouched). On the Linux desktop app (WebKitGTK, real key and mouse events), 15 of 15 focus journeys pass every focus line (plus3Claude loaded-row journeys,18in all; without the fix,9 of 9keyboard and2 of 2mouse end onbody): Claude 46 MB (#4181alone at44795829d2) moves focus to Refresh transcript with:focus-visiblein3 of 3keyboard journeys (2.50 to 2.57 spress to rows) and without a ring in3 of 3mouse journeys (2.46 s), adds0 pxscroll movement (6 of 6:scrollTop 43,081, gap to end168 px, top turn214 px, equal to control), and keeps"earlier activity loaded"at3.37 s(3.28 to 3.69 s:0.16 sopen wait,2.43 sclick wait,0.78 sfrozen; first rows0.15 to 0.17 s;3.36 sbefore the fix — meets the<= 3.51 smedian line, with one back-to-back run at3.69 shaving7frames >= 100 ms vs3 to 5at equal frozen work — time over50 ms1.23–1.27 svs1.17–1.36 s); Codex 48 MB (44795829d2merged with#4188and#4219) passes3 of 3keyboard at rest,3 of 3keyboard during a running read (Enter10 to 13 msinto the read), and3 of 3mouse without:focus-visible(1.41 to 1.56 sclick to rows,0 pxrow movement, identicalscrollTopvs control; the in-flight check ran on Codex only, and the loaded-row check ran on Claude only).Why core, and how small (+223/−32 in three core files)
Why core, and how small
Per-file split (at
c760f6e751): Core +223/−32 (ActivityTranscript.module.css+14,ActivityTranscript.tsx+151/−25,TranscriptPanel.tsx+58/−7); shared notice +66 (src/bundled/TranscriptPreviewNotice.tsx); Claude plugin +404/−38 (runtime.ts+64/−8,tabs.tsx+162/−10,transcript.ts+178/−20); Codex plugin +133/−12 (src/bundled/codex/tabs.tsx); docs +4 (buzz-help.md+2,plugin-authoring-guide.md+2); tests +2,361/−80 in ten files (+802/−22inclaude-code/tabs.test.tsx,+572/−24inclaude-code/transcript.test.ts,+279/−2insrc/bundled/codex/tabs.test.tsx,+259/−13inActivityTranscript.test.tsx,+212/−7inTranscriptPanel.test.tsx,+135intabs-overlap.test.tsx,+45/−1ingoose/tabs.test.tsx,+43/−7in two files undertests/browser/, and+14/−4intrust.test.tsx); whole PR 20 files, +3,191/−162 (earlier cut before the test trim: 16 files, +3,178/−126).ActivityTranscript.tsx,Disclosure)+26/−12for lazy bodies (visited/onToggle, including 9 re-indented lines inSections) ++14/−4for linked-row mount (+40/−16combined).ActivityTranscript.tsx,TranscriptTimeline)32 px, it follows the end as onmain).+96/−5for scroll hold (class component usinggetSnapshotBeforeUpdate, no scroll listener) ++4/−1forpartialprop.ActivityTranscript.tsx)+4/−1.TranscriptPanel.tsx,reuseTurnsandsameFields)+38.ActivityTranscript.module.css).turnrows and the live status row inside the panel; plugin CSS is scoped to plugin elements only.14CSS lines, transcript panel only.TranscriptPanel.tsx,onRefreshRequested)+10/−1, optional."more turns exist"notice at the 50-turn cap (TranscriptPanel.tsx)more; applies to Goose and any external latest-turns reader.+10/−6.Costs, scope, and what stayed out
main. At 46 MB (3journeys): one 0.47 to 0.48 s frame in the first second after send, and 0.57 s frozen from send to 2 s after end (0.48 to 0.58 s; 1–2 frames) vs 79.22 s onmain(78.45 to 79.31 s). Took out the state bookkeeping and975test lines (542lines deleted intranscript-reader.test.ts;433removed fromtabs.test.tsx); Change 6 brought back215net test lines for the stop half.mainmet only when a live session crosses 50 turns (a session divider) is not speed work and stays out (the"more turns exist"notice fix is back as Fix above).2.43 to 2.47 s) at 46 MB, with 1.01 s of that frozen (1.00 to 1.02 s; 2 frames, longest 0.53 to 0.55 s). On Codex, reaching older activity takes one click waiting 1.3 s (1,276 / 1,297 / 1,311 msafter a turn;1,374 / 1,380 / 1,429 mson an idle transcript) in one long frame, with0host reads (the full history stays in memory while the short view is shown) and0 pxmovement of the viewed row (measured at the second frame and after1 s).32 px), so completing Load earlier activity follows the end as onmainand moves the preview's rows from the top to the bottom edge with the earlier rows above them (they stay on screen; same follow-the-end rule for every reader, with no code added for or against it).bd43030737's production code (adc8a03b2e): 0.15 to 0.16 s (6opens, 46 MB) and 0.14 to 0.16 s (3opens:139,155,156 msclick to first rows, 700 MB);1 MBmeasured 0.28 to 0.29 s (3opens) on the earlier build, and44795829d2measured 0.15 to 0.17 s (3opens, 46 MB).main's full read at stop has the same window).main's full open read. For Codex, Buzz links cannot target a transcript row; the code opens the full view when the tab opens with a focus target, though that path was not run in the app.Change 3acts when a preview becomes full history — for both Claude and, with Change 7, Codex). Goose and Pi readers and tabs are unchanged, and the Codex reader is unchanged (Change 7 changes only the Codex tab). Synthetic Pi turns were refused by the model provider on both sessions, leaving open timings only.reuseTurnskeeps the prior snapshot; on any comparison error, it takes the new read as-is; a duplicateturnIdin one read never reuses a wrong turn and renders whatmaindraws.Checks (at c760f6e) and browser guard
c760f6e751: Combines44795829d2(approved in review 6013410077) with three merges ofmain, the test trim under the repository'sTestsrule, and one commit restoring two regression checks at the reviewer's request (review 6015247320): the same-object check on an equal Refresh, and the check that the arrival surface is marked when scrolling starts. Docs keepmain's shorter guides (+2help,+2authoring); the net trim is now 5 test cases (115 net test lines) with0production changes (was6cases,136lines). Six suites pass (4,847 passed, 34 skipped: bundled agents 408 passed; Claude plugin 683 passed, 11 skipped; Codex 772 passed, 4 skipped; Goose 551 passed, 14 skipped; Pi 252 passed, 4 skipped; agent features 2,181 passed, 1 skipped; Markdown adds 8 passed for 4,855 passed, 34 skipped overall), browser checks run 5 passed, 1 skipped, both type checks pass, and the checks on the PR show CI status.landmineson added lines atc760f6e751(17files checked againstmain): Still 19 findings in the same 4 files (1 re-indentedbiome-ignoreinActivityTranscript.tsx, 1@vitest-environment jsdomintabs-overlap.test.tsx, 12no-test-doublesinclaude-code/tabs.test.tsxandtabs-overlap.test.tsx, 5no-test-doubleson the session-status spy incodex/tabs.test.tsx), zero timing findings, and 0 on44795829d2's,8d1289d98b's, or the restoring commit's added lines, on Change 6's, Change 7's, Change 8's, or the 50-turn notice fix's production lines, and on the 19 accepted polls parity test or browser test lines.src/bundled/claude-code/transcript.test.ts& code inspection): On a synthetic append-only session file past2 MiB,19accepted polls in a row are each compared in full against a fresh whole-file parse of the same bytes while the turn is working — covering assistant text, thinking, an open tool call, a tool result, a second open tool, a failed tool, a same-batch send success and error, a timestamped steering message, an untimed queued steering message, meta/sidechain/no-ID/attachment/progress/system records, a multi-page append, a pending send, and one more append after a whole-file read. All19are equal (0whole-file reads); splitting a send across two polls makes its receipt request a whole-file read, and the next poll after reseeding matches again. By code inspection of the parser, its dispatch is closed: any other top-level record type is skipped identically by both paths (missing ID or non-user/assistant), other content block types are ignored identically, and a mid-turn compaction (systemboundary followed by ausersummary) is skipped and then read as a new turn, prompting a whole-file read just as the whole-file parser splits.8untested lines removed); Change 6, Change 7, Change 8 (including the 19 accepted polls parity test), the 50-turn notice fix, and the Load earlier activity focus fix (44795829d2) each passed a separate agent review. A browser test undertests/browser/(added at9e24fb6b6f;+43/−7,0app lines; CI runs WebKit and Chromium) mounts the real panel with a working turn at419 pxand asserts the live status row lies inside its turn on both sides — passes in WebKit with the 14-line block and fails when removed (8 pxpast left edge; guards the 14-line block, notcontain: paintalone).451d26bd37merged with#4188and#4219's earlier head onmain4363e10e14(matching the Claude plugin files at9e24fb6b6fandad0c834114), page rows after a watched turn equal the rows that one Refresh gives: Claude 46 MB1,092rows (1,042item rows,50turns) equal in3 of 3runs; Claude 700 MB1,187rows (1,137item rows,50turns) equal in3 of 3runs. Each run opens the session, clicks Load earlier activity, watches one short working turn with every row loaded, lists rows, clicks Refresh (full read), and lists again, comparing row count, row ID list, and for each item/turn row a hash of text and element count (0rows only before,0rows only after,0differing rows; covers rows, not notes above them, and does not compare against amainbuild).End-to-end desktop test
An end-to-end test by the maintainer's agent on a separate Linux machine, made with human guidance from the maintainer driving this work.
Desktop test setup, clip, and results
adc8a03b2ealone — same production code asbd43030737, nothing merged in):pnpm tauri build --debug --no-bundleagainst a local relay on that machine, throwaway owner and Claude agent on that relay, synthetic46 MBand700 MBsessions, fresh app per journey (9journeys, all valid on first try).0.15 to 0.16 safter the click;0.16 swaiting plus frozen time (0.16, 0.15, 0.25 s— median within the pre-run line of<= 0.56 s).3.36 swaiting plus frozen time (3.51, 3.32, 3.36 s— median within<= 3.63 s). After each turn, rows before and after Refresh transcript matched in3 of 3:1,099 / 1,098 / 1,098rows (50turns), same ID order, kind, text hash, and element count.3 of 3the same as on332986dd9e— opens on4rows in1turn at the top of the pane; after Load earlier activity,1,206rows in50turns with the pane at the end (0 px), keeping the latest turn and its2rows on screen363 pxlower (turn top402 pxlower, ending28 pxabove bottom) and keeping the fourth short-view row on the first of the50turns.mainand this change aligned on click (Claude 46 MB): at1 s, this change shows the latest rows whilemainshows an empty panel;mainshows its first rows13.8 safter the click.🤖 Generated with Claude Code