Repository navigation
fix(ui): show a neutral placeholder while avatar images load - #146109
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 11:34 AM ET / 15:34 UTC. ClawSweeper reviewWhat this changesThe Control UI shows a neutral placeholder while avatar images load and moves Profile agent avatars onto the shared renderer. Merge readiness✅ Ready for maintainer review The change remains useful: current main and the latest release still expose fallback artwork during loading. The patch and inspected visual evidence support the intended result, with no actionable correctness or security findings. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI turns agent and user identity metadata into avatars across navigation, settings, and chat. Its shared image loader handles authenticated images, while the renderer chooses the loading, image, or fallback presentation. flowchart LR
A[Identity metadata] --> B[Shared avatar renderer]
B --> C[Image configured?]
C -->|No| F[Emoji or generated fallback]
C -->|Yes| D[Shared image loader]
D -->|Pending| E[Neutral placeholder]
D -->|Decoded| G[Configured image]
D -->|Failed| F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +68, Tests +194, Docs +5. Total +267 across 18 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one shared avatar lifecycle across surfaces, with neutral pending presentation and fallback artwork reserved for absent or failed images. Do we have a high-confidence way to reproduce the issue? Yes, from source: hold a configured avatar request while opening an agent surface; current main explicitly selects fallback presentation during the pending promise. The supplied before capture shows that symptom; this review did not execute it. Is this the best way to solve the issue? Yes. Extending the shared renderer and removing Profile's separate failure handling keeps loading behavior consistent without introducing another loader or setting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 444925653034. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Related: #141476
Additional instructions
This branch is in the main repository, so maintainers can edit it directly. GitHub’s fork-collaboration toggle applies only to cross-repository PRs.
What Problem This Solves
Fixes an issue where users opening agent surfaces would briefly see fallback faces or emoji while configured avatar images were still loading. It affected authenticated images in the sidebar, switcher, New conversation menu, Agents home, identity chips, settings, and chat.
Why This Change Was Made
The shared renderer now distinguishes absent, pending, loaded, and failed images. Pending images keep a neutral background in the same box; only missing or failed images reveal fallback artwork. Controllers preserve configured sources during authenticated fetches, and the Profile agent avatar now uses the shared renderer instead of its separate image/failure path.
Image state survives unchanged-source rerenders, including the promise-to-blob handoff. Cached decoded images become loaded before paint, and adding an image to an existing fallback enters pending immediately. Existing resource leases, system-agent product marks, and the chat
img.chat-avatar.assistantcontract remain intact.User Impact
Configured avatars appear without flashing another identity first or shifting layout. Agents without an image still show their emoji or stable generated face. Updated Control UI documentation describes this behavior; release-owned changelogs are untouched.
Evidence
Synthetic
sidebar-rosterfixture at 1280×800, with avatar requests held by Playwright. Extra Agents home and chip/switcher captures are retained locally; the mock was stopped by port after capture.Before: fallback artwork appears during the held image request.
After: a neutral placeholder occupies the same box while the request is pending.
After the response: the configured image fills the same box.
Validation notes: the first real-Gateway attempt stopped at
dashboard --jsonbefore browser assertions, with exit 1 and no stderr. The test now includes its structured failure reason in diagnostics; the final full rerun passed. No timeouts, retries, baselines, or assertions were weakened.