Repository navigation
fix(composer): paths such as /tmp/build.sh no longer open the slash menu - #19671
Merged
juliusmarminge merged 2 commits intoOct 18, 2026
Merged
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped composer bug fix that suppresses false slash-menu activation for path-like words while preserving normal slash commands and model selection. The shared logic is covered by focused web and mobile-facing tests, with no broader configuration, schema, or infrastructure impact. You can add or adjust custom eligibility rules. Learn more. |
…literal # Conflicts: # packages/shared/src/composerTrigger.ts
juliusmarminge
enabled auto-merge (squash)
October 18, 2026 19:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since #19107, a
/at the start of any word opens the slash menu. A path is a word that starts with/, so typingRun /tmp/build.shor/etc/hostspops up an empty "No matching command." menu over the composer.Change
A slash word that contains a second slash is a path, so it no longer opens the menu. The whole word counts, so a caret placed before the second slash (
/et|c/hosts) is treated the same. The check is one shared helper, used by web'sdetectComposerTriggerand by the shared detector that mobile uses. Mobile's line-leading/model openai/gptpicker still works.Split out of #19168, which was closed for bundling independent fixes. This PR fixes only the path popup.
Scope and approval
A small, focused fix for an obvious bug in the word-start menu added by #19107. Keeping
/tmp/build.shand/etc/hostsout of the slash menu was part of the maintainer-account direction on #8069 for inline slash commands, disclosed as agent-written on Theo's behalf.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.ts: 133 passed. Withmain's two detectors restored, the six new path cases fail (three each in web and shared).tsc --noEmitpasses inapps/web,packages/sharedandapps/mobile. Targeted lint and formatting pass.mainat40a7908df5versus this branch.Run /tmp/build.shopens the empty menu onmainand nothing here.Use /retrstill offers the Retro skill.Note
🤖 Agent assistance: Claude Opus 5.5 via Claude Code in T3 Code