codex - 💡(How to fix) Fix Proposal: sort TUI slash commands alphabetically

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Proposal

Sort TUI slash command suggestions alphabetically after existing visibility filters are applied.

Screenshot

<img width="1512" height="642" alt="Image" src="https://github.com/user-attachments/assets/9e278ca5-968d-4122-b759-9529fc91d083" />

Maintainer request

I have implemented this locally and pushed the branch to my fork:

  • Branch: nithin-raj-9100/codex:alphabetize-slash-commands
  • Commit: cf1c821cb3 (Sort TUI slash commands alphabetically)

Motivation

Alphabetical command lists are a familiar command-palette convention across developer tools and AI coding CLIs. For users coming from slash-command driven agents such as Claude Code and OpenCode, a predictable scan order is often more convenient than a hidden priority order.

The current implementation intentionally uses enum order as presentation order, with frequently used commands placed near the top. That is reasonable for a small, stable command set, but the list has grown enough that this creates a few pain points:

  • Users who type / to discover commands need to learn an undocumented priority order.
  • Commands such as /approve can appear far below commands such as /model, even though alphabetical scanning would make them easier to find.
  • Adding new slash commands requires choosing a subjective presentation position instead of following one simple rule.
  • Dynamic commands, such as service-tier commands, are easier to reason about when they are sorted with the rest of the visible commands.

Proposed behavior

  • Keep all current command filtering and gating behavior unchanged.
  • Apply feature, platform, and side-conversation filters first.
  • Sort the final visible slash command suggestions alphabetically by command name.
  • Include dynamic service-tier commands in the same alphabetical ordering.

Expected benefit

This makes the slash command popup more predictable, easier to scan, and easier to maintain as the command list grows, while preserving existing command behavior and availability rules.

Suggested implementation

The implementation can stay small:

  • Sort builtins_for_input results by command name after filters.
  • Sort commands_for_input results by the display command string after service-tier commands are added.
  • Update the TUI slash popup/completion tests to document the new order.
  • Remove stale service-tier insertion logic that implies service tiers should stay adjacent to /model.

Verification from local branch

  • just fmt
  • Focused slash-command tests: 33 passed
  • Earlier full TUI run before the final cleanup: just test -p codex-tui passed 2754 tests, cargo insta pending-snapshots --manifest-path tui/Cargo.toml reported no pending snapshots, and just fix -p codex-tui completed successfully.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Proposal: sort TUI slash commands alphabetically