Repository navigation
fix(desktop): only offer channel-roster agents in the @-mention picker - #9527
Pleximus29 wants to merge 2 commits into
Conversation
In a channel, agents that are not members of it were offered as mention candidates. Filter agent candidates to roster members when a channel is set; people and the no-channel case are unchanged. Fixes block#9521 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Yanik <yanik@brunetenterprises.com>
🔐 Codex Security Review
|
joahg
left a comment
There was a problem hiding this comment.
🤖 The filter looks right to me: in a channel, agents need isMember to be offered, while people and the no-channel case (DM/new message) are unchanged, and the two new tests cover both sides.
Leaving this as a comment rather than an approval because it changes what users see in the desktop mention picker. It needs a sign-off from a design or core-team reviewer, especially on whether hiding non-member agents is the intended behavior. Today, mentioning an agent that isn't in the channel is one way people discover they need to add it, so it may be worth confirming whether that path should get a hint instead of disappearing entirely.
Nit: the new comment ("In a channel, only agents on its roster are offered.") restates the condition right below it and could be dropped.
Review nit on block#9527. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Yanik <yanik@brunetenterprises.com>
|
Thanks. I've dropped the comment in 23846d5. On hiding versus a hint: for us, hiding is the intended behaviour. Some agents in our community are private to one person. A "not in this channel, add it?" hint would point other members at an agent they aren't meant to know about, while hiding reveals nothing. The no-channel case (DM / New Message) is unchanged. To be clear, hiding in the picker isn't a privacy boundary. We checked with a fresh member in no channels. It could still list every agent's kind:0 profile and every kind:30177 record (owner and allowlist) straight from the relay. I filed that separately as #9528. This PR only makes the channel picker match what the channel can actually reach. |
joahg
left a comment
There was a problem hiding this comment.
🤖 Thanks. The only change since my last pass is dropping the comment, and the filter logic is the same.
Your reasoning on hiding makes sense: a hint would leak the existence of private agents, and it's good that #9528 tracks the relay-side listing, since the picker isn't a privacy boundary. I don't have further findings. I'm still leaving this as a comment rather than an approval, because desktop mention-picker behavior needs sign-off from a design or core-team reviewer.
Summary
In a channel, the 0.X desktop @-mention picker offered agents that are not on that channel's roster. One cause is that locally managed agents always pass
getMentionableAgentPubkeys. This change filters the final candidate list inbuildMentionCandidatesto!isAgent || isMemberwhenmentionChannelIdis set. People, and the case with no channel, are unchanged. This is a 0.X bug fix, not feature work.Related issue
Fixes #9521
Testing
mainwithout the fix it fails: expected[Ada, Xenophon], got[Ada, Argus, Fizz, Scout, Xenophon].src/**/*.test.mjs,scripts/*.test.mjs) passes 6,972 of 6,972.🤖 Generated with Claude Code