core-agent-ide/codex-rs/tui
sayan-oai 5d2702f6b8
fix(tui): conditionally restore status indicator using message phase (#10947)
TLDR: 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.

### Problem
`commit_tick` hides the status indicator while streaming assistant text.
For preamble-capable models, that text can be commentary mid-turn, so
hiding was correct during streaming but restore timing mattered:
- restoring too aggressively caused jitter/flashing
- not restoring caused indicator to stay hidden before subsequent work
(tool calls, web search, etc.)

### Fix
- Add optional `phase` to `AgentMessageItem` and propagate it from
`ResponseItem::Message`
- Keep indicator hidden during streamed commit ticks, restore only when:
  - assistant item completes as `phase=commentary`, and
  - stream queues are idle + task is still running.
- Treat `phase=None` as final-answer behavior (no restore) to keep
existing behavior for non-preamble models

### Tests
Add/update tests for:
- no idle-tick restore without commentary completion
- commentary completion restoring status before tool begin
- snapshot coverage for preamble/status behavior

---------

Co-authored-by: Josh McKinney <joshka@openai.com>
2026-02-07 02:39:52 +00:00
..
frames Login flow polish (#3632) 2025-09-15 00:42:53 -07:00
src fix(tui): conditionally restore status indicator using message phase (#10947) 2026-02-07 02:39:52 +00:00
tests tui: double-press Ctrl+C/Ctrl+D to quit (#8936) 2026-01-14 17:42:52 +00:00
BUILD.bazel fix: integration test for #9011 (#9166) 2026-01-13 23:39:34 +00:00
Cargo.toml feat: replace custom mcp-types crate with equivalents from rmcp (#10349) 2026-02-02 17:41:55 -08:00
prompt_for_init_command.md chore: rename INIT.md to prompt_for_init_command.md and move closer to usage (#1886) 2025-08-06 11:58:57 -07:00
styles.md fix: stop using ANSI blue (#2421) 2025-08-18 16:02:25 +00:00
tooltips.txt Add codex app macOS launcher (#10418) 2026-02-02 17:37:04 -08:00