fix(desktop): let channel-member agents into the @mention picker - #3108
Open
PizzzaDog wants to merge 1 commit into
Open
fix(desktop): let channel-member agents into the @mention picker#3108PizzzaDog wants to merge 1 commit into
PizzzaDog wants to merge 1 commit into
Conversation
The mention autocomplete dropped any agent not in the current user's managed-agent list, so agents owned by other people never appeared even when they were members of the channel. Relax the filter so an agent also passes when it is already a channel member; the downstream shouldHideAgentFromMentions gate (Option B) then decides visibility from relay-directory invocability, hiding only agents with an explicit not-invocable directory entry. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: PizzzaDog <[email protected]>
Bartok9
reviewed
Jul 29, 2026
Bartok9
left a comment
Contributor
There was a problem hiding this comment.
Collaborative note (Bartok9)
Small nit-shaped fix — thanks for unpacking the gate.
Concern for merge priority: allowing any isMember agent into the picker before eligibility fully runs can surface owner-only / non-invocable member agents that Option B is designed to hide once directory metadata exists. Stronger siblings (#2605 / #3448) expand the allow-set from directory invocability, not mere membership.
Suggestion: if you still want this PR alive, add an explicit test that a member + directory owner-only (other owner) agent stays hidden after your gate, or close-in-favor of the carrier PR once it lands and leave a credit note.
Not a formal reject — just swarm coordination so we don’t regress #2987’s intended Option B.
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
The desktop @mention autocomplete filters agent identities to the current user's own managed-agent list. Agents owned by someone else never appear in the picker — even when they're already members of the channel — so you can't
@mentiona teammate's agent that's sitting right there in the channel.Fix
One-line filter relaxation in
desktop/src/features/messages/lib/useMentions.ts(addCandidate). An agent now passes the pre-filter if it's in your managed list or it's a channel member:The downstream
shouldHideAgentFromMentionsgate (already present, "Option B") then makes the real visibility decision for member agents: it hides only agents with an explicit not-invocable relay-directory (kind:10100) entry, and shows agents whose invocability is unknown. This change simply stops member agents from being dropped before they reach that gate.Scope notes
isAgentIdentityInManagedListalready returnstruefor non-agents, so human members are unaffected.features/channels/ui/MembersSidebar.tsx:285(member-list display). Left untouched — out of scope for the mention picker; can follow up if desired.Verification
pnpm test— 3631 pass / 0 fail. The member-shown path is already covered byagentAutocompleteEligibility.test.mjs("shows member agents with unknown invocability"); this change removes the pre-filter that blocked reaching it.pnpm typecheck— clean.pnpm exec biome checkon the changed file — clean.Originating discussion: Buzz channel #WC.