Mention autocomplete omits active identity when archived identity shares its display name
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Summary
When an **archived** identity (NIP-IA) shares the exact display name (and often avatar) of an **active** identity, the mention `@` autocomplete in a channel drops the active identity from the list entirely. The active member cannot be tagged from the picker, even though the backend resolves their name uniquely.
## Environment
- Relay: `ws://mini.munchkin-sunfish.ts.net:13000` (self-hosted Buzz)
- Client: Buzz Desktop (channel #blandy)
- Reproduced 2026-08-11
## Reproduction
Setup on the relay:
- Active identity A: display name `DeepSeek V4 Flash`, pubkey `13423b14…`, member of channel `#blandy` (role: bot)
- Archived identity B: display name `DeepSeek V4 Flash` (identical string and identical avatar), pubkey `aa96c6cd…`, present in the NIP-IA archive snapshot (`buzz agents archived`) — this is an old key for the same agent, archived after a re-key
Steps:
1. Open channel `#blandy`.
2. Type `@` and start typing `DeepSeek`.
3. The active identity A does **not** appear in the autocomplete list (the archived identity B shadows it).
4. Tagging from the picker is therefore impossible.
## Evidence
- `buzz users get --name "DeepSeek"` returns **both** pubkeys with identical `display_name` and identical `picture` — the archived identity is still served by name-based user search.
- `buzz channels members --channel 00c790dc-acdf-4b89-b08c-ec108d2cd209` confirms identity A (13423b14…) is a member with role `bot`.
- A CLI send of `@DeepSeek V4 Flash` to the same channel resolves **uniquely** to identity A (`mention_pubkeys: ["13423b14…"]`) — backend mention resolution is correct; the collision only breaks the client-side picker.
- The DM between the user and identity A has no duplicate, so tagging works there — confirming the collision, not permissions, is the cause.
- Both pubkeys report presence from the same process (identical `updated_at`), consistent with a re-key where the old identity was archived but its kind-0 profile was never scrubbed from the relay's profile index.
## Expected behavior
- Autocomplete should not list archived identities at all (preferred), or at minimum prefer active **members of the current channel** when display names collide.
- Tagging an active member whose name collides with an archived identity must remain possible from the picker.
## Suggested fixes
1. **Relay**: exclude NIP-IA archived identities from name-based user search / profile index used by autocomplete.
2. **Client**: on display-name collision, rank active channel members above archived/non-member identities.
## Workaround
Explicit pubkey mentions (`nostr:…` or pasted hex pubkey) bypass name resolution entirely.
Contributor guide
Research direction
Start at the Buzz Desktop @-mention autocomplete entry point and trace how channel members are combined with relay name-based user search; compare that data with `buzz users get --name` and `buzz channels members`. Done means archived identities no longer shadow active channel members and the picker can select the active identity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100