fix(tui): restore working shimmer after preamble output#10701
Merged
joshka-oai merged 1 commit intomainfrom Feb 5, 2026
Merged
fix(tui): restore working shimmer after preamble output#10701joshka-oai merged 1 commit intomainfrom
joshka-oai merged 1 commit intomainfrom
Conversation
When a preamble line was streamed into history, commit ticks hid the status indicator and left a dead period before the next tool event restored it. That made the UI look finished even though the turn was still running. Restore the status row when stream controllers go idle during an active turn, preserving the current header so spinner/shimmer animation continues across preamble-to-tool gaps. Documentation pass: - clarify the run_commit_tick_with_scope contract and why status is hidden while streaming but restored on idle - add an explicit regression snapshot that captures the preamble-idle state with the Working status line present Tests: - cargo test -p codex-tui preamble_keeps_status_indicator_visible_until_exec_begin - cargo test -p codex-tui preamble_keeps_working_status_snapshot
Collaborator
Author
|
Compared with #10700: there is semantic overlap, but they cover different timing windows, so both are useful.
Together they address the "looks finished too early" UX across both phases. I also suggest adding a visual snapshot test for the exec-begin path (in addition to the state/visibility assertion), so we verify the user-visible working affordance and guard against future rendering regressions. |
sayan-oai
approved these changes
Feb 5, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 a turn streamed a preamble line before any tool activity,
ChatWidgethid the status row while committing streamed lines and did not restore it until a later event (commonlyExecCommandBegin). During that idle gap, the UI looked finished even though the turn was still active.Mental model
The bottom status row and transcript stream are separate progress affordances:
While stream output is actively committing, hiding the status row is acceptable to avoid redundant visual noise. Once stream controllers go idle, an active turn must restore the status row immediately so liveness remains visible across preamble-to-tool gaps.
Non-goals
ChatWidgetandBottomPane.Tradeoffs
Architecture
run_commit_tick_with_scopeinchatwidget.rsnow documents and enforces a two-phase contract:This keeps status ownership in
ChatWidgetwhile relying onBottomPanehelpers:hide_status_indicator()during active stream commitsensure_status_indicator()+set_status_header(current_status_header)at stream-idle boundaryDocumentation pass additions:
run_commit_tick_with_scope.Observability
Signal that the fix is present:
• Working (… esc to interrupt).codex_tui__chatwidget__tests__preamble_keeps_working_status.snap.Debug path for future regressions:
run_commit_tick_with_scopefor hide/restore transitions.bottom_pane.is_task_running()at idle transition.current_status_headercontinuity when status is recreated.Tests
streaming_final_answer_keeps_task_running_statenow expects status widget to remain present while turn is running.preamble_keeps_status_indicator_visible_until_exec_begin.preamble_keeps_working_status_snapshot.tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__preamble_keeps_working_status.snap.Commands run:
just fmtcargo test -p codex-tui preamble_keeps_status_indicator_visible_until_exec_begincargo test -p codex-tui preamble_keeps_working_status_snapshotRisks / Inconsistencies
commit tick,turn complete,exec begin), so future regressions can reintroduce ordering gaps.is_task_running()correctness; if task lifecycle flags drift, status behavior will drift too.