fix(agent pane): Find opened while a chunk is held searches the newest rows

Draft
LA
1d ago
+555-61

Summary

Follow-up to #34004 (review comment https://github.com/manaflow-ai/cmux/pull/34004#issuecomment-6610271927, 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 8d469f7d9c9 (red test) and 9201adb9b93 (fix). I merge feat in after #34004 lands, then ask for review.

Testing

  • Red first: test/agent-pane-streaming-row-block.test.ts (bun, deterministic). At 8d469f7d9c9 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.
  • Browser, on the cloud VM (Chromium 156): agent-pane-stream-renders, chat-find (3), agent-pane-streaming-no-flicker pass. bun run check passes.

Observed / Not run

  • Not run: WebKit (the GitHub Actions browser lane runs it).

Changelog

none


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with 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.