fix(desktop): preserve authoritative agent avatars - #4984
Open
tellaho wants to merge 2 commits into
Open
Conversation
tellaho
force-pushed
the
tho/agent-avatar-authority
branch
from
August 6, 2026 00:33
2d4e0bf to
abe9adb
Compare
tellaho
marked this pull request as ready for review
August 6, 2026 01:48
tellaho
force-pushed
the
tho/agent-avatar-authority
branch
from
August 6, 2026 02:03
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>
tellaho
force-pushed
the
tho/agent-avatar-authority
branch
from
August 6, 2026 02:08
9a9f79b to
7647d7d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Validation
pnpm test— 4,376 passedpnpm typecheck— passedpnpm check— passed with existing non-error notices