Skip to content

feat(web,mobile,server): mention the machine your thread runs on - #31967

Open
DominikScholz wants to merge 1 commit into
pingdotgg:mainfrom
DominikScholz:feat/composer-own-machine-mention
Open

DominikScholz wants to merge 1 commit into
pingdotgg:mainfrom
DominikScholz:feat/composer-own-machine-mention

Conversation

@DominikScholz

@DominikScholz DominikScholz commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The @ menu never offered the machine the thread runs on, so typing its name found nothing, even though I sometimes still want to name it.

Change

It's now listed and labelled "This thread's machine", on web, desktop and mobile.

Naming your own machine would have sent the agent to t3_environment_link, showing a card asking to link the machine to itself. That tool now refuses the agent's own environment and tells it to work here, and the mention's guidance says to expect that.

Before After
before after

Scope and approval

The menu left this machine out on purpose, so this is a behavior change. I made this PR because of this discussion on X, where ScriptedAlchemy replied to my list of these problems with "Send PRs, t3 is very good at working on t3". There is no Ideas discussion or maintainer sign-off beyond that, so please close it or redirect it if you'd rather handle it another way.

Related:

Verification

  • Failing tests first in composerThreadItems.test.ts and PeerLinkRequests.test.ts.
  • Before and after recorded in the running web app, captured at 1/3 speed and sped back up. The recordings predate a clean rebase, so I re-checked the current head in the app: @luc lists the machine as "This thread's machine".
  • vp run check:changed passes on this head.
  • Not checked: the mention's text is model-facing and the paid evals were not run, since no API keys were available. Mobile uses the same helper but was not run on a device.

Reviewed with sol-loop: 1 round with gpt-6.1-sol, before the rebase. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

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

macroscopeapp Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 89e9ced

Macroscope's review found this PR approvable — Users can explicitly mention their thread’s own machine, with a distinct label and guidance that no self-link is needed. Default execution targets and bare-@ behavior remain unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The composer now includes the thread’s current machine among matching environments and identifies it separately. The server rejects link requests for the caller’s own environment ID. The environment context describes information reported by t3_environment_link.

Changes: Environment linking

