fix(tui): keep unified exec summary on working line#10962
Open
joshka-oai wants to merge 4 commits intomainfrom
Open
fix(tui): keep unified exec summary on working line#10962joshka-oai wants to merge 4 commits intomainfrom
joshka-oai wants to merge 4 commits intomainfrom
Conversation
use new message phase field emitted by preamble-supported models to determine whether an AgentMessage is mid-turn commentary. if so, restore the status indicator afterwards to indicate the turn has not completed.
Document how AgentMessage phase metadata drives status-indicator restoration in the TUI so preamble-capable models are easier to review and debug. Clarify optional phase compatibility behavior in protocol types and note that legacy event conversion drops phase metadata. Add a documentation-pass writeup for PR 10947 in docs/.
Keep the bottom pane height stable while background terminal status is visible. When the status indicator is shown, render the unified-exec summary inline after the "(Xs • esc to interrupt)" segment and suppress the dedicated footer row to avoid composer jitter. Add a regression test that asserts desired height does not grow when background processes appear, and update the restored-status snapshot.
ac3a2f5 to
73d9692
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When unified-exec background sessions appear while the status indicator is visible, the bottom pane can grow by one row to show a dedicated footer line. That row insertion/removal makes the composer jump vertically and produces visible jitter/flicker during streaming turns.
Mental model
The bottom pane should expose one canonical background-exec summary string, but it should surface that string in only one place at a time:
This keeps status information visible while preserving a stable pane height.
Non-goals
This change does not alter unified-exec lifecycle, process tracking, or
/psbehavior. It does not redesign status text copy, spinner timing, or interrupt handling semantics.Tradeoffs
Inlining the summary preserves layout stability and keeps interrupt affordances in a fixed location, but it reduces horizontal space for long status/detail text in narrow terminals. We accept that truncation risk in exchange for removing vertical jitter and keeping the composer anchored.
Architecture
UnifiedExecFooterremains the source of truth for background-process summary copy viasummary_text().BottomPanemirrors that text intoStatusIndicatorWidget::update_inline_message()whenever process state changes or a status widget is created. Rendering enforces single-surface output: the standalone footer row is skipped while status is present, and the status row appends the summary after the elapsed/interrupt segment.Documentation pass
Added non-functional docs/comments that make the new invariant explicit:
Observability
No new telemetry or logs are introduced. The behavior is traceable through:
BottomPane::set_unified_exec_processes()for state updates,BottomPane::sync_status_inline_message()for status-row synchronization,StatusIndicatorWidget::render()for final inline ordering.Tests
bottom_pane::tests::unified_exec_summary_does_not_increase_height_when_status_visibleto lock the no-height-growth invariant.just fmtcargo test -p codex-tui --lib