Skip to content

fix(composer): paths such as /tmp/build.sh no longer open the slash menu - #19671

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
NikitaMGrimm:fix/slash-menu-paths-literal
Oct 18, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
NikitaMGrimm:fix/slash-menu-paths-literal

Conversation

@NikitaMGrimm

Copy link
Copy Markdown
Contributor

Problem

Since #19107, a / at the start of any word opens the slash menu. A path is a word that starts with /, so typing Run /tmp/build.sh or /etc/hosts pops 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's detectComposerTrigger and by the shared detector that mobile uses. Mobile's line-leading /model openai/gpt picker 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.sh and /etc/hosts out 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. With main's two detectors restored, the six new path cases fail (three each in web and shared).
  • tsc --noEmit passes in apps/web, packages/shared and apps/mobile. Targeted lint and formatting pass.
  • T3 Browser panel against an isolated dev server, main at 40a7908df5 versus this branch. Run /tmp/build.sh opens the empty menu on main and nothing here. Use /retr still offers the Retro skill.
  • Not run: native mobile, or an Electron shell pass.

Before: on main, "Run /tmp/build.sh" opens an empty "No matching command." menu. After: the path stays plain text.

Note

🤖 Agent assistance: Claude Opus 5.5 via Claude Code in T3 Code

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 14, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at b99dd76

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.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 54312dda-6652-47ea-9a04-93a08d2192c6
📥 Commits

Reviewing files that changed from the base of the PR and between b99dd76 and afc483a.

📒 Files selected for processing: 1
  • packages/shared/src/composerTrigger.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

📝 Walkthrough

Slash-command detection now excludes slash-prefixed words that contain another slash before the next whitespace boundary. Tests cover filesystem paths in shared and web composer detection, and confirm that model-picker queries still trigger correctly.

Changes: Composer trigger detection

Layer / File(s) Summary
Shared path-aware trigger detection
packages/shared/src/composerTrigger.ts, packages/shared/src/composerTrigger.test.ts
The shared detector identifies path-like words and excludes them from slash-command triggers. Tests cover filesystem paths and verify that a model-picker query remains a slash-model trigger.
Web composer integration
apps/web/src/composer-logic.ts, apps/web/src/composer-logic.test.ts
The web composer applies the path check. Tests cover paths at the start of text and within prose.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to afc48

The change prevents filesystem paths from opening slash menus while preserving the tested command and model-picker behavior. No actionable merge-blocking risk is evident, so the PR is ready for normal checks.

### Architecture Summary

Architecture risk: 🟡 Medium · up to afc48

The change affects 2 systems.

Changed systems: packages/shared, apps/web

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/shared (library) was modified; 2 changed files map to changed impact.
  • observed — apps/web (ui) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in apps/web/src/composer-logic.test.ts: Added cases asserting that absolute paths are not detected as slash-command triggers, including a path embedded in prose with the cursor partway through it.
  • observed — Modified behavior in apps/web/src/composer-logic.ts: Imports isPathWord for composer trigger classification.
  • observed — Modified behavior in apps/web/src/composer-logic.ts: When a slash-prefixed token is a path word, detectComposerTrigger now returns null instead of classifying it as a slash command.
  • observed — Modified behavior in packages/shared/src/composerTrigger.test.ts: Added cases asserting that filesystem paths are not treated as slash-menu triggers, including a path at the cursor, a standalone path, and a path following text.

Reliability and maintainability

  • inferred — Risk-relevant change factors for packages/shared: blast_radius_1; direct_dependents_1
Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main fix: filesystem paths such as /tmp/build.sh no longer open the slash menu.
Description check Passed The description covers the problem, expected behavior, implementation, scope and approval context, verification results, limitations, visual evidence, and agent assistance. It is complete and aligned …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

…literal

# Conflicts:
#	packages/shared/src/composerTrigger.ts
@juliusmarminge
juliusmarminge enabled auto-merge (squash) October 18, 2026 19:25
@juliusmarminge
juliusmarminge merged commit deb5b39 into pingdotgg:main Oct 18, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants