Repository navigation
fix(ui): support slash commands and skills inside normal drafts - #122425
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 9:52 AM ET / 13:52 UTC. ClawSweeper reviewWhat this changesThe PR lets the Control UI dispatch a selected slash command from within prose while keeping the remaining draft editable, and converts selected skills to existing Merge readinessKeep open. The maintainer-authored, automerge-armed PR has no concrete correctness or security finding in the reviewed source; it should proceed only when exact-head required checks complete. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Control UI composer detects slash tokens in a draft, then either dispatches a command through the normal Gateway chat-send path or inserts a skill reference for the eventual model turn. The remaining draft stays in the composer instead of being sent as model input. flowchart LR
A[Control UI draft] --> B[Inline slash detection]
B --> C{Command or skill selected?}
C -->|Command| D[Existing chat command path]
C -->|Skill| E[Insert skill reference]
D --> F[Gateway command handling]
E --> G[Model message on later send]
D --> H[Remaining editable draft]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +531, Tests +850, Docs +3. Total +1384 across 26 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the existing implementation through the armed automerge path after its exact-head checks are green; no replacement design or repair is indicated. Do we have a high-confidence way to reproduce the issue? Yes—current main’s slash-menu matcher only recognizes a command-style draft, while the PR’s targeted browser E2E covers prose plus an inline command and the preserved residual draft. Is this the best way to solve the issue? Yes—the UI removes only the selected token and invokes the existing command owner, avoiding a parallel permission or dispatch path; skills remain model references rather than immediate commands. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d259f982e4e1. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (72 earlier review cycles; latest 8 shown)
|
|
/clawsweeper re-review |
|
@clawsweeper automerge |
# Conflicts: # scripts/check-control-ui-performance.mts
|
@clawsweeper automerge |
|
@clawsweeper automerge |
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
@clawsweeper approve |
|
@clawsweeper fix ci |
|
🦞🔧 Command: I will keep the change narrow and update the PR branch if the repair worker finds a safe fix. |
|
@clawsweeper automerge |
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
# Conflicts: # ui/src/pages/chat/components/chat-composer-keydown.ts
|
@clawsweeper approve |
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
Slash completion in the Control UI disappeared as soon as a draft contained ordinary prose. Users had to erase the draft or send the slash text as part of the model message. This PR makes the slash token at the cursor behave like its standalone command while preserving the surrounding draft, and keeps skills on the existing
$skillpath. It also rejects invalid explicit skill references before applying/modelor other directives, so an error cannot mutate session state.Maintainer decision
Accepted for merge: a recognized inline slash command is an intentional composer action. It dispatches through the normal command path while the surrounding prose remains as an unsent draft.
Change breakdown
Proof
Same input and mock Gateway fixture at 1280x800 on direct base
7aef0336574and this PR at3703e232ffe.Before: direct base
After: PR
Visual proof
Before Enter, the whole draft is still in the composer:
After Enter, only
/exec gatewayis sent andKeep thisremains in the composer:How to verify
Keep this /exec gateway, then press Enter. The command sends separately and the draft becomesKeep this.Keep this /reset, then select/reset. The normal reset confirmation and permission checks still apply; the draft remainsKeep this.Please use /wea, then select/weather. The draft becomesPlease use $weather.Boundaries
$skillreferences for the model turn.