Mention autocomplete never offers remotely-hosted agents (shared relay agent eligibility is unreachable)
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
**Version:** 0.5.2 (also present on current main)
**Setup:** An ACP agent hosted on machine A (via buzz-acp with NIP-OA owner attestation), and Buzz Desktop on machine B owned by the same user. The agent is a member of a shared channel, publishes a kind-0 profile, appears in the member list with the agent chip ("managed by you"), is registered in the relay agent directory, and advertises `respond_to=anyone`.
**Bug:** The `@` mention autocomplete on machine B never offers the agent, so there is no way to send it a p-tag mention from the UI. The members panel shows it; the composer refuses to.
**Root cause:** In `desktop/src/features/messages/lib/useMentions.ts`, `addCandidate` drops any candidate flagged `isAgent` that is not in the *local* managed-agent list:
if (!isAgentIdentityInManagedList(candidate, managedAgentPubkeys)) {
return;
}
This runs *before* `shouldHideAgentFromMentions`, whose `mentionableAgentPubkeys` set (built from `relayAgentIsSharedWithUser` — directory agents with `respond_to=anyone`/allowlist sharing a channel) is meant to make exactly these agents mentionable. Because the earlier filter only consults the local list, that machinery is unreachable dead code for any agent hosted on another machine.
**Suggested fix:** let mentionable relay agents through the first filter:
if (
!isAgentIdentityInManagedList(candidate, managedAgentPubkeys) &&
!mentionableAgentPubkeys.has(pubkey)
) {
return;
}
**Impact:** Any multi-device / team setup where an agent runs on one machine and users chat from another. Current workarounds are thread replies (reply p-tags the parent author) or agent-side content-matching rules instead of real mentions.
Contributor guide
Research direction
Start in desktop/src/features/messages/lib/useMentions.ts at addCandidate, then trace how mentionableAgentPubkeys is built and how shouldHideAgentFromMentions uses it. Verify that a remotely hosted shared relay agent with respond_to=anyone appears in @ autocomplete and can be mentioned from the other device.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100