Skip to content

fix(ui): restore configured agent avatars in chat - #139873

Merged
steipete merged 3 commits into
mainfrom
fix/control-ui-agent-avatar
Sep 6, 2026
Merged

steipete merged 3 commits into
mainfrom
fix/control-ui-agent-avatar

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #139594. Thanks @RobertOnline69 for the report.

What Problem This Solves

Fixes an issue where users with a configured agent avatar saw the agent's name but no avatar beside assistant replies in the Control UI transcript, even though the image appeared elsewhere in the UI.

Why This Change Was Made

The transcript suppressed every assistant avatar, including configured images and text avatars. Its shared rendering options now show a resolved configured avatar when the transcript uses an avatar gutter. Saved and streaming replies follow the same decision, preserving compact/subagent layouts and the omission of generic fallback icons. A redundant message-rendering wrapper was removed.

History inspection traced the suppression to 2873fbbc5606 (#121405), already included in both v2026.9.1 and v2026.9.2. No avatar-suppression change was introduced between those tags. This repair restores configured identity while preserving the earlier fallback-icon reduction.

User Impact

Configured agent images and text avatars appear beside assistant replies wherever transcript avatars are enabled. User avatars, compact layouts, and CSS remain unchanged.

Evidence

  • Pre-fix regression: configured image and text cases fail because the avatar is missing; the unconfigured case passes. Additional placement cases rejected an intermediate patch that exposed streaming avatars in compact layouts.
  • Local validation: 276 avatar/message tests and 38 transcript rendering/invalidation tests passed; the corrected final five-case matrix and UI test typecheck passed. Both changed-file gates, workflow checks, and 40 focused CI ownership/command-selection cases passed. Final branch autoreview has no actionable P0–P2 findings.
  • Production: +3 / -6 = -3 lines. CI workflow: +1 / -0. Tests/support: +195 / -0. Docs: +1 / -1. CSS: 0 lines. No new configuration options, environment variables, schema/protocol changes, dependencies, or versions.

Remote before/after

Provider: Blacksmith Testbox, through the repository Crabbox wrapper. The scenario builds the candidate, starts a real Gateway on an isolated state directory and free loopback port, configures a workspace-relative PNG, seeds a synthetic owner, creates a session through Gateway RPC, and loads a persisted assistant reply in Chromium.

Proof Lease Run Result
Original renderer on c54319089356fd06bc58f3d749c30ad98e0912ad tbx_01m1tprbqdhhhp5dvz6at9ws3s 34016805905 Reply displayed; configured avatar missing; intended decodedWidth=0 failure
Final head 1d73309e4bd3efe81868f1817743b11dd83aa2b1 tbx_01m1tsv4absrzvbhqk06v7vtjz 34019203741 40 CI guard cases, full build, five avatar/layout cases, and real-Gateway Chromium E2E passed

The final wrapper attested source tree 2d25d240f2a165f061e998b3ab414c3bc5312b58; the run verified source/test hashes before execution. Chromium decoded one configured assistant image at 128px through an authenticated blob URL. The served bundle changed from /assets/index-DefhjbqO.js to /assets/index-BejWP9fn.js (final SHA-256 269279c5866030916695f777b0bf704a064cfd2e208ebffa38ac2e0138483c2a). Captures were inspected in full and contain synthetic identities only. All task Testbox leases were stopped after retrieving artifacts.

node scripts/run-vitest.mjs test/vitest-ui-e2e-config.test.ts test/scripts/ci-workflow-guards.test.ts -t 'Control UI E2E resource ownership|private Control UI servers|complete real-Gateway command'
pnpm build
node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-transcript-render.test.ts -t 'keeps configured avatar'
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-agent-avatar.real-gateway.e2e.test.ts

The browser proof loads a synthetic persisted transcript; streaming and compact/subagent placement use deterministic rendering tests. No external model turn is claimed.

Initial CI correctly caught omitted registrations in the real-Gateway workflow command and independent inventory assertions; those are fixed and now proved above. The unrelated sandbox hash failure on both this PR and main was traced to shared /tmp/workspace test pollution and is tracked separately in #139902. No assertions or gates were weakened.

Before

Before: configured agent avatar is missing beside the assistant reply

After

After: final head renders the configured agent avatar beside the assistant reply

Use the resolved agent avatar for saved and streaming replies when the transcript shows an avatar gutter. Keep fallback icons and compact-layout avatars suppressed, and remove the redundant message-rendering wrapper.

Fixes #139594. Thanks @RobertOnline69 for the report.
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 3:43 AM ET / 07:43 UTC.

ClawSweeper review

What this changes

Restores configured agent images and text avatars beside saved and streaming chat replies, preserves compact layouts, and adds documentation and regression coverage.

Merge readiness

✅ Ready for maintainer review

Keep open as a useful, well-supported repair: current main still suppresses configured avatars. No actionable defects were found in the introduced changes, and the final commit completes CI registration without changing the previously reviewed rendering behavior.

Priority: P2
Reviewed head: 1d73309e4bd3efe81868f1817743b11dd83aa2b1

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused repair with before/after production-path evidence, complementary layout coverage, and completed CI registration.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The captured final-head evidence exercises transcript projection through an isolated real Gateway and Chromium, recording a decoded configured image beside a persisted reply where the original renderer showed none; served-bundle identity is recorded, with streaming/layout tests supplemental. Remote media retrieval failed in this reviewer environment, without invalidating the supplied production-path evidence.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The captured final-head evidence exercises transcript projection through an isolated real Gateway and Chromium, recording a decoded configured image beside a persisted reply where the original renderer showed none; served-bundle identity is recorded, with streaming/layout tests supplemental. Remote media retrieval failed in this reviewer environment, without invalidating the supplied production-path evidence.
Evidence reviewed 9 items Current main still needs the repair: Fetched main explicitly sets showAssistantAvatar to false in the shared transcript options. The configured-avatar repair is therefore still absent from the inspected main revision.
One rendering decision preserves layout behavior: The introduced predicate requires both gutter placement and a resolved avatar. Saved groups and streams consume these shared options; existing render dependencies already include avatar identity and placement, so changes invalidate memoized rows.
Existing avatar safety and fallback rules are reused: The existing resolver accepts authenticated blob URLs, supported image data, and same-origin paths; text avatars exclude the default fallback and unsafe or path-like values. This patch changes visibility without changing avatar authorization, fetching, or URL validation.
Findings None None.
Security None None.

How this fits together

The Control UI resolves an agent’s configured identity and combines it with session layout and transcript messages. Shared rendering options then determine whether saved and streaming assistant replies display that avatar.

flowchart TD
  A[Configured agent identity] --> B[Resolve image or text avatar]
  C[Session layout] --> D{Avatar gutter enabled?}
  B --> D
  D -->|Configured avatar and gutter| E[Show assistant avatar]
  D -->|Otherwise| F[Omit assistant avatar]
  E --> G[Saved and streaming replies]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -3, Tests +195, Docs 0, Config +1. Total +193 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 6 -3
Tests 5 195 0 +195
Docs 1 1 1 0
Config 1 1 0 +1
Generated 0 0 0 0
Other 0 0 0 0
Total 8 200 7 +193

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #139594
Summary: This PR is the explicit candidate fix for the configured-avatar report; earlier generic-icon suppression is relevant context, while sandbox-test pollution is separate.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Use the existing resolved agent identity consistently in avatar gutters while keeping generic fallback icons and compact-layout avatars suppressed.

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

Yes: configure an agent avatar and load assistant replies in a gutter-layout transcript; current main unconditionally suppresses the avatar. This review verified the source mechanism without executing a reproduction.

Is this the best way to solve the issue?

Yes: the shared rendering predicate is a narrow repair that reuses existing avatar resolution and preserves layout decisions, with complementary rendering and real-Gateway evidence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2a039fc97608.

Labels

Label justifications:

  • P2: Repairs missing configured identity in chat with a limited visual impact and no interruption to message delivery.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The captured final-head evidence exercises transcript projection through an isolated real Gateway and Chromium, recording a decoded configured image beside a persisted reply where the original renderer showed none; served-bundle identity is recorded, with streaming/layout tests supplemental. Remote media retrieval failed in this reviewer environment, without invalidating the supplied production-path evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured final-head evidence exercises transcript projection through an isolated real Gateway and Chromium, recording a decoded configured image beside a persisted reply where the original renderer showed none; served-bundle identity is recorded, with streaming/layout tests supplemental. Remote media retrieval failed in this reviewer environment, without invalidating the supplied production-path evidence.

Evidence

What I checked:

  • Current main still needs the repair: Fetched main explicitly sets showAssistantAvatar to false in the shared transcript options. The configured-avatar repair is therefore still absent from the inspected main revision. (ui/src/pages/chat/components/chat-transcript-projection.ts:302, 2a039fc97608)
  • One rendering decision preserves layout behavior: The introduced predicate requires both gutter placement and a resolved avatar. Saved groups and streams consume these shared options; existing render dependencies already include avatar identity and placement, so changes invalidate memoized rows. (ui/src/pages/chat/components/chat-transcript-projection.ts:302, 1d73309e4bd3)
  • Existing avatar safety and fallback rules are reused: The existing resolver accepts authenticated blob URLs, supported image data, and same-origin paths; text avatars exclude the default fallback and unsafe or path-like values. This patch changes visibility without changing avatar authorization, fetching, or URL validation. (ui/src/lib/avatar.ts:40, 1d73309e4bd3)
  • Behavioral regression coverage: The five-case matrix checks image, text, absent-avatar, hidden-avatar, and footer layouts across two saved replies and a stream. The real-Gateway scenario separately checks a decoded, visible workspace image beside a persisted reply. (ui/src/pages/chat/components/chat-transcript-render.test.ts:46, 1d73309e4bd3)
  • Final-head production-path proof: The captured PR body at sourceRevision d1ff11b9c2dca54d2fa13fca5e2d6ec48f62836b083c8747c4992b5ff4ade552 records an isolated real Gateway and Chromium before/after: the original renderer yielded decodedWidth=0, while the final head decoded one 128px image through an authenticated blob URL beside the reply. It identifies changed served bundles and final run https://github.com/openclaw/openclaw/actions/runs/34019203741. Streaming and compact layouts are explicitly covered by rendering tests, not claimed as live model turns. Attachment and run URLs could not be fetched in this review environment; their pixels and remote logs were not independently inspected. (ui/src/e2e/chat-agent-avatar.real-gateway.e2e.test.ts:95, 1d73309e4bd3)
  • Re-review continuity and CI ownership: Comparison with the earlier reviewed head shows only the workflow invocation and two inventory assertions changed. The renderer and browser scenario are unchanged. The new scenario remains in the serial private-server phase, and the workflow adds it to the existing real-Gateway command without changing permissions, action references, or runner capacity. (.github/workflows/ci.yml:2769, 1d73309e4bd3)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-06T07:01:51.257Z sha 7dfe153 :: blocked before merge. :: none
  • reviewed 2026-09-06T07:14:11.067Z sha 7dfe153 :: needs maintainer review before merge. :: none

@steipete
steipete marked this pull request as ready for review September 6, 2026 07:09
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

The final-head replay and both proof requests are complete. Revision 7dfe1530f916cd8cb83dfb954ddf1a4c84a34af8 passed the full build, all five avatar/layout regressions, and real-Gateway Chromium E2E on Testbox run 34017760064. The PR body now includes the inspected synthetic before/after screenshots, served-bundle identity, lease IDs, commands, and cleanup. Both leases are stopped. No production changes were needed after this reviewed head.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 6, 2026
@steipete
steipete merged commit 379f053 into main Sep 6, 2026
150 checks passed
@steipete
steipete deleted the fix/control-ui-agent-avatar branch September 6, 2026 08:00
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
* fix(ui): restore configured agent avatars in chat

Use the resolved agent avatar for saved and streaming replies when the transcript shows an avatar gutter. Keep fallback icons and compact-layout avatars suppressed, and remove the redundant message-rendering wrapper.

Fixes openclaw#139594. Thanks @RobertOnline69 for the report.

* test(ui): derive avatar layouts through session identity

* test(ui): include avatar proof in real-gateway CI
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 docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Agent avatar no longer rendered on assistant messages in Control UI chat (regression in 2026.9.2)

1 participant