Skip to content

fix(native-chat): suggest verified OMP terminal commands - #20672

Merged
nwparker merged 1 commit into
mainfrom
nwparker/omp-slash-catalog
Sep 19, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/omp-slash-catalog

Conversation

@nwparker

@nwparker nwparker commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​67 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​67
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​30

ELI5

Typing / in OMP Chat now offers OMP commands such as /model, /plan, /context, and /usage, instead of the generic /clear and /help menu. OMP continues to run commands in Terminal.

What Changed

Add a curated 22-command OMP catalog to the existing shared desktop/mobile source. Reuse current filtering, keyboard handling and command classification. Session-reported catalogs retain precedence; no OMP skill profile or transport changes.

Why

OMP lacked its own catalog. Verified command names against the read-only OMP built-in registry. After independent implementation and secondary comparison with #20630, adopted its broader verified catalog and Terminal-specific descriptions, with Nafisul Haque credited as co-author. Corrected version-dependent /switch and /rename descriptions against the available source: no promise of switch arguments or automatic title generation.

Linked Issue

Fixes #20627

Related: #20630 (superseded catalog candidate); #18618 (separate RPC integration).

Visual Proof

Before After
Generic OMP menu OMP command menu

Hidden Electron/CDP component fixture using the production catalog hook, picker, keyboard handler and style tokens. Before loads the base commit's catalog. Verified 22 rows, absence of /help, bounded scrolling, light/dark rendering, Tab completion without dispatch, Escape without dispatch, and one /context callback on Enter. This fixture records dispatch callbacks; it does not prove full-app PTY execution. Both native windows remained hidden and unfocused.

Testing

  • macOS arm64 hidden Electron component check; screenshots personally inspected.
  • 75 focused shared/desktop tests and 6 mobile classification tests pass; three regressions fail on the base catalog.
  • Web typecheck and changed-code quality pass.
  • Independent final sub-agent review approved the exact staged diff (fb7eee19cb85 SHA256); both source-description findings resolved.
  • Windows/Linux/SSH runtime and mobile rendering were not exercised for this catalog-only change. Existing host gates, command transport, folder/worktree behavior and other agents' catalogs are preserved. Full CI pending.

Review

Static shared data only; no new process, IPC, network access, dependencies or execution-host policy. The catalog is curated, not installed-version discovery. A suggestion does not acknowledge successful command execution; interactive selectors remain in Terminal.

Agent skill upstream boundary

  • Not applicable: no skill installer or sharing code changed.

Checklist

  • Focused change with ELI5 and before/after evidence
  • Correctness, cross-platform, SSH and mobile impact reviewed
  • Full CI passes

@nwparker
nwparker marked this pull request as ready for review September 14, 2026 19:01
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 2f8170e4-ac60-48f3-869b-399e155337f0

📥 Commits

Reviewing files that changed from the base of the PR and between 875b86d and b3847f9.

📒 Files selected for processing (3)
  • mobile/src/session/mobile-native-chat-send-classification.test.ts
  • src/shared/native-chat-slash-commands.omp.test.ts
  • src/shared/native-chat-slash-commands.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change adds a curated slash-command registry for the omp agent and preserves the existing Claude and Codex mappings. Tests cover OMP and pi command catalogs, filtering, dispatch text, token classification, session suggestions, and mobile send classification. OMP selectors and context commands classify as command; /help and /smol classify as unknown-token.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to b3847

The OMP picker and command classification changes are internally consistent, with no actionable merge risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: suggesting verified OMP terminal commands in Native Chat.
Description check ✅ Passed The description is mostly complete. It includes the required change summary, rationale, linked issue, visual proof, testing details, review notes, boundary declaration, and checklist. It also clearly …
Linked Issues check ✅ Passed Issue #20627 requires a curated OMP catalog in the existing shared picker, including /model, /switch, /plan, /compact, /context, and /usage, while preserving terminal-backed dispatch. The …
Out of Scope Changes check ✅ Passed The changes stay within issue #20627. They add the shared OMP catalog and focused tests. The changes do not add PTY transport, an OMP skill profile, RPC discovery, or in-chat command output. Existing …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

Reviewed changes — the new curated OMP slash catalog and its tests, checked against the OMP built-in registry the issue links.

  • New OMP_COMMANDS catalog (src/shared/native-chat-slash-commands.ts) — 22 verified OMP built-in commands wired into COMMANDS_BY_AGENT as omp: OMP_COMMANDS; no other production logic touched. All names exist in the linked OMP v18.1.21 registry, no duplicates, and /help is correctly omitted.
  • OMP catalog tests (native-chat-slash-commands.omp.test.ts) — pin the verified names, dedup, getVerifiedNativeChatCommands('omp'), null profile, pi fallback, filter/completion/dispatch, classification, and session-report precedence.
  • Mobile classification cases (mobile-native-chat-send-classification.test.ts) — /switch and /compact focus classify as command; /help//smol as unknown-token.

OMP is a PTY-lane agent (isAgentSessionHandleProvider covers only claude/codex), so the catalog feeds picker suggestions, send classification, and envelope surfacing only — the structured-composer getHostClaimed path is not reached for omp, and dispatch still writes /cmd to the OMP TUI, which matches the "in Terminal" descriptions. Focused shared tests (18) and broader native-chat tests (78) pass; the changed-code quality gate reports 0 findings. Mobile vitest could not run in this environment (missing expo/tsconfig.base.json), an infra limitation rather than a code issue.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit f1a901e into main Sep 19, 2026
83 of 85 checks passed
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.

OMP Chat UI slash picker only shows /clear and /help

1 participant