Skip to content

Wire up tui input, transcript view, into full TUI app#13104

Merged
harryalbert merged 31 commits into
masterfrom
harry/tui-transcript-view
Jul 1, 2026
Merged

Wire up tui input, transcript view, into full TUI app#13104
harryalbert merged 31 commits into
masterfrom
harry/tui-transcript-view

Conversation

@harryalbert

@harryalbert harryalbert commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

This PR replaces the old TUI prompt-stream/stdout path with the first production-shaped TUI transcript session. The ownership split is clear: RootTuiView only gates login, TuiTerminalSessionView owns the authenticated terminal surface + prompt path, and TuiTranscriptView adapts the canonical TerminalModel::BlockList into TUI viewport content.
image.png

The most important model invariant is that TUI terminal blocks and TUI agent blocks are still ordered by the shared TerminalModel::BlockList, not a TUI-only transcript list.
image.png

What to review

image.png

  • crates/warp_tui/src/terminal_session_view.rs is the root renderer and handler for the transcript and input. It also handles sending prompts (was previously handled by the now deleted tui conversation model, but that model was just a thin wrapper around prompt submission and is now unnecessary)
  • crates/warp_tui/src/transcript_view.rs is effectively the blocklist element, using the viewported list to render the blocklist. This view also owns history event handling, which I think is reasonable but curious on your take.
  • crates/warp_tui/src/tui_block_list_viewport_source.rsis used by the transcript view to adapt the block list into viewport items, specifically terminal_blocks (crates/warp_tui/src/terminal_block.rs) and agent_blocks (crates/warp_tui/src/agent_block.rs)
    • terminal block rendering is pretty clear and can be skimmed IMO, but agent block rendering is worth a pass, specifically on how it does layout calculations for element heights (see the new content field)
  • can skim over crates/warpui_core/src/elements/tui/container.rs — this PR adds per-axis padding but this is pretty schematic

Note: test-util flags were added in a bunch of places because warp_tui tests live in a separate crate, where warp’s #[cfg(test)] helpers are not compiled, so the feature explicitly exposes those test-only terminal helpers to downstream tests without making them part of normal builds. Apparently, cfg(test) is only enabled for the crate whose tests Cargo is currently compiling, not for that crate’s dependencies.

Testing

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

Agent Mode

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

@cla-bot cla-bot Bot added the cla-signed label Jun 26, 2026

harryalbert commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@harryalbert harryalbert changed the base branch from harry/conversation-streaming-for-tui to graphite-base/13104 June 26, 2026 21:46
@harryalbert harryalbert changed the base branch from graphite-base/13104 to harry/conversation-streaming-for-tui June 28, 2026 21:23
@harryalbert harryalbert changed the base branch from harry/conversation-streaming-for-tui to graphite-base/13104 June 28, 2026 21:42
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch from 28284a7 to baa75cd Compare June 29, 2026 00:19
@harryalbert harryalbert force-pushed the graphite-base/13104 branch from adad88f to 976ddc0 Compare June 29, 2026 00:19
@harryalbert harryalbert changed the base branch from graphite-base/13104 to harry/conversation-streaming-for-tui June 29, 2026 00:19
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch from baa75cd to 0f3fda0 Compare June 29, 2026 00:21
@harryalbert harryalbert force-pushed the harry/conversation-streaming-for-tui branch from 976ddc0 to 5aa2c63 Compare June 29, 2026 00:21
@harryalbert harryalbert changed the base branch from harry/conversation-streaming-for-tui to graphite-base/13104 June 29, 2026 14:08
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch from 0f3fda0 to c51741c Compare June 29, 2026 14:08
@harryalbert harryalbert changed the base branch from graphite-base/13104 to harry/tui-viewport-element June 29, 2026 14:08
@harryalbert harryalbert force-pushed the harry/tui-viewport-element branch from 728f81d to f215f8d Compare June 29, 2026 14:12
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch 2 times, most recently from 0c090af to a821c3d Compare June 29, 2026 16:40
@harryalbert harryalbert force-pushed the harry/tui-viewport-element branch from 40dbb8a to f2ab35d Compare June 29, 2026 16:55
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch 2 times, most recently from a68ed8f to f58624f Compare June 29, 2026 17:14
@harryalbert harryalbert force-pushed the harry/tui-viewport-element branch from 707ebfa to d914567 Compare June 29, 2026 18:49
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch 5 times, most recently from ce6a94e to e6ff47e Compare June 29, 2026 21:34
@harryalbert harryalbert force-pushed the harry/tui-viewport-element branch from a2a99b5 to 9547813 Compare June 29, 2026 21:34
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch 2 times, most recently from a63c188 to 29f6709 Compare June 29, 2026 23:02
@harryalbert harryalbert changed the title write tech spec Wire up tui input, transcript view, into full TUI app Jun 30, 2026
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch from 9193694 to 8a0cd37 Compare June 30, 2026 22:16
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch from 8a0cd37 to 11132a4 Compare June 30, 2026 22:29
Comment thread crates/warp_tui/src/agent_block.rs Outdated
Comment thread crates/warp_tui/src/agent_block.rs Outdated
Comment thread crates/warp_tui/src/terminal_session_view.rs Outdated
Comment thread crates/warp_tui/src/terminal_session_view.rs Outdated
Comment thread crates/warp_tui/src/terminal_session_view.rs Outdated
Comment thread crates/warp_tui/src/agent_block.rs
Comment thread crates/warp_tui/src/tui_block_list_viewport_source.rs
Comment thread crates/warp_tui/src/tui_block_list_viewport_source.rs Outdated
Comment thread crates/warpui_core/src/core/app.rs
Comment thread crates/warp_core/src/ui/theme/color.rs Outdated
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch from 60d414b to 06f2e6b Compare July 1, 2026 03:03
@harryalbert harryalbert requested a review from kevinyang372 July 1, 2026 14:31
Comment thread crates/warp_tui/src/agent_block.rs Outdated
Comment thread crates/warp_tui/src/agent_block.rs Outdated
Comment thread crates/warp_tui/src/agent_block.rs Outdated
Comment thread crates/warp_tui/src/agent_block.rs Outdated
Comment thread crates/warp_tui/src/root_view.rs Outdated
Comment thread crates/warp_tui/src/agent_block.rs
@harryalbert harryalbert force-pushed the harry/tui-transcript-view branch from 75088b8 to 850e552 Compare July 1, 2026 17:09
@harryalbert harryalbert merged commit 6cebc7a into master Jul 1, 2026
40 of 42 checks passed
@harryalbert harryalbert deleted the harry/tui-transcript-view branch July 1, 2026 19:02
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.

2 participants