Skip to content

tui: centralize slash command serialization#14835

Draft
charley-oai wants to merge 13 commits intomainfrom
cc/tui-slash-serialization-abstraction
Draft

tui: centralize slash command serialization#14835
charley-oai wants to merge 13 commits intomainfrom
cc/tui-slash-serialization-abstraction

Conversation

@charley-oai
Copy link
Contributor

@charley-oai charley-oai commented Mar 16, 2026

Summary

  • add small shared slash-command invocation and parsing helpers in both tui and tui_app_server
  • centralize builtin slash-command metadata while also giving commands ownership of their usage lines, bare-form behavior, and inline-arg parsing
  • keep slash runtime and queueing behavior unchanged in this groundwork PR, but switch the runtime to consume parsed command forms instead of a hardcoded command-name arg gate

Testing

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

@charley-oai
Copy link
Contributor Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Nice work!

ℹ️ 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".

@charley-oai
Copy link
Contributor Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Swish!

ℹ️ 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".

@charley-oai charley-oai force-pushed the cc/tui-slash-serialization-abstraction branch 2 times, most recently from 4bba26d to b6c1831 Compare March 20, 2026 02:03
charley-oai and others added 5 commits March 20, 2026 20:25
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>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Align the serialization-abstraction branch with current main after the rebase by updating popup visibility calls and teaching the shared slash parser about Plugins.

Co-authored-by: Codex <noreply@openai.com>
@charley-oai charley-oai force-pushed the cc/tui-slash-serialization-abstraction branch from d2bfdd5 to 9e1f60c Compare March 21, 2026 03:37
charley-oai and others added 3 commits March 20, 2026 23:26
Move usage strings, bare-form behavior, and inline-arg parser selection into the per-command slash spec so command registration lives in one authoritative table in both tui implementations.

Co-authored-by: Codex <noreply@openai.com>
Replace the remaining parse-kind special cases with declarative slash parser primitives so each command spec owns its inline-arg parser as NoArgs, Remainder, or token choices in both tui implementations.

Co-authored-by: Codex <noreply@openai.com>
charley-oai and others added 4 commits March 22, 2026 02:09
Replace the transitional slash parser/serializer split with a single typed protocol layer shared by tui and tui_app_server.

Commands now own their typed args, usage text, and inline parse/serialize behavior from the slash command registry, while a shared protocol module provides positional, variadic, named, and remainder argument building blocks with stable shlex-based roundtripping.

Co-authored-by: Codex <noreply@openai.com>
Add registry-driven proptest coverage for slash command serialization in tui and tui_app_server. The new property suite surfaced a remainder quoting bug, so the shared slash protocol now shell-quotes non-roundtrippable remainder text before replay parsing.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
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