Skip to content

feat(tui): suggest plan mode from composer drafts#19901

Merged
fcoury-oai merged 2 commits intomainfrom
fcoury/suggest-plan-mode
Apr 28, 2026
Merged

feat(tui): suggest plan mode from composer drafts#19901
fcoury-oai merged 2 commits intomainfrom
fcoury/suggest-plan-mode

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai commented Apr 28, 2026

Summary

  • suggest Plan mode when the current composer draft contains the standalone word plan
  • shares the Codex App heuristics for detection
  • excludes things line /plan and the word plan in shell mode
  • reuse the existing Shift+Tab mode cycle and add thread-scoped dismissal with Esc
  • replace the normal footer hint while the reminder is visible so the statusline stays anchored
CleanShot.2026-04-28.at.10.38.14-converted.mp4

Why

The desktop app already nudges users toward Plan mode when their draft clearly signals planning intent. The TUI had the underlying /plan and Shift+Tab flows, but no equivalent reminder at the moment the user was most likely to benefit from them.

Details

The reminder is shown only when Plan mode is available, the draft contains standalone plan, the user is not already in Plan mode, the composer is actionable, and the current thread has not dismissed the reminder. Slash-command and shell-command drafts are excluded.

The first implementation used an extra composer row, but that moved the statusline whenever the heuristic fired. This version keeps the layout stable by rendering the reminder in the existing footer row instead.

Validation

  • INSTA_UPDATE=always cargo test -p codex-tui chatwidget::tests::plan_mode::plan_mode_nudge -- --nocapture
  • just fmt
  • just fix -p codex-tui
  • ./tools/argument-comment-lint/run.py -p codex-tui
  • cargo insta pending-snapshots
  • git diff --check

@fcoury-oai fcoury-oai marked this pull request as ready for review April 28, 2026 15:24
@canvrno-oai
Copy link
Copy Markdown
Contributor

Reviewed and tested. Looks good to me, works as expected. One nit/question- Do we want /plan mode to be suggested when using /side?

@fcoury-oai fcoury-oai merged commit c6bcd27 into main Apr 28, 2026
25 checks passed
@fcoury-oai fcoury-oai deleted the fcoury/suggest-plan-mode branch April 28, 2026 17:34
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 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