You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: @ menu offers no machines when the client is paired only to the thread's server #40174
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Use a desktop client that is paired to one environment, server A. Server A has the peer links capability and Linked environments turned on in Labs.
Link server A to a second environment, server B, so that agents on A can work on B. Do not pair B in this client.
Open a thread on server A, type @ and then the start of B's name.
Expected behavior
The @ menu offers B as a machine. Server A already links to B, so the agent on A can act on that mention. The client also already knows the link, because ChatComposer fetches A's links through useLinkedEnvironments for thread search.
Actual behavior
The @ menu offers no machines. Threads on B do show up, because thread search covers linked environments. The machine list does not.
In apps/web/src/components/chat/useComposerMenuItems.ts, the machine candidates (mentionableEnvironments) come only from useEnvironmentIdentities(), which is the environments paired in this client. The linkedEnvironments map that the hook already receives feeds thread search but never the machine list. A client paired only to the thread's own server therefore has no machines to offer, because matchComposerEnvironmentItems also excludes the thread's own environment.
macOS desktop app, with the client paired to one environment that links to others.
Workaround
Pair every linked environment into the client as well. The links then have to be kept in sync by hand in each client.
Possible fix
Append the thread environment's linked environments that this client has not paired to mentionableEnvironments, named as the link names them (linkedEnvironments already resolves the client's name where one exists). We run this locally:
Activity