Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): type & to mention a connected machine #30279

Closedhideoneric(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/30279/headopened View on GitHub

Problem

To mention another connected machine in the composer you have to type @, which also searches threads and files. Picking a machine means scrolling past file matches.

Change

& now opens a list of only your machines. A bare & lists all of them, and more letters filter by name. The pick inserts the same machine chip @ does. @ still offers machines alongside threads and files.

& also shows up in ordinary prompts, so three rules keep it out of the way:

  • The menu opens only when a machine matches, so & or &page=2 stay quiet.
  • && never triggers it, even with the caret between the two &.
  • After a bare & nothing is preselected, so Enter on npm run dev & sends the message. Arrow keys or the mouse pick a machine, then Enter inserts it.

Both trigger detectors (web, and the shared one mobile uses) learn the new environment kind, and web and mobile list and select machines for it. * was the first idea, but the composer turns *text* into italics.

Scope and approval

New composer trigger that reuses the existing machine mention (same items, chip, and gating behind the Linked environments beta). Proposed in Ideas discussion #30450, waiting for maintainer approval of the direction and scope.

Verification

  • Focused tests: the detector (&, &vps, and build && with the caret at the end or between the &, R&D, &&next staying quiet), listing every machine on an empty query, and no preselected item for a bare &. vp run check:changed passes.
  • Dev build with a second local server paired as a machine and Linked environments on:
Bare & lists the machine, nothing preselectedArrowDown, Enter inserts the chip
&amp shows no menunpm run dev &, Enter sends the message
  • Not run on a native mobile client. Mobile uses the shared detector, which the tests above cover, and the same machine list and chip as @.

Done with Claude Opus 5.5 in Claude Code via T3 Code.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Approved at 981a691

      Macroscope's review found this PR approvable — Adds an & shortcut for selecting linked machines in the composer, reusing existing machine-context attachments. Existing eligibility restrictions and @ behavior remain unchanged, with no new machine permissions or automatic operations.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Explain Change →

      Note

      Reviews paused

      It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

      • Last reviewed commit: 80abd76d7f14530da2ab13127ab9d1323249b777
      • Latest commit, not reviewed: 2cdddc3ef4ebd79ccaaed59b61864940c8535cfc

      Use the following commands to manage reviews:

      • @coderabbitai resume to resume automatic reviews.
      • @coderabbitai review to trigger a single review.

      Use the checkboxes below for quick actions:

      • Resume reviews
      • Trigger review

      No actionable comments were generated in the recent review.

      Walkthrough

      The composer detects & environment triggers and offers linked machines as suggestions. Empty environment queries can list eligible machines. Web and mobile menus support environment suggestions and selection.

      Changes: Environment picker

      Layer / File(s)Summary
      Environment trigger detection
      packages/shared/src/composerTrigger.ts, packages/shared/src/composerTrigger.test.ts, apps/web/src/composer-logic.ts, apps/web/src/composer-logic.test.ts
      The shared and web trigger detectors recognize & queries and reject tokens containing another &.
      Machine suggestion matching
      packages/client-runtime/src/composerThreadItems.ts, packages/client-runtime/src/composerThreadItems.test.ts, apps/web/src/components/chat/useComposerMenuItems.ts, apps/mobile/src/features/threads/use-composer-command-menu.ts
      The matchers and menu hooks return machine suggestions. They can list eligible machines for an empty environment query.
      Menu display and selection
      apps/web/src/components/chat/ChatComposer.tsx, apps/web/src/components/chat/ComposerCommandMenu.tsx, apps/web/src/components/chat/composerCommandKey.ts, apps/web/src/components/chat/composerMenuHighlight.ts, apps/web/src/components/chat/composerMenuHighlight.test.ts, apps/mobile/src/features/threads/ComposerCommandPopover.tsx, docs/user/composer.md
      Web and mobile menus label and accept environment suggestions. The web composer controls menu visibility and default selection. The documentation describes machine suggestions through & and @.

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Change: Feature

      Sequence Diagram(s)

      sequenceDiagram
        actor User
        participant ChatComposer
        participant useComposerMenuItems
        participant matchComposerEnvironmentItems
        User->>ChatComposer: Enter an environment query
        ChatComposer->>useComposerMenuItems: Request items for environment trigger
        useComposerMenuItems->>matchComposerEnvironmentItems: Match query against linked environments
        matchComposerEnvironmentItems-->>useComposerMenuItems: Return matching environments
        useComposerMenuItems-->>ChatComposer: Return menu items
        ChatComposer-->>User: Display machine suggestions
        User->>ChatComposer: Select an environment

      Suggested reviewers: juliusmarminge, t3dotgg

      Merge Risk: Minimal · previous review 80abd

      No merge-blocking issue was identified. Native mobile testing remains advisable.

      Pre-merge checks: Passed 4

      Check nameStatusExplanation
      Title checkPassedThe title "feat(web): type & to mention a connected machine" matches the main change. The PR adds a bare & composer trigger that lists connected machines, filters them by name, and inserts the same ma…
      Description checkPassedThe description follows the template sections (Problem, Change, Scope and approval, Verification). The Problem section explains the need to mention another machine without scrolling past file matches.…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Title check

      Explanation

      The title "feat(web): type & to mention a connected machine" matches the main change. The PR adds a bare & composer trigger that lists connected machines, filters them by name, and inserts the same machine chip that @ uses. The title is short, single-sentence, and in conventional commit form. It names the web scope, though the diff also updates the shared detector and mobile composer logic, which the title does not mention. That is expected for a title.

      Full details: Description check

      Explanation

      The description follows the template sections (Problem, Change, Scope and approval, Verification). The Problem section explains the need to mention another machine without scrolling past file matches. The Change section explains the trigger behavior, the guards that keep ordinary ampersands quiet, and the affected web and mobile components. Scope and approval links to Ideas discussion #30450 and states that maintainer approval of direction and scope is still pending, so the approval requirement is not yet met. Verification lists focused tests, the check command that passed, dev-build screenshots for the UI changes, and states what was not checked (native mobile). The template's conventional commit title guidance is met by the title. The author should record whether maintainer approval exists, because the template requires a linked approval comment or discussion with explicit maintainer approval. The description also states it was done with a named model and harness, which the template asks for when an agent was used.

      Finishing Touches

      Generate unit tests (beta)

      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Recent review info

      Run configuration

      Commits

      Reviewing files that changed from the base of the PR and between 2f1f4cc4238f3776b4a6053e0838a06facaded82 and 80abd76d7f14530da2ab13127ab9d1323249b777.

      Files selected for processing: 5

      • apps/mobile/src/features/threads/use-composer-command-menu.ts
      • apps/web/src/components/chat/ChatComposer.tsx
      • apps/web/src/components/chat/useComposerMenuItems.ts
      • apps/web/src/composer-logic.ts
      • docs/user/composer.md
      Files skipped from review as they are similar to previous changes: 1

      • docs/user/composer.md

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

      • Fix comments: Fix CodeRabbit comments on this PR
    4. maria-rckscommented

      Note

      Written by gpt-6.1-sol on behalf of Maria

      Verified in a real dev environment

      Verified exact head 2f1f4cc4238f3776b4a6053e0838a06facaded82 against github/main at 15707a84b03e27bb257d60e027812ebf94bbda25 on Linux. Used repository Playwright with /usr/bin/google-chrome, fresh isolated state, a real git project created through the app, and real Codex gpt-6.1-sol turns. Only one dev server ran at a time. The second paired environment was the existing installed server on the same VM.

      • Main: bare & had no picker; the existing machine mention query found the paired environment.
      • PR: bare & lists the machine without selecting it. ArrowDown + Enter and filtered mouse selection insert its chip.
      • Sending that chip reached Codex. Its response contained the paired environment's exact id, independently matched against that server's environment descriptor.
      • Existing machine mentions still work. &, &page=2, R&D, and && keep the menu closed, including with the caret inside &&.
      • Enter after a trailing & sends the prompt rather than inserting a machine. Codex returned the requested literal text.
      • Beta off hides the picker; beta on restores it. Checked desktop light and narrow dark web layouts.
      • Blacksmith ran the four existing focused suites: 105 tests passed. Existing head CI checks passed. No source changes or pushes were needed.

      Before, main:

      main: bare ampersand remains plain text

      After, PR, same project and conversation:

      pr: bare ampersand opens the machine picker without a selection

      codex returns the selected machine identity from supplied context

      19-second recording: machine selection, existing mentions, shell operator, and literal ampersand submission

      Short runtime transcript. Captures inspected; uploaded video playback and seeking checked in T3's browser.

      Not verified

      Native iOS/Android clients, Electron shell behavior, macOS/Windows, other providers, T3 Connect/relay transport, and launching work on a physically separate machine were not exercised. This pass proves machine mention selection and provider context delivery between two real environments on this Linux VM, not remote task execution.

    5. tanstack-source added labelsfeature

    6. This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

      See the conflict window.

    7. Thanks for this. It is not something the project wants to take on: @ already mentions machines.

      Closing this pull request.

    8. juliusmarminge closed this

Sign in to join this conversation.