Skip to content

fix(ui): show a neutral placeholder while avatar images load - #146109

Merged
steipete merged 1 commit into
mainfrom
fix/avatar-pending-placeholder
Sep 12, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/avatar-pending-placeholder

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

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.assistant contract 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

  • 1,241 unit tests passed across 17 renderer, sidebar/roster, Agents home, settings/Profile, and chat suites.
  • 16 browser tests passed: delayed success/timeout/invalid-image states, emoji surfaces, Profile, and the isolated real-Gateway workspace-avatar flow beside a persisted assistant reply.
  • Build and performance gate, i18n verification, architecture checks, and changed-file checks passed. The regression tests failed on the original behavior; the final review has no actionable findings.
  • Production: +137/−69 (net +68); tests/support: +302/−108 (net +194); docs: +6/−1 (net +5). Removing the Profile avatar's duplicate failure path offsets part of the shared lifecycle change.
startup JS gzip vs baseline: 352566 B (baseline 354540 B + growth allowance 512 B = growth limit 355052 B; build-variance allowance 64 B; enforcement limit 355116 B; max committed baseline 358400 B)

Synthetic sidebar-roster fixture 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.

Before: fallback avatar while image request is pending

After: a neutral placeholder occupies the same box while the request is pending.

After: neutral pending avatar

After the response: the configured image fills the same box.

After: loaded configured avatar

Validation notes: the first real-Gateway attempt stopped at dashboard --json before 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.

@clawsweeper

clawsweeper Bot commented Sep 12, 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: L maintainer Maintainer-authored PR labels Sep 12, 2026
@steipete
steipete marked this pull request as ready for review September 12, 2026 15:27
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 11:34 AM ET / 15:34 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 528cf88dca4713277ec05e3fee9a627cbf16a944

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused shared-owner repair with convincing visual evidence and meaningful lifecycle coverage; no blocking defect was found.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected browser captures of the sidebar-roster fixture show the shared renderer changing from fallback artwork to a neutral pending box, then displaying the configured image in place. This directly proves the visual change; the reported browser and real-Gateway runs provide supplemental coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected browser captures of the sidebar-roster fixture show the shared renderer changing from fallback artwork to a neutral pending box, then displaying the configured image in place. This directly proves the visual change; the reported browser and real-Gateway runs provide supplemental coverage.
Evidence reviewed 7 items Introduced lifecycle change: The pinned merge-base-to-head diff adds explicit pending, loaded, failed, and absent presentation states, preserves image-event state during rerenders, and retains the existing shared resource leases.
Current main still needs the change: The fetched main renderer still maps pending image promises to is-fallback; it does not implement the proposed neutral loading presentation.
Latest release comparison: The v2026.9.4 source also maps pending images to is-fallback, so that release does not contain this presentation change.
Findings None None.
Security None None.

How this fits together

The 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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +68, Tests +194, Docs +5. Total +267 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 7 137 69 +68
Tests 10 302 108 +194
Docs 1 6 1 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 445 178 +267

Review metrics

Metric Value Why it matters
Production versus test growth Production net +68 lines; tests/support net +194 lines The added lifecycle handling has a stated purpose and replaces Profile's separate failure path.

Technical review

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

Labels

Label changes:

  • add P3: This removes a transient avatar flicker without changing navigation, message delivery, or persisted settings.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Inspected browser captures of the sidebar-roster fixture show the shared renderer changing from fallback artwork to a neutral pending box, then displaying the configured image in place. This directly proves the visual change; the reported browser and real-Gateway runs provide supplemental coverage.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected browser captures of the sidebar-roster fixture show the shared renderer changing from fallback artwork to a neutral pending box, then displaying the configured image in place. This directly proves the visual change; the reported browser and real-Gateway runs provide supplemental coverage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected browser captures of the sidebar-roster fixture show the shared renderer changing from fallback artwork to a neutral pending box, then displaying the configured image in place. This directly proves the visual change; the reported browser and real-Gateway runs provide supplemental coverage.

Label justifications:

  • P3: This removes a transient avatar flicker without changing navigation, message delivery, or persisted settings.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected browser captures of the sidebar-roster fixture show the shared renderer changing from fallback artwork to a neutral pending box, then displaying the configured image in place. This directly proves the visual change; the reported browser and real-Gateway runs provide supplemental coverage.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected browser captures of the sidebar-roster fixture show the shared renderer changing from fallback artwork to a neutral pending box, then displaying the configured image in place. This directly proves the visual change; the reported browser and real-Gateway runs provide supplemental coverage.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected browser captures of the sidebar-roster fixture show the shared renderer changing from fallback artwork to a neutral pending box, then displaying the configured image in place. This directly proves the visual change; the reported browser and real-Gateway runs provide supplemental coverage.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • weiqinl: 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.

@steipete
steipete merged commit c1a39f8 into main Sep 12, 2026
183 of 185 checks passed
@steipete
steipete deleted the fix/avatar-pending-placeholder branch September 12, 2026 15:53
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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.

1 participant