Skip to content

[4/4] TUI: reconcile streaming transcript heights - #14586

Draft
kevinyang372 wants to merge 1 commit into
graphite-base/14586from
oz/tui-streaming-height-reconciliation
Draft

[4/4] TUI: reconcile streaming transcript heights#14586
kevinyang372 wants to merge 1 commit into
graphite-base/14586from
oz/tui-streaming-height-reconciliation

Conversation

@kevinyang372

Copy link
Copy Markdown
Member

Description

Stack 4 of 4. Fixes two remaining long-transcript streaming costs and the auto-scroll regression exposed by retained viewport layout.

  • Streaming animation repaints now reuse a cached agent-block height. Output updates already emit LayoutInvalidated, so actual content changes still trigger measurement.
  • A newly rebuilt TuiViewportedList initially queries the end viewport with content_height = 0. Dirty streaming blocks beyond that provisional band are now carried into the next end-clamped query instead of consuming their dirty IDs too early.
  • Already-rendered rich blocks are measured through their retained child views, preserving the cached rich-content layout path.

This restores smooth streaming and ensures the streaming tail is painted and auto-scrolled when the final viewport band becomes known.

Release benchmark at 120×50 versus stack PR 3:

  • Retained streaming tail, 1,000 rows: ~1.06 ms → 0.0887 ms (91.6% faster).
  • Dirty fixed viewport, 1,000 rows: ~1.07 ms → 0.1605 ms (84.9% faster).
  • Retained streaming tail, 10,000 rows: 9.88 ms → 0.176 ms (98.2% faster).
  • Dirty fixed viewport, 10,000 rows: ~10.6 ms → 1.34 ms (87.4% faster).

Unoptimized absolute costs:

  • Retained streaming tail: 0.792 ms at 1,000 rows; 2.17 ms at 10,000 rows.
  • Dirty fixed viewport: 0.604 ms at 1,000 rows; 4.17 ms at 10,000 rows.

Stack: #14575#14582#145854/4.

Agent conversation: https://staging.warp.dev/conversation/2b6af7be-b227-4b20-aaf4-23c9a8494b81
Stack plan: https://staging.warp.dev/drive/notebook/yM2YcQsILFsFzwixBDbD9p
Performance plan: https://staging.warp.dev/drive/notebook/LHzsFd1B8XbQ8AnUqB88LS

Linked Issue

N/A — Warp Agent CLI long-transcript streaming performance and auto-scroll regression.

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • Added deterministic coverage that animation-only streaming frames reuse height until output is dirty.

  • Added deterministic coverage that offscreen dirty streaming height is deferred until the end-clamped viewport band reaches it.

  • cargo nextest run -p warp_tui — 903 passed; Nextest reported one unrelated leaky model-menu snapshot test.

  • cargo clippy -p warp_tui --all-targets --features test-util -- -D warnings

  • cargo bench -p warp_tui --features test-util --bench transcript_bench -- --noplot

  • cargo bench --profile dev -p warp_tui --features test-util --bench transcript_bench -- offscreen_streaming_tail --noplot

  • ./script/format

  • Signed-in live ./script/run-tui: content remained clipped above the input; unsent render-check painted correctly; the UI remained responsive.

  • I have manually tested my changes locally with ./script/run-tui

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fixed choppy streaming and unreliable auto-scrolling in long Warp Agent CLI conversations.

kevinyang372 commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

@kevinyang372
kevinyang372 force-pushed the oz/tui-streaming-height-reconciliation branch from af8a03a to 787451e Compare July 31, 2026 15:20
@kevinyang372
kevinyang372 force-pushed the oz/tui-retained-frame-overhead branch from ef8aa9b to b177932 Compare July 31, 2026 15:20
@kevinyang372
kevinyang372 force-pushed the oz/tui-streaming-height-reconciliation branch from 787451e to 7d0ea2c Compare July 31, 2026 15:23
@kevinyang372
kevinyang372 force-pushed the oz/tui-retained-frame-overhead branch from b177932 to e28b54b Compare July 31, 2026 15:23
@kevinyang372
kevinyang372 force-pushed the oz/tui-streaming-height-reconciliation branch from 7d0ea2c to 13c2a7a Compare July 31, 2026 15:44
@kevinyang372
kevinyang372 force-pushed the oz/tui-retained-frame-overhead branch 2 times, most recently from d96944a to ef90a56 Compare July 31, 2026 16:28
@kevinyang372
kevinyang372 force-pushed the oz/tui-streaming-height-reconciliation branch from 13c2a7a to c8a7436 Compare July 31, 2026 16:28
@kevinyang372
kevinyang372 force-pushed the oz/tui-retained-frame-overhead branch from ef90a56 to bdcbe6f Compare July 31, 2026 16:32
@kevinyang372
kevinyang372 force-pushed the oz/tui-streaming-height-reconciliation branch from c8a7436 to 7870296 Compare July 31, 2026 16:32
@harryalbert
harryalbert changed the base branch from oz/tui-retained-frame-overhead to graphite-base/14586 July 31, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant