Repository navigation
fix(agent pane): Find opened while a chunk is held searches the newest rows - #34072
lawrencecchen wants to merge 7 commits into
Conversation
…ane or the composer (red) HOT PATH AUDIT area F, row W1 (handoff/hot-path-audit/stream/AUDIT.md). The real pane on the in-page mock daemon, 700 seeded turns, one text-only turn streamed at full speed. acpmuxPerf.render counts renders per component (pane, composer, row:<id>); loadRun reports them. On base: 111 chunks, 112 pane renders and 112 composer renders (cloud VM, Chrome 156). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HOT PATH AUDIT area F, row W2. The wire log and the direct client each parsed every frame: 100 JSON.parse calls for 50 streamed chunks on base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e is parsed once HOT PATH AUDIT area F, rows W1 and W2 (handoff/hot-path-audit/stream/AUDIT.md; lead decision 1 in STATUS). Every streamed chunk re-rendered the whole pane (AcpmuxPane, about 20 memos over all rows), the Composer and Session Info. - streamingRow.ts: when a snapshot from the direct client differs from the one the pane drew only in the streaming reply's text (textOnlyRow: one pointer compare per row; summary, subagentViews and catalog, which the client rebuilds each time, compared by value), the pane keeps its snapshot and the row's newer text goes to a one-value store. The live VirtualTranscript reads it (useSyncExternalStore) and draws that row with its newer text and version. Any other change draws through the pane as before and clears the store. - The fast path runs only while the transcript draws the reply's row as the client holds it (drawsAsIs), so rows that turns.ts reshapes take the old path. - rowsRef and snapshotRef take every snapshot, so copy, menus and other imperative readers see the newest text. - direct.ts parses each frame once and gives the parse to the wire log. Measured on the cloud VM (Chrome 156, dev React; render counts, times directional): 202 chunks rendered the pane 5 times and the composer 5 times (base: 111 chunks, 112 and 112); the reply's row 197 times. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aming row Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts and Find stay exact, no per-chunk serialization hpa-stream-reviewer-3 (FIX at 34d8a58): 1. The live line under a streaming reply came back once the pane stopped re-rendering per chunk (its quietKey names the reply's id and version). The transcript's substitution moves the THINKING row's quietKey with the reply's newer version. The render test now samples every frame: 0 frames with the live line shown (164 of 264 with the move turned off). 2, 3. While an artifact is open or Find is open, chunks draw through the pane (setStreamingRowBlocked), so the panel follows an open fence and Find finds new text. 4. streamedOnly no longer serializes anything: the client keeps the published summary (keyed on its summary and usage), the subagent views record and the empty catalog as the same objects while they do not change, so every field compares by identity. Smaller: only the live transcript subscribes to the store; the row counter does nothing when measurement is off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…raws the pane's newest rows (red) Review of #34004 (hpa-stream-reviewer-3, follow-up): Find opened in a pause of a reply searched the pane's older rows until the next event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aws the pane's newest rows Review of #34004 (follow-up): when a view that reads the pane's rows turns the streaming-row fast path off while a chunk is held, the pane draws the newest snapshot the client sent (onStreamingRowBlocked), with the hand-off merge the listener uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Found 6 test failures on Blacksmith runners: Failures
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 786f51b to compare; do not merge until green; see lane-rules |
|
Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over. For awareness: #36620 (a pure move, no behavior change, part of splitting acpmux/App.tsx) moves |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
Follow-up to #34004 (review comment #34004 (comment), hpa-stream-reviewer-3). Find opened in a pause of a streaming reply, while a chunk was held in the streaming row's store, searched the pane's older rows until the next event. Now, when a view that reads the pane's rows (Find, an open artifact) turns the fast path off while a chunk is held, the pane draws the newest snapshot the client sent (
onStreamingRowBlocked, with the listener's hand-off merge).Stacked on #34004: until #34004 merges this diff shows its commits too. The own commits are 8d469f7 (red test) and 9201adb (fix). I merge feat in after #34004 lands, then ask for review.
Testing
test/agent-pane-streaming-row-block.test.ts(bun, deterministic). At 8d469f7 it fails (the API does not exist); at the head 2 pass: a block that turns on while a chunk is held asks the pane to draw once; a block with nothing held draws nothing.bun run checkpasses.Observed / Not run
Changelog
none
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes Find and an open artifact reading stale rows when opened while a streamed chunk is held in the streaming row store. Previously the pane kept its drawn snapshot until the next event, so these views searched older text; now the pane draws the newest snapshot the client sent when a blocking view turns the fast path off, preserving a pending hand-off record.
Written for commit 9201adb. Summary will update on new commits.