Chat: inline /-triggered gateway command catalog menu (Mac parity) - #890
Conversation
Inline slash-command autocomplete: typing / opens a floating opaque popup over the composer listing gateway commands.list results with single-line rows (name, description, source/args badges), keyboard nav, and caret-preserving insertion. Catalog cached and revalidated at deliver time; clear unsupported/disconnected states. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…view fixes - Add an argument-choice picker: selecting a command with static first-arg choices transitions the same popup into a choice list (Mac slashMenuMode parity), filtered as you type, filling /name value on select. - Mac-align rows: name-mapped Fluent icons, one-line layout, inline arg template, 'N options' badge; elevated opaque Tertiary surface. - Rubber-duck fixes: gate the menu on CommandsSupported so it is inert on gateways without commands.list; swallow Enter while loading so raw /text can't race the fetch; relevance-ordered results so Enter inserts the top match; exit args mode on whitespace; move catalog fetch to a deps-keyed UseEffect to avoid render-time churn and unbounded retries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 5:18 PM ET / 21:18 UTC. Summary Reproducibility: not applicable. this is a feature PR rather than a bug report. The changed behavior is source-verifiable from PR-head files and the inspected screenshots directly show the active menu and argument picker. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land after maintainers explicitly accept Mac-style slash autocomplete as the Windows default, or revise the trigger/default if Windows should preserve raw leading-slash sends. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature PR rather than a bug report. The changed behavior is source-verifiable from PR-head files and the inspected screenshots directly show the active menu and argument picker. Is this the best way to solve the issue? Unclear until maintainers accept the default slash trigger. Technically the implementation reuses the existing typed AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7463a343833f. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
When commands.list throws on a connected gateway, publish an unsupported empty catalog fallback instead of leaving AvailableCommands null. This moves the composer out of the loading state so slash-leading text keeps normal send behavior and avoids immediate retry loops until reconnect. Add focused provider coverage for the exception fallback and cached no-retry behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Thanks for the strong iteration here — CI/proof look good and the provider concurrency coverage is solid. I think there is one correctness fix we should make before landing this: The chat composer is a text-entry surface, but this PR appears to fetch/present the full Can you please update the PR so the slash menu only surfaces text-invokable commands? Concretely, I’d like one of these equivalent shapes:
Please also add a focused regression test with a mixed catalog containing at least:
The intent is not to redesign the feature — just to avoid injecting native-only commands into the text composer. After that and the current validation stays green, I’d consider this landable. |
Request commands.list with CommandCatalogQuery Scope=text for the chat composer so native-only commands never surface in text autocomplete. Add focused provider coverage with a mixed native/text/both catalog to prove native-only commands are excluded while text and both commands are kept. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed Scott's scope feedback in
Validation after the fix:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
… styled rows (#893) * Chat: group the / command palette by Mac buckets with styled rows Enhance the inline "/" slash command palette (added in #890) so it matches Mac's grouped, styled command menu: - Group commands under Mac's Session / Model / Tools / Agents display buckets with uppercase category subheadings; the run options (verbose/reasoning/fast/trace/usage/elevated/exec/think/model) surface under "Model" instead of being truncated off a flat alphabetical list. - Mac-style rows: icon, /name (bold, default font), [args] hint (mono, muted), right-aligned description, and an accent-tinted "N options" badge. - The palette filters and ranks live as you type; relevance order is preserved within each group so the top match stays the default Enter target. - Auto-scroll the keyboard-selected row into view during arrow navigation. Bucket mapping mirrors Mac's mapCategory + CATEGORY_OVERRIDES; ordering mirrors CATEGORY_ORDER. No item cap (the popup ScrollViewer bounds height, so no bucket is silently dropped). No custom "Run options" menu (Mac has none) and no sessions.patch UI plumbing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Chat palette: match highlight, opaque flyout, global-best selection UI polish for the grouped "/" command palette plus the Codex/ClawSweeper review fix: - Highlight the matched query substring in the command name + description with a soft accent tint and white (primary) text. Uses TextHighlighter (rectangular, layout-safe); the alpha is baked into the Color because TextHighlighter ignores SolidColorBrush.Opacity. - Make the slash flyout background opaque, matching the composer textbox (TextControlBackground composited over the base surface) instead of a lighter floating surface that showed chat content through it. - Hide the flyout entirely when nothing matches (drop the "No matching commands" hint). - Preserve the GLOBAL best Search match as the default Enter/Tab target across grouped buckets. Grouping renders by Mac bucket order, but the weak first-bucket row is no longer the default selection; keyboard selection now defaults to the top-ranked match via ChatCommandCatalogView.GroupForPalette / GroupedPalette.DefaultSelectionIndex (addresses ClawSweeper review at OpenClawComposer.cs:474). Adds cross-bucket regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix hidden slash palette key handling Only trap composer keys while the slash command catalog is still loading and the loading popup is visible. Once the catalog is loaded with no matching command, let no-match slash input behave like ordinary text. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Scott Hanselman <scott@hanselman.com>
Summary
commands.listcatalog (native/text/skill/plugin commands, categories, args, choices) from chat./-triggered floating command menu in the composer backed by the committed protocol-foundationcommands.listDTOs/APIs (no duplicated protocol models). Includes search, categorized/relevance-ranked results, a Mac-style arg-choice follow-up picker, and full keyboard control./in chat to discover and insert gateway commands, with argument-choice assistance — comparable to Mac/web.Change Type (select all)
Scope (select all touched areas)
winnodeLinked Issue/PR
Validation
OPENCLAW_REPO_ROOTset to the worktree per AGENTS.md. Baseline + after-change:./build.ps1— ✅ all 5 projects (Shared, Cli, WinNodeCli, SetupEngine, WinUI)dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj— ✅ Passed: 2659, Failed: 0, Skipped: 31dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj— ✅ Passed: 1443, Failed: 0, Skipped: 0New/updated tests:
tests/OpenClaw.Shared.Tests/CommandCatalogPresentationTests.cs(presentation helpers + ranked search),tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests/OpenClawChatDataProviderTests.cs(catalog fetch/cache/in-flight/epoch, failure fallback, and text-scope filtering).Real behavior proof
run-app-local.ps1 -AllowNonMain).67da8055(branchbkudiess-chat-command-catalog)./(full menu), typed/mo(filtered/relevance), selected a command with static first-arg choices (arg-choice picker), and exercised ↑/↓/Enter/Tab/Esc in both modes./opens a floating opaque elevated popup over the composer with name-mapped Fluent icons,/name, inline arg templates, descriptions andN optionsbadges; selecting a choice-bearing command transitions the same popup into an arg-choice picker that fills/name value.commands.listthe menu stays inert and/textis ordinary input./autocomplete behavior on command-capable gateways; unmatched/textremains ordinary input after catalog load, and unsupported gateways stay inert.Yes— current-head screenshots are embedded below and show the slash command menu / argument picker surface.Security Impact (required)
NoNoNo— uses the existingcommands.listgateway API via the committed protocol client; no new endpoints.No— the menu only inserts text into the composer; it never auto-sends or auto-executes. The user still presses Send.NoCompatibility / Migration
Yes— additive UI; gracefully no-ops on gateways withoutcommands.list.NoNoReview Conversations
🤖 Generated with Copilot CLI