Skip to content

fix(tui): remove duplicate context statusline item#18054

Merged
etraut-openai merged 2 commits intomainfrom
etraut/statusline-context
Apr 16, 2026
Merged

fix(tui): remove duplicate context statusline item#18054
etraut-openai merged 2 commits intomainfrom
etraut/statusline-context

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

Addresses #18045

Problem: /statusline exposed both context-remaining and context-remaining-percent after conflicting PRs attempted to address the same context-status issue, including #17637, allowing duplicate footer segments.

Solution: Remove the duplicate context-remaining-percent status-line item and update status-line tests and snapshots to use only canonical context-remaining.

Copy link
Copy Markdown
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: c2cedba4de

ℹ️ 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".

Comment on lines 66 to 67
/// Percentage of context window remaining.
ContextRemaining,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy context-remaining-percent config ID

Keep backward compatibility for existing user configs. After this change, "context-remaining-percent" no longer parses as a StatusLineItem, so parse_items_with_invalids drops it. Users upgrading with tui_status_line = ["context-remaining-percent"] lose that segment (and can lose the whole status line if it was their only item). Add it as a serialize alias on ContextRemaining.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This option shipped with only one version, so I'm OK not providing backward compatibility. Users who happened to pick this option in version 0.120.0 can just run /statusline again to reconfigure.

Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Looks good.

@etraut-openai etraut-openai merged commit 8475d51 into main Apr 16, 2026
35 of 36 checks passed
@etraut-openai etraut-openai deleted the etraut/statusline-context branch April 16, 2026 16:00
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 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