Fix TUI zero state after shell bootstrap#13999
Conversation
kevinyang372
left a comment
There was a problem hiding this comment.
The content-row refinement makes sense, and the parent render branch guarantees that the zero state and transcript cannot be painted simultaneously (if is_empty { zero state } else { transcript }). However, I don't think this preserves the intended interactive-bootstrap flow.
The new predicate only counts terminal blocks when:
block.is_restored() || block.bootstrap_stage().is_done()
BootstrapStage::is_done() only covers PostBootstrapPrecmd, so a visible, unfinished ScriptExecution block is ignored by is_empty(). Input routing is computed independently and can still select the PTY for a visible startup interaction. This means something like an Oh My Zsh update prompt could accept keystrokes while the zero state is displayed instead of the interactive bootstrap block.
The desired behavior seems to be:
- A visible, unfinished bootstrap block renders and owns PTY input.
- Once it finishes, it stops suppressing zero state.
- The first normal post-bootstrap command dismisses zero state again.
A lifecycle condition consistent with that would be:
block.is_restored() || block.bootstrap_stage().is_done() || !block.finished()
The existing test covers only a finished bootstrap block with zero displayed content rows. Could we add an integrated transition test that asserts:
- running visible startup block: transcript nonempty, prompt visible, zero state absent, input target is PTY;
- after finishing that block: transcript empty and zero state visible;
- after the first post-bootstrap shell command: zero state dismissed?
One small caveat: because emptiness now requires displayed rows, an accepted shell command may leave zero state visible for a transient frame until its first command/output row appears.
Fixes `TuiTranscriptView::is_empty()` so the Warp Agent zero state remains visible after shell bootstrap. Key changes: unfinished bootstrap block (e.g. an Oh My Zsh startup interaction) still suppresses the zero state while PTY input is routed to it. Once the block finishes it stops counting, and the zero state becomes visible until the first real post-bootstrap command arrives. - Add an integrated transition test covering the three-phase lifecycle: unfinished visible startup block → transcript nonempty (zero state hidden), after finishing → transcript empty (zero state visible), first normal post-bootstrap command → zero state dismissed. - Resolve merge conflicts on rebase to master. Fixes CODE-1887 Co-Authored-By: Oz <oz-agent@warp.dev>
ee9a96a to
6dc92e8
Compare
|
Thanks for the thorough review, @kevinyang372! Changes made: should_render_terminal_block(block, block_list)A visible, unfinished bootstrap block (e.g. an Oh My Zsh update prompt running
Acknowledged — this is an inherent property of the content-row guard and is acceptable for a single-frame flicker that resolves immediately once the grid has content. |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR tightens TuiTranscriptView::is_empty() so zero-height shell bootstrap blocks no longer suppress the TUI zero state, exposes the existing terminal content-row helper to sibling TUI tests/code, and adds regression coverage for the bootstrap lifecycle and first-command transition.
Concerns
- No blocking correctness, security, or spec-alignment concerns found in the annotated diff.
- No approved or repository spec context was provided for this PR.
- The PR includes TUI transcript captures in the description, which satisfy the repo guidance for visual evidence on headless TUI behavior changes.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Description
Fixes
TuiTranscriptView::is_empty()so the Warp Agent zero state remains visible after shell bootstrap. Pre-user shell bootstrap stages no longer count as transcript content, and terminal blocks only count when they have displayed command/output rows.@kevinyang372 Please review the transcript emptiness boundary and the render regression for zero-height bootstrap blocks.
Linked Issue
Fixes CODE-1887
Testing
warp-tui-devunder tmux at 120x40 with process-scoped TUI authentication.Warp Agent,dev build, project context, and MCP status render after shell bootstrap.Reply with OK.and confirmed the zero state is replaced by the first conversation.env -u WARP_API_KEY cargo +1.92.0 nextest run -p warp_tui— 403 passed.env -u WARP_API_KEY cargo +1.92.0 nextest run -p warpui_core— 311 passed, 7 skipped../script/format./script/presubmitwith-D warnings.Before — post-bootstrap zero state missing
After — zero state rendered after bootstrap
Behavior — first prompt dismisses zero state
Agent Mode
CHANGELOG-BUG-FIX: Fixed the Warp Agent welcome screen not appearing after shell startup in the TUI.
Conversation: https://staging.warp.dev/conversation/9e280d03-a296-47ca-a35d-c6ee847b584f
Run: https://oz.staging.warp.dev/runs/019f7f5b-f34c-7809-bbd9-160efaae094a
Co-Authored-By: Oz oz-agent@warp.dev
This PR was generated with Oz.