Skip to content

fix(desktop): simplify duplicate agent provenance - #6401

Open
wesbillman wants to merge 1 commit into
mainfrom
carl/polish-agent-provenance-labels
Open

fix(desktop): simplify duplicate agent provenance#6401
wesbillman wants to merge 1 commit into
mainfrom
carl/polish-agent-provenance-labels

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

  • leave the local same-name agent row unlabelled because locality is implied
  • mark only the remote identity with a compact monitor badge reading Other setup
  • suppress the redundant managed by you text for duplicate owned agents while retaining distinct short npubs and exact-pubkey routing

Testing

  • node --import ./test-loader.mjs --experimental-strip-types --test "src/**/*.test.mjs" (5,129 passed)
  • node_modules/.bin/tsc --noEmit
  • focused Biome check on the three changed files
  • focused Playwright smoke test: duplicate owned agents preserve provenance and exact pubkey selection
  • visual inspection at 1280×720

@wesbillman
wesbillman requested a review from a team as a code owner August 20, 2026 16:36
@wesbillman
wesbillman force-pushed the carl/polish-agent-provenance-labels branch from b996435 to c5a59bc Compare August 20, 2026 16:58
@wesbillman

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-08-20 at 10 47 00 AM Screenshot 2026-08-20 at 11 01 29 AM

Add small cloud icon for now to indicate if agent is running on a difference instance of Buzz.

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>
@wesbillman
wesbillman force-pushed the carl/polish-agent-provenance-labels branch from c5a59bc to aadfe14 Compare August 20, 2026 17:07

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

: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:e2e plus 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-check and git diff --check passed.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants