Show permissions and approval mode in the TUI status line#21677
Merged
Conversation
4b1e476 to
bf0ca15
Compare
bf0ca15 to
6167281
Compare
fcoury-oai
approved these changes
May 8, 2026
fcoury-oai
left a comment
Contributor
There was a problem hiding this comment.
Performed some testing with both new options and they worked as expected.
Approved 👍
fcoury-oai
approved these changes
May 8, 2026
fcoury-oai
left a comment
Contributor
There was a problem hiding this comment.
Tested both options, both worked as expected.
Approved 👍
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.
Fixes #21665.
Why
The TUI status line is the right place for compact, glanceable session state. The original request was motivated by the need to see the active permission posture without opening
/permissionsor/status, especially when switching between safer and more permissive modes during a session.This PR intentionally separates
permissionsfromapproval-modeinstead of combining them into one status-line item. They answer related but different questions:permissionsdescribes the active sandbox/profile shape, whileapproval-modedescribes how command approvals are handled. Keeping them separate makes each item independently configurable and avoids long combined labels in an already space-constrained status line.The tradeoff is that users who want the full permission posture in the status line need to opt into both items. In exchange, users can show only the sandbox/profile label, only the approval behavior, or both, and named user-defined profiles remain concise. Non-standard permission shapes are rendered as
Custom permissionsrather than trying to squeeze detailed profile contents into the status line;/statusremains the fuller explanatory surface.What changed
permissionsstatus-line item.approval-modestatus-line item, withapprovalas an alias.Read Only,Workspace, orFull Access.Custom permissions./permissionsupdates the permission profile, approval policy, or approval reviewer.Verification
cargo test -p codex-tui status_permissions_non_default_workspace_write_uses_workspace_labelcargo test -p codex-tui permissions_selection_emits_history_cell_when_selection_changescargo insta pending-snapshots --manifest-path tui/Cargo.toml