Skip to content

fix(tui): conditionally restore status indicator using message phase#10947

Merged
sayan-oai merged 5 commits intomainfrom
dev/sayan/status-indicator-jitter
Feb 7, 2026
Merged

fix(tui): conditionally restore status indicator using message phase#10947
sayan-oai merged 5 commits intomainfrom
dev/sayan/status-indicator-jitter

Conversation

@sayan-oai
Copy link
Collaborator

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

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.
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 105274b834

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sayan-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce3db63ba9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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/.
@joshka-oai joshka-oai force-pushed the dev/sayan/status-indicator-jitter branch from fc8a774 to 4a5fb0a Compare February 7, 2026 01:14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At what point do we version bump the schema - is it left alone when the change is backwards compatible?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure actually, maybe @owenlin0 knows?

@sayan-oai sayan-oai enabled auto-merge (squash) February 7, 2026 01:58
@sayan-oai sayan-oai merged commit 5d2702f into main Feb 7, 2026
32 of 33 checks passed
@sayan-oai sayan-oai deleted the dev/sayan/status-indicator-jitter branch February 7, 2026 02:39
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants