Skip to content

fix: scope assistant avatar override to agent ID#93712

Merged
vincentkoc merged 3 commits into
openclaw:mainfrom
lsr911:fix/issue-90890-Bug-You-cannot-give-an-avat
Jun 16, 2026
Merged

fix: scope assistant avatar override to agent ID#93712
vincentkoc merged 3 commits into
openclaw:mainfrom
lsr911:fix/issue-90890-Bug-You-cannot-give-an-avat

Conversation

@lsr911

@lsr911 lsr911 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The local assistant avatar override was stored globally in localStorage without an agentId, causing the same avatar to apply to all agents. Setting a custom avatar for one agent would overwrite the avatar for every other agent.

Root Cause

saveLocalAssistantIdentity() stored { avatar } with no agent identification. loadLocalAssistantIdentity() returned the same avatar regardless of which agent was currently selected.

Fix

  1. LocalAssistantIdentity now includes agentId
  2. saveLocalAssistantIdentity stores the current agent's ID alongside the avatar
  3. loadLocalAssistantIdentity accepts an optional agentId filter — only returns the avatar if it matches (or if no agentId was saved, for backward compatibility)
  4. setAssistantAvatarOverride now accepts and passes through agentId
  5. Callers in app-render.ts pass state.assistantAgentId

Fixes #90890

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. app: web-ui App: web-ui size: XS labels Jun 16, 2026
@clawsweeper

clawsweeper Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed June 16, 2026, 1:14 PM ET / 17:14 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

PR surface: Source +15. Total +15 across 3 files.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: durable storage schema: ui/src/ui/storage.ts, serialized state: ui/src/ui/storage.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Not assessed.
Failure reason: invalid structured output.

This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict.
Keep any merge decision on the normal maintainer review path until ClawSweeper can complete a fresh review.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

Do we have a high-confidence way to reproduce the issue?

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against 6470bb76253b.

Evidence reviewed

PR surface:

Source +15. Total +15 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 3 24 9 +15
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 24 9 +15

What I checked:

  • failure reason: invalid structured output.
  • codex failure detail: Codex review failed for this PR with exit 0 and wrote invalid JSON or schema-invalid output to /home/runner/work/clawsweeper/clawsweeper/artifacts/event/codex/93712.json: decision.rootCauseCluster fixed_by_candidate requires a canonical pull request.
  • codex stderr: No stderr captured.
  • codex stdout: r overrides under one unscoped localStorage record, matching the linked two-agent settings report.","solutionAssessment":"No. The PR scopes a single stored record instead of preserving one avatar per agent, and active render/bootstrap reads still have unscoped no-agent load paths.","visionFit":"not_applicable","visionFitReason":"Pull request review; VISION.md fit is not applicable.","visionFitEvidence":[],"implementationComplexity":"not_applicable","autoImplementationCandidate":"none","rootCauseCluster":{"confidence":"high","canonicalRef":"https://github.com/openclaw/openclaw/issues/90890\",\"currentItemRelationship\":\"fixed_by_candidate\",\"summary\":\"This PR is one implementation candidate for the same per-agent assistant-avatar localStorage bug, while a broader open sibling may become canonical after proof and maintainer acceptance.","members":[{"ref":"https://github.com/openclaw/open.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc vincentkoc self-assigned this Jun 16, 2026
lsr911 and others added 2 commits June 17, 2026 02:43
The local assistant avatar override was stored globally in
localStorage without an agentId, causing the same avatar to
apply to all agents. Setting an avatar for agent A would
overwrite the avatar for agent B.

Fix: include agentId when saving the local avatar override,
and filter by agentId when loading. An override saved for one
agent no longer bleeds into other agents.

Fixes openclaw#90890
@vincentkoc
vincentkoc force-pushed the fix/issue-90890-Bug-You-cannot-give-an-avat branch from a5e2399 to 2afa521 Compare June 16, 2026 18:44
@vincentkoc

vincentkoc commented Jun 16, 2026

Copy link
Copy Markdown
Member

Maintainer repair and verification complete.

The contributor fix was extended into a true per-agent avatar map with scoped reads/writes, one-time legacy global override migration, active-session routing, bare main default-agent handling, correctly guarded identity reload after clear, and safe support for prototype-like agent IDs.

  • Focused proof: node scripts/run-vitest.mjs ui/src/ui/app-render.assistant-avatar.test.ts ui/src/ui/controllers/assistant-identity.test.ts ui/src/ui/controllers/control-ui-bootstrap.test.ts (36 tests passed)
  • Changed-file lint: clean
  • Remote changed gate: node scripts/crabbox-wrapper.mjs run --provider blacksmith-testbox -- env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed passed on Testbox tbx_01kv8w8grdfxdpgjjeyp7mdsnr
  • Fresh autoreview after the final CI lint/type repairs: clean
  • Rebased onto current main and pushed to the contributor branch

@vincentkoc
vincentkoc merged commit 4aba273 into openclaw:main Jun 16, 2026
11 of 13 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 17, 2026
* fix: scope assistant avatar override to agent ID

The local assistant avatar override was stored globally in
localStorage without an agentId, causing the same avatar to
apply to all agents. Setting an avatar for agent A would
overwrite the avatar for agent B.

Fix: include agentId when saving the local avatar override,
and filter by agentId when loading. An override saved for one
agent no longer bleeds into other agents.

Fixes openclaw#90890

* fix(ui): persist assistant avatars per agent

* fix(ui): satisfy scoped avatar checks

---------

Co-authored-by: lsr911 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
crh-code pushed a commit to crh-code/openclaw that referenced this pull request Jun 18, 2026
* fix: scope assistant avatar override to agent ID

The local assistant avatar override was stored globally in
localStorage without an agentId, causing the same avatar to
apply to all agents. Setting an avatar for agent A would
overwrite the avatar for agent B.

Fix: include agentId when saving the local avatar override,
and filter by agentId when loading. An override saved for one
agent no longer bleeds into other agents.

Fixes openclaw#90890

* fix(ui): persist assistant avatars per agent

* fix(ui): satisfy scoped avatar checks

---------

Co-authored-by: lsr911 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: You cannot give an avatar to a specific agent in settings

2 participants