Dashboard: intercept built-in slash commands instead of passing them to the LLM - #425
Conversation
Implementation Plan — Dashboard built-in slash command interceptionProblemTyping a built-in command such as Root cause (three gaps found during exploration):
Design — a general pipe + graceful degradationThe maintainer's bar (issue discussion): worth doing only if all commands — including new ones — are handled automatically, low-effort; not one-by-one. The automatic guarantee is delivered by a pipe: On top of that pipe, a name -> dashboard-affordance map routes the built-ins that already have dashboard UI to that UI, and everything else (terminal-only or not-yet-wired) shows a friendly inline hint. A brand-new built-in added later is automatically intercepted (no LLM leak) and shows the hint until/unless someone opts it into the map — so nothing is ever broken by default. Layering: the core registry stays UI-agnostic (a coarse, presentation-neutral DeliverablesA. Core registry + parser (
B. RPC exposure (
C. Dashboard protocol + server (
D. Dashboard client — the fix (
E. (Optional / stretch) server-side defense-in-depth — intercept an exact built-in in the RPC Acceptance criteria
Testing approach (mandatory)coding-agent
dashboard
Files to create / modifyCreate: Modify: Risks & open questions
Notes on branch setupBranch Plan created by mach6 |
Plan AssessmentSummaryThe diagnosis is correct: dashboard submission currently sends built-in slash text directly through The posted plan should not be implemented as written yet. It has a sound core idea, but several unresolved contract and failure-mode problems prevent its stated “never reaches the LLM” guarantee and expand the work beyond wiring existing dashboard affordances. Current state confirmed
Required plan revisions
Scope and riskAs written, this is a medium-to-large cross-package API/UI change spanning public SDK types, RPC, core registry semantics, dashboard protocol/server/client, several command-specific behaviors, tests, and documentation. That is materially broader than the filed dashboard defect and no longer resembles a low-complexity good-first change. Keeping the SDK untouched, making the RPC guard mandatory, and limiting command-specific mappings to proven dashboard equivalents would make the work focused and reviewable while preserving the automatic future-command safety goal. Recommended acceptance criteria adjustment
The branch has also been updated from current Automated assessment by mach6 |
Resolved Plan DecisionsThe plan-vetting discussion resolved the earlier blockers as follows. Command discovery and matching
Dashboard validity is opt-outAll registered built-ins are dashboard-valid by default. Valid means the command is shown in dashboard autocomplete and intercepted by the dashboard. A valid command without a completed dashboard action uses the generic “not implemented in the dashboard yet” notice; present and future commands therefore remain automatically discoverable and intercepted. Only these commands are explicitly invalid in the dashboard:
Use one simple opt-out field such as Actions included in this changeImplement dashboard behavior for:
Valid commands tracked for later UI work
These remain valid and visible now, using the not-yet-implemented notice until their dashboard actions land. OAuth login/logout will receive a separate tracking issue. Autocomplete
This decision record supersedes the narrower action map and the Plan decisions recorded by mach6 |
|
OAuth login/logout dashboard implementation is now tracked at #429. Until that issue lands, |
Progress UpdateImplemented the built-in slash-command pipeline across core RPC and the dashboard:
Verification completed successfully in the commit hook: 5,439 passed, 0 failed, 711 skipped. Commit: Progress tracked by mach6 |
Code ReviewCriticalNone. Important
Suggestions
Strengths
Agents run: code-reviewer, error-auditor, test-reviewer, completeness-checker, simplifier Reviewed by mach6 |
Review AssessmentReview: #425 (comment) Classifications
Manual-QA ReconciliationAt clean head Action Plan
Assessment by mach6 |
Progress UpdateAddressed genuine review findings 1–5 with expanded regression coverage:
Current production source already implements the reported Verification passed: full build, full test suite, Biome, diff checks, and workspace-link verification. The commit hook reported 5,479 passed, 0 failed, and 711 skipped. Commit: Progress tracked by mach6 |
Closes #400
Makes the dashboard intercept built-in slash commands (like
/fork) instead of leaking them to the LLM, via a general mechanism: built-in commands flow throughget_commands(newsource: "builtin") so the dashboard automatically knows every built-in — including future ones — and intercepts them on submit. Known commands route to existing dashboard affordances (fork modal, model picker, compact/rename modals, settings/fleet screens, export, copy); the rest degrade gracefully to a friendly hint. No LLM leak for any built-in.Implementation plan posted as a comment below.