Skip to content

tui: queue slash commands in order#14836

Draft
charley-oai wants to merge 3 commits intocc/tui-slash-serialization-abstractionfrom
cc/tui-queueable-slash-commands
Draft

tui: queue slash commands in order#14836
charley-oai wants to merge 3 commits intocc/tui-slash-serialization-abstractionfrom
cc/tui-queueable-slash-commands

Conversation

@charley-oai
Copy link
Copy Markdown
Contributor

Summary

  • queue slash drafts while a turn is running and replay them through a shared serialized slash-command path
  • preserve ordering across interactive slash flows like /model, /review, /permissions, /resume, and /help
  • add the /help pager, queued replay fixes, and the supporting TUI coverage for the new behavior

Testing

  • cargo test -p codex-tui
  • just fix -p codex-tui
  • just fmt

@charley-oai
Copy link
Copy Markdown
Contributor Author

@codex review this

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: a332a21a98

ℹ️ 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 +5864 to +5867
if self.bottom_pane.is_task_running()
&& !matches!(cmd.execution_kind(), SlashCommandExecutionKind::Immediate)
{
self.queue_user_message(draft);
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 Queue serialized slash drafts when earlier inputs are pending

handle_serialized_slash_command only queues non-immediate drafts when is_task_running is true. If a turn finishes while an interactive popup is open, earlier queued messages remain blocked by the popup; selecting /model//permissions then executes immediately and can run before those older queued inputs. That reorders user actions and can apply context changes to the wrong turn.

Useful? React with 👍 / 👎.

@charley-oai charley-oai force-pushed the cc/tui-slash-serialization-abstraction branch from 044d2b6 to 4bba26d Compare March 16, 2026 20:13
@charley-oai charley-oai force-pushed the cc/tui-queueable-slash-commands branch from d3c66d4 to 2335239 Compare March 16, 2026 20:16
charley-oai and others added 2 commits March 16, 2026 20:43
Introduce a small slash command invocation serializer and consolidate built-in command metadata behind a single spec table without changing slash command runtime behavior.

Co-authored-by: Codex <noreply@openai.com>
Queue slash drafts while a turn is running, replay them through the same serialized slash-command path, and keep interactive command flows like /model, /review, /permissions, and /help consistent with that ordering model. Preserve queued slash command order when replay drains follow-up input.

Co-authored-by: Codex <noreply@openai.com>
@charley-oai charley-oai force-pushed the cc/tui-queueable-slash-commands branch from 2335239 to 5bdcd2a Compare March 17, 2026 03:49
Co-authored-by: Codex <noreply@openai.com>
@charley-oai charley-oai force-pushed the cc/tui-slash-serialization-abstraction branch 2 times, most recently from d2bfdd5 to 9e1f60c Compare March 21, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant