fix(ui): scope local assistant avatar overrides per agent (#90890)#90931
fix(ui): scope local assistant avatar overrides per agent (#90890)#90931hanZeng-08 wants to merge 1 commit into
Conversation
…0890) The Control UI stored the assistant avatar override under a single global localStorage key (openclaw.control.assistant.v1). As a result, every agent shared the same avatar: setting one agent's avatar overwrote all others. - Change loadLocalAssistantIdentity/saveLocalAssistantIdentity to accept an optional agentId and persist overrides under an agents map - Migrate legacy flat avatar entries on save (the old avatar is preserved as a fallback until the user saves a per-agent override) - Update loadAssistantIdentity and setAssistantAvatarOverride to pass the current agent id through to storage - Add tests proving main and worker agents can have independent avatars Test plan: - pnpm test ui/src/ui/controllers/assistant-identity.test.ts (5/5 pass) Closes openclaw#90890
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close this PR as superseded by the newer canonical avatar-scoping branch; the central bug is still real, but this branch is a weaker duplicate and should not remain a landing candidate. Canonical path: Focus review and proof on #91533 as the canonical per-agent assistant-avatar storage fix, then close duplicate branches to avoid migration-policy drift. So I’m closing this here and keeping the remaining discussion on #91533. Review detailsBest possible solution: Focus review and proof on #91533 as the canonical per-agent assistant-avatar storage fix, then close duplicate branches to avoid migration-policy drift. Do we have a high-confidence way to reproduce the issue? Yes. Current main and v2026.6.6 read and write every local assistant avatar override through one unscoped localStorage key, matching the linked multi-agent overwrite report. Is this the best way to solve the issue? No. Agent-scoped storage is the right layer, but this branch is no longer the best landing path because #91533 covers the same bug across the render/bootstrap/controller callers with safer fallback and clear semantics. Security review: Security review cleared: No concrete security or supply-chain concern found; the diff is limited to Control UI localStorage handling and adjacent tests. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 8ded75628437. |
|
Verified locally:
|
|
Thanks @hanZeng-08 for the fix work and the local verification on #90931. Clownfish is closing this PR as superseded by #91533 because both PRs address the same #90890 root cause: assistant avatar overrides were stored without per-agent scoping. The canonical path is #91533, which now carries the newer per-agent storage approach and real behavior proof for review. Your source PR, proof notes, and contribution remain part of the trail here, and attribution/credit can be carried forward through the canonical thread. If this branch covers a different reproduction path that #91533 does not handle, please reply and maintainers can reopen or split it back out. |


Fixes #90890
Comment for Issue #90890 — Agent avatar changes overwrite all agents
Summary
The Control UI stores the assistant avatar override in
localStorageunder a single global key (openclaw.control.assistant.v1). Because the key is not scoped by agent, setting an avatar for one agent overwrites the avatar for every other agent.Root Cause
ui/src/ui/storage.ts:351-379defines:And
assistant-identity.ts:83-98calls these without passing an agent id.Proposed Fix
Scope the localStorage entry by agent id while preserving backward compatibility for legacy flat entries.
storage.tsassistant-identity.tsFiles Changed
ui/src/ui/storage.tsloadLocalAssistantIdentity/saveLocalAssistantIdentityui/src/ui/controllers/assistant-identity.tsui/src/ui/controllers/assistant-identity.test.tsTest Results
New tests verify:
mainandworkeragents can have different local avatarsmain's avatar does not affectworkerloadAssistantIdentityapplies the override only for the matching agentVerification Command
pnpm test ui/src/ui/controllers/assistant-identity.test.tsNext Step
Ready branch with the fix and regression tests. I can open a PR immediately if this looks good.