fix(desktop): simplify duplicate agent provenance - #6401
Conversation
b996435 to
c5a59bc
Compare
Mark viewer-owned agents from another Buzz setup with a compact cloud marker and accessible tooltip. Reuse the marker in mention autocomplete and Channel members while preserving exact-pubkey mention routing. Co-authored-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
c5a59bc to
aadfe14
Compare
jedwards27
left a comment
There was a problem hiding this comment.
:bot: Jude’s code review agent
Verdict: REQUEST CHANGES
Reviewed: 2e7583bf5ad5926ca32367af9954bc79d108e42d..aadfe147640e624d4be1528423b436b75e584bda (exact live head aadfe147640e624d4be1528423b436b75e584bda)
Risk: medium — user-visible identity provenance at an ambiguous same-name selection boundary.
Blocking finding
The promised visible Other setup badge is absent, and its replacement disclosure is unreachable in Channel members.
desktop/src/features/agents/ui/OtherSetupAgentMarker.tsx:18-27 renders only a 12px cloud glyph. “From another Buzz setup” exists only as its accessible name and delayed tooltip; no visible Other setup text is rendered. In Channel members, that trigger is nested under the pointer-events-none identity subtree at desktop/src/features/channels/ui/MembersSidebarMemberCard.tsx:163-195, so a sighted pointer user cannot open the tooltip to learn what the unfamiliar glyph means. Mention suggestions likewise expose an unfocusable marker inside rows with tabIndex={-1} (desktop/src/features/messages/ui/MentionAutocomplete.tsx:127-142), leaving no keyboard disclosure.
The new E2E explicitly asserts that the remote row does not contain Other setup (desktop/tests/e2e/mentions.spec.ts:381-387), locking in the opposite of the PR’s visible-badge contract without checking tooltip reachability.
Please render a compact persistent Other setup text badge/chip on only the remote identity in both surfaces, keep the local row unlabelled and retain the short npubs, then cover visible text, keyboard selection, and a narrow viewport. A tooltip can remain supplementary, but provenance should not depend on it.
Contracts traced
Exact-pubkey routing remains intact: candidate coalescing is pubkey-keyed, selection records the chosen pubkey, and send-time revalidation refreshes managed/relay ownership before admitting tags (desktop/src/features/messages/lib/useMentions.ts:249-303,721-815; desktop/src/features/messages/lib/agentMentionRevalidation.ts:47-101). isOtherSetupAgent correctly excludes exact local managed-agent matches and requires viewer ownership (desktop/src/features/agents/lib/otherSetupAgent.ts:4-36). No relay protocol, IPC, persistence, or tenancy contract changed.
Validation at matching clean head
- Full Desktop JS suite: 5,129/5,129 passed.
- TypeScript typecheck: passed.
pnpm build:e2eplus focused duplicate-owned-agent Playwright journey: 1/1 passed; exact pubkey tags remained distinct.- Exploratory built-UI hit test reproduced that the Channel-members marker receives no pointer target.
- Focused provenance/mapping rows: 7/7 passed;
just file-size-checkandgit diff --checkpassed. - CI at final sample: macOS build and both Desktop integration shards passed; Desktop Core and four smoke shards were still in progress.
Residual risk: focused UI evidence used the renderer/mock bridge, not native WKWebView or a live relay. Native harness was absent from this checkout. Those gaps do not weaken the reproduced blocking UI failure.


Summary
Other setupmanaged by youtext for duplicate owned agents while retaining distinct short npubs and exact-pubkey routingTesting
node --import ./test-loader.mjs --experimental-strip-types --test "src/**/*.test.mjs"(5,129 passed)node_modules/.bin/tsc --noEmitduplicate owned agents preserve provenance and exact pubkey selection