fix(desktop): preserve authoritative agent avatars - #4984
Conversation
2d4e0bf to
abe9adb
Compare
abe9adb to
9a9f79b
Compare
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
9a9f79b to
7647d7d
Compare
wesbillman
left a comment
There was a problem hiding this comment.
Reviewed exact head 7647d7d813a98223373c977f89e9036af4c90ddd on Wes Billman's behalf.
No blocking findings. I traced the running-card avatar path through the concrete pubkey profile query, fallback resolution, and avatar-dependent Share/Export action gating; the profile remains authoritative once resolved while an absent/blank profile picture falls back to the linked definition. I also traced foreign catalog projection and activation: relay publication fields now remain authoritative for presentation, while the local copy contributes only its linkage id and active/selected state, and Add correctly reuses/reactivates that copy rather than minting another.
The focused unit coverage pins precedence, blank handling, loading behavior, foreign-copy provenance, and publisher-authoritative presentation. A clean merge tree against current origin/main (1399ec1d13c4560f50fd947e504deeea70929751) is conflict-free and preserves the newer runtime-control work. All CI checks reported for the reviewed head are green.
This is a technical review comment, not an approval; approval remains Wes's decision.
wesbillman
left a comment
There was a problem hiding this comment.
Reviewed commit 7647d7d813a98223373c977f89e9036af4c90ddd adversarially. No blocking findings.
I traced both authority boundaries end to end:
- Linked cards resolve the selected concrete agent's kind:0 avatar before the definition fallback, and avatar-dependent Share is held until the profile query settles, preventing a fallback avatar from being snapshotted during initial loading.
- Catalog projections retain only the local copy's linkage id and active state; publisher-controlled display name, avatar, prompt, runtime/model/provider, name pool, and behavior remain sourced from the relay publication. The add flow still resolves the local copy by publisher/persona coordinates and avoids duplicate copies.
I also checked the conflict-free merge tree against current origin/main (1399ec1d13c4560f50fd947e504deeea70929751). Existing focused tests cover precedence, blank/missing fallback, loading-state gating, and foreign catalog authority; CI is green at the reviewed head.
Absorbs the relay half that shipped separately in #5133 (squash commit ad92335): the kind:30179 ingest acceptance hunk in crates/buzz-relay/src/handlers/ingest.rs was byte-identical on both sides, so this merge removes all relay-side changes from this PR's diff. #4999 now carries only the desktop + buzz-core codec half. No rebase, no force-push — history preserved per operator instruction. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz> * origin/main: fix(bench): mention the orchestrator by pubkey when posting the task (#5136) feat(relay): accept kind:30179 private managed-agent events at ingest (#5133) fix(media): require authenticated reads (#4610) fix(desktop): preserve authoritative agent avatars (#4984) fix(desktop): next/back navigation during key creation onboarding (#4978) Alert community owners and admins when a new key joins (#4900) fix(desktop): prevent sidebar prefs from reverting on stale-localStorage boot (#5086) chore(hooks): run desktop typecheck in pre-push (#5110) feat(identity): recover desktop identity from a signed-in phone (#4845) fix(buzz-agent): classify read timeouts distinctly in LLM error messages (#4959) Refine agent runtime controls (#5026) test(desktop): await thread scroll anchor (#3174) Improve desktop mobile pairing flow (#5024) feat(desktop): show selected community in rail (#5000) fix(desktop): stop rate-limited reconnect backfill from tearing down the authenticated socket (#4990) fix(desktop): skip native notifications outside app bundles (#5004) ci: prove the relay-driven mesh lifecycle — discover, join, infer, deny — with real nodes (#3862) fix(desktop): virtualize channel member lists (#4991) Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
…igration * origin/main: fix(bench): mention the orchestrator by pubkey when posting the task (#5136) feat(relay): accept kind:30179 private managed-agent events at ingest (#5133) fix(media): require authenticated reads (#4610) fix(desktop): preserve authoritative agent avatars (#4984) fix(desktop): next/back navigation during key creation onboarding (#4978) Alert community owners and admins when a new key joins (#4900) fix(desktop): prevent sidebar prefs from reverting on stale-localStorage boot (#5086) chore(hooks): run desktop typecheck in pre-push (#5110) feat(identity): recover desktop identity from a signed-in phone (#4845) fix(buzz-agent): classify read timeouts distinctly in LLM error messages (#4959) Refine agent runtime controls (#5026) test(desktop): await thread scroll anchor (#3174) Improve desktop mobile pairing flow (#5024) feat(desktop): show selected community in rail (#5000) fix(desktop): stop rate-limited reconnect backfill from tearing down the authenticated socket (#4990) fix(desktop): skip native notifications outside app bundles (#5004) ci: prove the relay-driven mesh lifecycle — discover, join, infer, deny — with real nodes (#3862) Signed-off-by: Brad Seiler <seiler@squareup.com> # Conflicts: # deploy/charts/buzz/templates/deployment.yaml # deploy/charts/buzz/tests/render_test.yaml # deploy/charts/buzz/values.schema.json # deploy/charts/buzz/values.yaml
Category: fix
User Impact: Agent cards and catalog listings now show the avatar belonging to the identity they represent.
Problem: Running agent cards could show a stale definition avatar instead of the concrete agent profile, while adding another publisher's catalog entry could let local edits repaint that publisher's listing. This made agent identity look inconsistent across My Agents and the Agent Catalog.
Solution: Treat the concrete agent pubkey profile as authoritative for running-card avatars, with the linked definition as fallback. Keep relay publications authoritative for foreign catalog presentation while using local copies only for linkage and selection state.
Changes
File changes
desktop/src/features/agents/lib/agentCardAvatar.ts
Adds the explicit avatar precedence rule for running agent cards and blocks avatar-dependent actions until the authoritative profile query settles.
desktop/src/features/agents/lib/agentCardAvatar.test.mjs
Covers profile precedence, definition fallback, blank avatar handling, and the profile-loading transition for linked-agent actions.
desktop/src/features/agents/lib/personaCatalogRelay.ts
Keeps publisher-provided catalog identity and behavior fields authoritative after a local copy is added.
desktop/src/features/agents/lib/personaCatalogRelay.test.mjs
Verifies local copies contribute linkage and selection without overriding publisher presentation.
desktop/src/features/agents/ui/UnifiedAgentsSection.tsx
Uses the concrete agent profile avatar before the linked definition avatar on running-agent cards.
Reproduction Steps
Running agent card uses the agent profile avatar
Use two visibly different, publicly reachable image URLs: A for the saved definition and B for the running agent profile.
buzz users set-profile --avatar <image-B-url>.Before this fix, the My Agents card and share flow preferred image A whenever the linked definition had an avatar.
Catalog listing remains publisher-authoritative
This scenario requires a second Buzz identity so the entry is foreign to the account under test.
Validation
pnpm test— 4,376 passedpnpm typecheck— passedpnpm check— passed with existing non-error notices