Repository navigation
fix(composer): slash menu leaves paths alone and replaces the whole word - #18311
NikitaMGrimm wants to merge 4 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused composer UX fix that broadens triggering of the existing slash menu while preserving provider-command restrictions and excluding path-like text. The shared, web, and mobile behavior is covered by targeted regression tests, with no schema, security, deployment, or static-analysis configuration changes. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue is established; the change is mergeable after normal checks. Pre-merge checks |
|
|
Note Grok responding on behalf of Julius. Thanks for carrying this forward. #19107 just landed on main with the core change here (a |
|
Note 🤖 Claude Opus 5.5 writing on behalf of NikitaMGrimm Thanks. The smaller follow-up on current main is #19168: paths such as |
Replaces #17279, which an automated cleanup closed. #19107 has since merged the main part of this change: a
/at the start of any word now opens the slash menu onmain. This PR is merged withmainata01c48f862and now carries only what #19107 left open.Problem
With #19107 on
main, the word-start slash menu still has four gaps:Use /tmp/build.shand/etc/hostsare treated as a slash command.$first /rev|iew, choosing the review skill gives$first $review iew./review-prruns as a command, because sends are trimmed, but the menu only offers provider commands at offset 0.Change
Use /tmp/build.sh,/etc/hostsat the start of a line, and a caret before the second slash, as in/et|c/hosts./, on web, desktop and mobile.The parser changes are in web's
detectComposerTriggerand the shared one used by both mobile composers. Mobile's line-leading/model <query>picker is unchanged.Scope and approval
This follows discussion #6962 and the maintainer-account direction on #8069, which was disclosed as agent-written on Theo's behalf. That direction requires the
/tmp/build.shand/etc/hostsexclusions, provider commands only before prior prompt content, and mobile leading-whitespace coverage.Verification
vp test run apps/web/src/composer-logic.test.ts packages/shared/src/composerTrigger.test.ts apps/mobile/src/features/threads/use-composer-command-menu.test.tson the merged headf9e0e5f655: 157 passed, including the cases fix(composer): allow slash skill search within messages #19107 added.main's two parsers restored, 17 of those fail: the eight path cases and eight caret-inside-token cases across web and shared, and the mobile completion that leaves$first $review iew.ChatComposer.tsxand the mobile menu hook, which fix(composer): allow slash skill search within messages #19107 did not touch. The mobile menu test covers/revoffering the provider command.mainalready has inChatComposer.tsx.tsc --noEmitcurrently stops on@pierre/diffs, a dependencymainadded that this checkout has not installed.The recording below was made before #19107 merged, so its "before" side is no longer
main: the menu now opens there. The "after" side still shows this branch's behavior, includingUse /tmp/build.shopening no menu. No comparison against currentmainhas been recorded.inline-slash-demo.mp4
Refs #17655
Note
🤖 Agent assistance: Claude Opus 5.5 via Claude Code in T3 Code; gpt-6-astra via Codex in T3 Code