镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(agents): show native agent pictures in the Solo agent picker - #1258

Merged
salman1993 merged 2 commits into
mainfrom
claude/solo-agent-avatars-missing-ed41d1
Oct 16, 2026
Merged

salman1993 merged 2 commits into
mainfrom
claude/solo-agent-avatars-missing-ed41d1

Conversation

@salman1993

Copy link
Copy Markdown
Contributor

Problem

In the Solo tab, the Choose follow-up assistant picker showed initials for agents instead of their pictures. The Agents page showed those pictures correctly.

The picker reads avatars from session.agentChoices. When AgentsService.local() turned native identities into LocalAgent, it kept only pubkey, name, relayUrl and owner, so the picture was dropped. After v1 agents were removed, the legacy library no longer supplies artwork for these agents, so the picker had no avatar to show.

Change

  • LocalAgent gains an optional picture, and AgentsService.local() keeps it.
  • createAgentChoices uses a native agent's picture as its choice avatar. It takes priority over legacy library artwork, because native custody holds the current picture.

Display still goes through avatarMedia/avatarSource, so the existing HTTPS/data-URL validation is unchanged.

Testing

  • New choices.test.ts case: a native agent's picture becomes its avatar and wins over older library artwork; an agent with no picture gets no avatar. It fails without the fix.
  • service.test.ts: the local() projection now keeps picture. It fails without the fix.
  • vitest run src/features/agents/choices.test.ts src/features/agents/service.test.ts src/features/sessions/: 417 passed. tsc --noEmit and biome are clean.
  • Agent-run browser check (not committed): the browser build with the localAgentActivity native fixture, given a pack picture. Before the fix the picker showed the initial "L"; after it, the picker showed the pack art.
  • Human check: the author confirmed in the desktop app that their agents' avatars now show in the Solo picker.

No browser journey was added. The unit tests cover the changed contract, and image rendering in AgentChoice is existing behavior.

Remaining

  • Formal agent review hasn't run yet.

🤖 Generated with Claude Code

Native agents' pictures were dropped when the agent service projected
identities into LocalAgent, so session.agentChoices had no avatar for
them and the Solo follow-up assistant picker fell back to initials.
Carry the picture through and use it as the choice avatar, preferring
it over older legacy library artwork.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>
@salman1993
salman1993 marked this pull request as ready for review October 16, 2026 16:23
@salman1993
salman1993 requested a review from a team as a code owner October 16, 2026 16:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T16:27:08.485979Z fe40e53 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fe40e536d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +9 to +10
/** Its profile picture, an HTTPS image URL. */
picture?: string;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the documented artwork ownership

The canonical docs/agents.md contract still defines LocalAgents as containing only { pubkey, name, relayUrl, owner } and states that createAgentLibrary is the sole owner of agent artwork. This change makes picture part of that contract and lets native custody override library artwork, so leaving the documentation unchanged gives future consumers and cleanups incorrect ownership guidance. Update the LocalAgents schema and shared artwork precedence alongside this field.

AGENTS.md reference: AGENTS.md:L76-L79

Useful? React with 👍 / 👎.

@salman1993

Copy link
Copy Markdown
Contributor Author

before and after:

before after

@kalvinnchau kalvinnchau 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.

🤖 Review by Hobbes, Kalvin's AI agent.

No actionable regressions or security defects established in the five-file change. Independent reviews covered native picture propagation, picker consumers, refresh/cache invalidation, owner/relay filtering, URL handling and image sinks.

Reviewed fe40e53. Current head f29ac89 merges main; verified that its PR patches against merge base 330e60b are identical to the reviewed patches apart from hunk line numbers.

Non-blocking existing behavior: clearing a migrated agent's picture can retain inherited persona artwork in the picker (src/features/agents/choices.ts:126–127), while the Agents card shows initials. Making native picture authoritative even when absent would align the views but also remove fallback artwork from failed imports. This predates the change; source-traced, not runtime-reproduced.

Validation: git diff --check passed on the original reviewed candidate. Added tests were inspected but not executed. Package tests, typecheck, browser image rendering/fallback and native IPC were not run. Approval reflects source review, not end-to-end validation; full package checks and UI validation remain recommended before merge.

@salman1993
salman1993 merged commit 4da29a8 into main Oct 16, 2026
32 checks passed
@salman1993
salman1993 deleted the claude/solo-agent-avatars-missing-ed41d1 branch October 16, 2026 17:02
tellaho added a commit that referenced this pull request Oct 16, 2026
…ui-polish

* buzz-app/main:
  fix(agents): show native agent pictures in the Solo agent picker (#1258)

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
johnmatthewtennant added a commit that referenced this pull request Oct 16, 2026
…lation

* origin/main: (139 commits)
  feat(agents): let plugins read each agent's sessions (#1111)
  chore(deps): upgrade vitest to 5.0.4 (#1272)
  feat(plugins): reload folder plugins from the CLI (#1265)
  add channel shared sessions discovery and retrieval (#1254)
  polish Solo activity layout and fold previous steps (#1257)
  fix(agents): clarify model defaults and provider actions (#1177)
  fix(messages): stop the channel timeline jumping back when agents or search read old messages (#1256)
  Add Close other tabs to the tab menu (#1127)
  chore(deps): upgrade virtua to 0.53.5 and port its scroll patch (#1269)
  Auto-tag Berd drafts with a chosen default agent (#1139)
  test: delete styling, markup and call-count trivia tests (#1255)
  fix(hooks): preserve recovery ownership on lefthook 2.2.2 (#1174)
  fix(deps): upgrade vulnerable tls and editor dependencies (#1267)
  chore(terminal): upgrade xterm with compatible navigation (#1268)
  feat(goose): show goose and provider marks on agent cards (#1260)
  fix(agents): show native agent pictures in the Solo agent picker (#1258)
  test(agents): fix main typecheck — add effort to Goose fixture (#1262)
  fix(messages): reject unclaimed file and link drops app-wide (#1075)
  feat(channels): create and read system channels (#965)
  Refine message layout and bubble reading widths (#1218)
  ...
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