feat(tui): add /statusline command for interactive status line configuration#10546
feat(tui): add /statusline command for interactive status line configuration#10546etraut-openai merged 63 commits intoopenai:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an interactive /statusline workflow to configure and persist a customizable TUI footer status line, including a new reusable multi-select picker UI and supporting rendering/truncation logic.
Changes:
- Introduces
/statuslineslash command and a status line setup modal with live preview and ordering. - Implements status line rendering in the bottom pane/footer (including truncation to preserve right-side indicators) and refresh hooks in the app/widget.
- Persists configuration to
config.tomland updates config types/schema and edit helpers.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| codex-rs/tui/src/text_formatting.rs | Adds proper_join helper and tests used for user-facing warnings. |
| codex-rs/tui/src/status/rate_limits.rs | Refactors reset timestamp handling for rate limit window display. |
| codex-rs/tui/src/status/mod.rs | Exposes additional status helpers/types for status line rendering. |
| codex-rs/tui/src/slash_command.rs | Adds Statusline slash command metadata/help text. |
| codex-rs/tui/src/diff_render.rs | Exports diff add/remove calculator for reuse in status context. |
| codex-rs/tui/src/chatwidget/tests.rs | Extends tests and adds new ones for status line warning/branch state behavior. |
| codex-rs/tui/src/chatwidget.rs | Implements status line item selection/validation, rendering values, and async git branch lookup plumbing. |
| codex-rs/tui/src/bottom_pane/status_line_setup.rs | New status line setup view powered by the multi-select picker. |
| codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__footer__tests__footer_status_line_truncated_with_gap.snap | Snapshot coverage for status line truncation with right-side indicator. |
| codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__footer__tests__footer_status_line_overrides_shortcuts.snap | Snapshot coverage ensuring status line overrides shortcut hints. |
| codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__footer__tests__footer_status_line_overrides_context.snap | Snapshot coverage for status line overriding other footer content. |
| codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__footer__tests__footer_status_line_enabled_no_mode_right.snap | Snapshot coverage for enabled status line with no mode indicator. |
| codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__footer__tests__footer_status_line_enabled_mode_right.snap | Snapshot coverage for enabled status line with mode indicator on the right. |
| codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__footer__tests__footer_status_line_disabled_context_right.snap | Snapshot coverage for disabled status line preserving context indicator. |
| codex-rs/tui/src/bottom_pane/selection_popup_common.rs | Exposes line truncation helpers for reuse by footer/status line rendering. |
| codex-rs/tui/src/bottom_pane/multi_select_picker.rs | New reusable picker component with fuzzy filtering, ordering, preview, and callbacks. |
| codex-rs/tui/src/bottom_pane/mod.rs | Wires new views/components and adds bottom pane status line setters. |
| codex-rs/tui/src/bottom_pane/footer.rs | Adds status line rendering paths and truncation/layout helpers plus tests/snapshots. |
| codex-rs/tui/src/bottom_pane/chat_composer.rs | Integrates status line display/enable flags into composer footer rendering logic. |
| codex-rs/tui/src/app_event.rs | Adds app events for status line setup and async git branch updates. |
| codex-rs/tui/src/app.rs | Handles new app events, persists config edits, and refreshes status line on relevant state changes. |
| codex-rs/core/src/config/types.rs | Adds tui.status_line to config TOML types. |
| codex-rs/core/src/config/mod.rs | Plumbs tui_status_line into runtime config and defaults/tests. |
| codex-rs/core/src/config/edit.rs | Adds config edit helper to write/clear tui.status_line in config.toml. |
| codex-rs/core/config.schema.json | Updates JSON schema to include tui.status_line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b9ccb6136
ℹ️ 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".
39a913a to
ebb3308
Compare
5aaf2c1 to
bf88ef7
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12ba10e5b8
ℹ️ 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".
etraut-openai
left a comment
There was a problem hiding this comment.
Nice! This looks really good. I appreciate the attention to detail. Nicely commented, good error handling, good structure.
I added a few really minor suggestions, but I think this is nearly ready to go. I'm going to see if joshka wants to do a quick review.
Adds configurable status line that executes external commands with session context. - Add tui_status_line config option accepting command in argv form - Implement StatusLineRunner with async execution and timeout handling - Pass JSON payload with session_id, cwd, model, context_window, and workspace info - Track current_cwd in ChatWidget for accurate directory reporting - Integrate StatusLineRunner into App lifecycle - Add comprehensive tests for command execution and error handling Commands receive JSON on stdin and first line of stdout is rendered as status line.
- Send StatusLineUpdated events from status_line runner to UI - Display status line content in footer when available - Refresh status line after model/effort/collab mode changes - Add ANSI escape parsing for styled status line output - Thread status_line_value through ChatWidget and BottomPane
- Track lines added/removed from diffs and expose as cost metrics - Auto-refresh status line when terminal is resized - Increase status line command timeout to 500ms for stability - Add tests for status line display priority over shortcuts/context
Allow users to configure status_line_timeout_ms in tui config. Show an informational warning on first timeout suggesting users increase the timeout or optimize their command. Default remains 500ms.
- Move collaboration mode indicator to right when status line enabled - Fix swapped used/remaining percentage in status line payload - Add debug logging for status line payload - Update footer tests and snapshots for new layout behavior
- Add dynamic truncation of status line content to fit available width - Intelligently choose between full and compact mode indicators based on space - Fix width calculations to prevent footer content overflow - Make truncation helpers public for reuse across modules - Update test snapshots for new footer layout behavior
Properly close the stdin pipe after writing the payload to ensure the child process receives EOF and can proceed with processing.
- Remove obsolete TODO comments for caching - Change status line payload logging from info to debug level - Add missing is_wsl field to footer test cases
08c599c to
e76baee
Compare
Document status-line setup and rendering flow without behavior changes. Clarify rate-limit display shaping and stale-data classification, plus status-line event semantics and git-branch lookup invariants.
problemThe TUI footer needed a user-configurable status line so people can choose which mental model
non-goalsThis change does not introduce custom external status-line commands, does not tradeoffsThe design prefers omission over placeholders when data is missing, which keeps architectureThe feature is split across reusable and feature-specific layers: observabilityUser-visible warnings are emitted for invalid configured item ids (once per testsValidated with design inconsistencies / risks
|
joshka-oai
left a comment
There was a problem hiding this comment.
Things I noted in manual testing.
- Wasn't clear how to reorder
- session id prefix shouldn't be there (we use the full id for linking feedback right now and resuming)
- wasn't sure about the project item
- used / avail tokens need some extra text (just numbers)
I pushed some extra doc comments for future maintenance
Otherwise LGTM
https://gist.github.com/joshka-oai/4262dc0a09067971738ccea774449ded I use it for my own work and reviewing other work. Add comments either with your context and history while developing with the model's Chain of Thought available, or after without it and inferred. It's not perfect, but it's got a lot of value in accelerating from idkwtf to tillgtm |
yep - for some reason I wasn't seeing any text on this when I tested - likely because I usually use jujutsu not git |


Summary
Adds a new
/statuslinecommand to configure TUI footer status lineIntroduces reusable
MultiSelectPickercomponent with keyboard navigation, optional ordering and toggle supportImplement status line setup modal that persist configuration to config.toml
Status Line Items
The following items can be displayed in the status line:
Features
config.tomlTest plan
/statuslineand verify picker UI appears