Repository navigation
fix(ui): preserve initials for missing user avatars - #115976
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 1:20 PM ET / 17:20 UTC. ClawSweeper reviewWhat this changesRoutes connected same-origin user-avatar URLs through the existing trusted loader so a missing avatar leaves readable initials visible after Control UI chat rerenders. Merge readinessThe patch remains a focused, well-proven Control UI bug fix with no newly identified correctness or security defect. It should stay open for the assigned maintainer’s normal merge decision because it carries the protected Priority: P2 Review scores
Verification
How this fits togetherControl UI chat receives attributed sender identity data from the Gateway and renders each sender’s avatar or initials beside transcript messages. The avatar resolver turns a trusted avatar URL into a safe image source or a missing result, which controls whether the chat avatar slot displays an image or deterministic initials. flowchart LR
A[Gateway sender identity] --> B[Chat transcript]
B --> C[Avatar URL resolver]
C --> D[Trusted avatar loader]
D --> E[Image source or missing result]
E --> F[Chat avatar slot]
F --> G[Visible sender initials]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +145. Total +149 across 3 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the focused loader-path repair after the current-base merge gate succeeds, retaining the unit and Chromium rerender regression coverage as the contract for missing same-origin avatars. Do we have a high-confidence way to reproduce the issue? Yes. The PR documents a real authenticated production 404 and a public Chromium regression path that triggers a live Reply rerender after the missing-avatar response, then verifies that initials remain visible without an image source. Is this the best way to solve the issue? Yes. Routing the connected same-origin route through the existing bounded trusted-avatar loader centralizes the missing-image result at the existing ownership boundary instead of relying on transient AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cf927f7b1b1b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
3c3df77 to
c978624
Compare
|
Maintainer disposition of the current ClawSweeper moves for head
The missing-avatar case receives the canonical
The supplied production screenshot is not uploaded because it contains private team-user identities. The browser proof above is synthetic and safe for the public PR. |
dbf001d to
6d06ddd
Compare
|
Merged via squash.
|
* origin/main: (683 commits) fix(discord): bound webhook send body reads (openclaw#109076) fix(ui): preserve initials for missing user avatars (openclaw#115976) feat(ui): add provider icons to coding catalogs (openclaw#115956) fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285) fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927) fix(test): isolate plugin install fixtures (openclaw#116008) fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729) fix(sms): isolate validated webhook quotas per sender (openclaw#104862) fix(sessions): recover deleted chats without endless retries (openclaw#115974) fix(restart): log errors from restart hook callbacks instead of swallowing (openclaw#108847) feat(ui): enable tool-loop detection from Labs (openclaw#115983) fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown (openclaw#100998) fix(memory): keep rollbacks compatible after recall metadata upgrade (openclaw#116003) fix(ui): derive cron timezone suggestions (openclaw#115973) fix(scripts): bound dependency pin git lookups (openclaw#110570) fix(skills): preserve configless workshop apply upgrades (openclaw#115982) fix(gateway): cancel unread cron webhook bodies before SSRF release (openclaw#111236) fix(voice-call): pin Twilio webhook verification to the configured public path (openclaw#112800) fix(memory): make legacy session backfill rollback re-applicable (openclaw#116004) fix(security): fence external hook job name in isolated-agent prompts (openclaw#112501) ... # Conflicts: # CHANGELOG.md # src/agents/tool-search-catalog.ts # src/agents/tool-search.test-support.ts # src/agents/tool-search.ts
* commit 'e80fe942c8dae4b264acb2b501466224e842aa61': fix(gateway): stop start-time repair from retargeting managed services (openclaw#115935) fix(plugins): scope Codex relay with tool matchers (openclaw#109603) fix(discord): bound webhook send body reads (openclaw#109076) fix(ui): preserve initials for missing user avatars (openclaw#115976) feat(ui): add provider icons to coding catalogs (openclaw#115956) fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285) fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927) fix(test): isolate plugin install fixtures (openclaw#116008) fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729) fix(sms): isolate validated webhook quotas per sender (openclaw#104862) fix(sessions): recover deleted chats without endless retries (openclaw#115974) fix(restart): log errors from restart hook callbacks instead of swallowing (openclaw#108847) feat(ui): enable tool-loop detection from Labs (openclaw#115983) fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown (openclaw#100998) fix(memory): keep rollbacks compatible after recall metadata upgrade (openclaw#116003)
* origin/main: (823 commits) fix(memory): return early for blank searches (openclaw#116034) fix(tool-search): long-lived gateways leak heap from finished embedded runs (openclaw#114767) feat(harness): report copilot code-mode engagement on the attempt result (openclaw#115913) fix(ui): compact the macOS gateway picker menu (openclaw#115977) perf(codex): stream large CLI session JSONL scans (openclaw#115997) cron: reject webhook URLs with embedded credentials (openclaw#51822) refactor(agents): remove retired Codex CLI parser (openclaw#116017) feat(mac): hand off gateway-owned settings panes to the dashboard (openclaw#115999) fix(gateway): declare viewer presence explicitly instead of deriving it from subscriptions (openclaw#116001) test(plugins): include dreaming sidecar in startup expectation (openclaw#116018) fix(openai): prevent GPT-Live errors from stalling (openclaw#115582) fix(gateway): stop start-time repair from retargeting managed services (openclaw#115935) fix(plugins): scope Codex relay with tool matchers (openclaw#109603) fix(discord): bound webhook send body reads (openclaw#109076) fix(ui): preserve initials for missing user avatars (openclaw#115976) feat(ui): add provider icons to coding catalogs (openclaw#115956) fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285) fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927) fix(test): isolate plugin install fixtures (openclaw#116008) fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729) ...
…nclaw#115833) The gateway avatar endpoint (/api/users/<id>/avatar) always requires authentication. The old code returned the plain URL for same-origin requests without an auth header, causing the browser's <img> fetch to get a 401 and never display the avatar. Always route through loadIdentityAvatar() which sends available credentials (Bearer token or session cookie) and produces a same-origin blob URL. When no credential is available the fetch itself fails with 401, and the caller gracefully shows the initials fallback instead of a broken-image icon. Also fixes: - Update test expectations from direct avatar URLs to blob URLs - Add missing fetch/createObjectURL mocks in sidebar viewer presence test - Resolve merge conflict with openclaw#115976 (preserve initials for missing avatars) which partially addressed same issue but kept a fallback path Co-Authored-By: Claude <[email protected]>
* fix(ui): preserve initials for missing user avatars * test(ui): prove missing avatar fallback in browser * chore: defer avatar note to release workflow * test(ui): stabilize avatar fallback browser proof
What Problem This Solves
Attributed Control UI messages can show a broken image glyph instead of readable initials when a user has neither an uploaded avatar nor a Gravatar.
Why This Change Was Made
The canonical user-avatar endpoint correctly returns
404for that state. Connected same-origin avatar routes previously bypassed the shared loader and rendered directly as<img>URLs. The image error briefly selected the initials fallback, but a later Lit render reconciled the wrapper back to its non-fallback class and exposed the broken image again.Route connected same-origin user avatars through the existing bounded, origin-pinned loader too. A missing avatar now resolves to no image source before rendering, while the loader retains the existing authorization, cross-origin, cache, upload-retry, MIME, size, and credential-boundary behavior.
User Impact
People without profile images keep deterministic initials in attributed chat messages. Uploaded avatars and Gateway-proxied Gravatars continue to load through the same shared cache.
Evidence
team.openclaw.ai: the affected/api/users/<profile-id>/avatarrequest returned404 application/jsonwith{"ok":false,"error":{"type":"not_found"}}; comparison user-avatar requests returned200 image/png.class="chat-avatar-slot"after the image failure.404avatar response, removal of the imagesrc, visible initials fallback state, and a subsequent rerender. Focused Testbox proof: 2 files, 44 tests passed.ui/src/e2e/chat-attributed-identity.e2e.test.tspassed both cases. The missing-avatar case observes the initial404, holds the uncached retry open, clicks the real Reply action to rerender the chat pane, provesHremains visible with no image source and no third request, then settles the retried404and rechecks the fallback. Run 30471844830.The production screenshot contains private team-user identities, so it is intentionally not uploaded to this public PR. The Chromium proof uses synthetic identities and its terminal result is public above; a source-blind production hard-reload check will follow deployment.
AI-assisted; root cause, production request/DOM behavior, regression coverage, security boundary, and final branch diff were independently reviewed.