Skip to content

fix(desktop): preserve authoritative agent avatars - #4984

Open
tellaho wants to merge 2 commits into
mainfrom
tho/agent-avatar-authority
Open

fix(desktop): preserve authoritative agent avatars#4984
tellaho wants to merge 2 commits into
mainfrom
tho/agent-avatar-authority

Conversation

@tellaho

@tellaho tellaho commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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

  1. Run an agent whose pubkey profile avatar differs from its linked definition avatar.
  2. Open My Agents and verify the running card shows the pubkey profile avatar.
  3. Add another publisher's Agent Catalog entry, then rename it and change its avatar locally.
  4. Return to the Agent Catalog and verify the publisher's original name, avatar, and instructions remain visible while the entry stays selected.

Validation

  • pnpm test — 4,376 passed
  • pnpm typecheck — passed
  • pnpm check — passed with existing non-error notices

@tellaho
tellaho force-pushed the tho/agent-avatar-authority branch from 2d4e0bf to abe9adb Compare August 6, 2026 00:33
@tellaho
tellaho marked this pull request as ready for review August 6, 2026 01:48
@tellaho
tellaho requested a review from a team as a code owner August 6, 2026 01:48
@tellaho
tellaho force-pushed the tho/agent-avatar-authority branch from abe9adb to 9a9f79b Compare August 6, 2026 02:03
tellaho added 2 commits August 5, 2026 19:03
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
tellaho force-pushed the tho/agent-avatar-authority branch from 9a9f79b to 7647d7d Compare August 6, 2026 02:08
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.

1 participant