Layer / File(s) Summary
Current machine matching
packages/client-runtime/src/composerThreadItems.ts, packages/client-runtime/src/composerThreadItems.test.ts, packages/shared/src/composerContextReferences.ts, apps/mobile/src/i18n/translations/*.json, apps/web/src/i18n/translations/*.json
Matching results include the thread’s current machine and label it “This thread's machine.” The environment context states that t3_environment_link reports whether the specified environment is the machine the user means. Mobile and web translations add the corresponding label.
Self-link request rejection
apps/server/src/peer/PeerLinkRequests.ts, apps/server/src/peer/PeerLinkRequests.test.ts
Requests for the caller’s own environment ID return invalid_request. The test checks that no link-request card is created.

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

Change: Feature

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 0f671

The change adds "This thread's machine" to the @ menu and makes the link tool refuse to link the agent's own machine. No merge-blocking behavior issue was found. The mention is offered only when linked environments are enabled, which matches the guidance it relies on.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the thread's own machine is now mentioned in the composer's @ menu across web, mobile, and server. It follows the conventional commit form and is specific, and the dif…
Description check Passed The description covers the problem, the change, scope, and verification, and it follows the template's sections. It explains the behavior change, links the related discussion, and states what was not …
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.
Full details: Title check

Explanation

The title names the main change: the thread's own machine is now mentioned in the composer's @ menu across web, mobile, and server. It follows the conventional commit form and is specific, and the diff matches it: the @ picker includes the thread's machine, and the server's PeerLinkRequests rejects self-links.

Full details: Description check

Explanation

The description covers the problem, the change, scope, and verification, and it follows the template's sections. It explains the behavior change, links the related discussion, and states what was not tested. It departs from the template in several places. The Scope section says the PR is a behavior change and not a bug fix, and the template says the repo accepts bug fixes, not features. The description also has no linked issue, and it includes a 'Scope and approval' section that the template does not define. The Verification section does give specific results and unverified areas. Most required information is present, so the check passes, but the scope conflict should be raised with maintainers.

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 89e9ced and 0f671db.

Files selected for processing: 24

  • apps/mobile/src/i18n/translations/de.json
  • apps/mobile/src/i18n/translations/en.json
  • apps/mobile/src/i18n/translations/es.json
  • apps/mobile/src/i18n/translations/fr.json
  • apps/mobile/src/i18n/translations/ja.json
  • apps/mobile/src/i18n/translations/ko.json
  • apps/mobile/src/i18n/translations/pt-BR.json
  • apps/mobile/src/i18n/translations/ru.json
  • apps/mobile/src/i18n/translations/sv.json
  • apps/mobile/src/i18n/translations/zh.json
  • apps/server/src/peer/PeerLinkRequests.test.ts
  • apps/server/src/peer/PeerLinkRequests.ts
  • apps/web/src/i18n/translations/de.json
  • apps/web/src/i18n/translations/en.json
  • apps/web/src/i18n/translations/es.json
  • apps/web/src/i18n/translations/fr.json
  • apps/web/src/i18n/translations/ja.json
  • apps/web/src/i18n/translations/ko.json
  • apps/web/src/i18n/translations/pt-BR.json
  • apps/web/src/i18n/translations/ru.json
  • apps/web/src/i18n/translations/sv.json
  • apps/web/src/i18n/translations/zh.json
  • packages/client-runtime/src/composerThreadItems.ts
  • packages/shared/src/composerContextReferences.ts
Files skipped from review as they are similar to previous changes: 1

  • packages/shared/src/composerContextReferences.ts

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

@maria-rcks

maria-rcks commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

Verified unchanged head 89e9ced0277911ce77d28d1b2abdd55a641a1cd2 on this Linux VM using the real dev web app, Playwright from the repository dependencies, Google Chrome, and real Codex gpt-6.1-sol turns. Created a real git repository, added its project through the app, and enabled linked environments in Settings. No mocks, fixtures, or demo data.

  • On github/main (4a3be943c9), searching the current machine's name found no result. A real provider self-link call returned pending and created a link-request card.
  • On this head, the same machine search offers "This thread's machine". Keyboard selection inserts its chip; Backspace removes it.
  • Sent the selected machine mention to Codex. Its real MCP call rejected self-linking without creating a card, then the agent ran pwd and cat README.md locally and returned the correct contents.
  • Nearby behavior: the bare mention trigger offers no machine, file-name search still inserts the README chip, and sending that file mention through Codex reads the correct file.
  • Blacksmith: the two focused files passed (22 tests). vp run check:changed 6577c6b6185167c0e502fa01f9e8e8f2dee6ff25 passed format, lint, knip, GraphQL, affected typechecks, and 61 tests after fetching the parent ancestry into the shallow runner snapshot. GitHub checks are green. No source changes were needed.

Actual provider/tool transcript:

main: t3_environment_link(environmentId=<current environment>)
=> {"status":"pending","turnItemId":"turn-item:link-request:..."}
=> visible "Link a machine to this environment" card

PR: t3_environment_link(environmentId="4e90b0ac-32cc-4aaf-91b7-67933e1f408b")
=> {"_tag":"OrchestratorMcpFailure","code":"invalid_request",
    "message":"That is the machine you run on. Work here: it needs no link."}
(no link-request card)

pwd; cat README.md
=> /home/user/mention-verification
=> machine-mention-verification

Before, main:

main machine-name search has no result

After, PR:

PR offers the current machine with its own-machine label

keyboard selection and removal followed by file mention selection

main self-link call creates an unnecessary link-request card

PR rejects self-linking and the real provider reads the local repository

Not verified

Native iOS/Android and Electron shells were not exercised on this Linux web run. Cross-machine, relay, and tunnel linking were not exercised because this task has one environment. Other providers and statistical prompt evals were not run; the changed guidance was exercised with real Codex turns instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DominikScholz
DominikScholz force-pushed the feat/composer-own-machine-mention branch from 89e9ced to 0f671db Compare November 19, 2026 11:17
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Nov 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants