Repository navigation
fix(ui): consistently load and cache user avatars - #114444
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 4:53 AM ET / 08:53 UTC. ClawSweeper reviewWhat this changesThis PR makes Control UI roster, profile, sidebar, and attributed-chat avatars use a shared authenticated, revision-aware blob cache backed by the connected Gateway’s canonical user-avatar route. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep this protected PR open for maintainer handling. The revised branch appears to address the earlier credential-origin blocker and has strong focused test coverage, but the supplied Chromium run is described rather than attached as inspectable redacted after-fix evidence; the PR should retain its real-behavior-proof gate until that artifact is visible on the PR. Likely related people: steipete is the current Control UI avatar implementation contributor (low-confidence routing signal; current-main history could not be read in this read-only execution environment). Priority: P1 Review scores
Verification
How this fits togetherThe Control UI receives presence and user-profile data from its connected Gateway, then renders avatars in roster, profile, sidebar, and chat components. This change validates the connected Gateway avatar URL, fetches protected images with the current connection authorization, and shares the resulting browser blob across those components. flowchart LR
A[Gateway connection and credentials] --> B[Avatar origin and auth state]
C[Presence and profile avatar route] --> D[Canonical route validation]
B --> D
D --> E[Authenticated blob cache]
E --> F[Sidebar roster and profile]
E --> G[Attributed chat avatars]
F --> H[Initials fallback on failure]
G --> H
Decision needed
Why: The patch changes where Control UI browser credentials may be sent. The contributor describes robust tests and a Chromium scenario, but the supplied discussion does not include the claimed redacted artifact for a maintainer to inspect directly. Before merge
Agent review detailsSecurityNone. PR surfaceSource +201, Tests +349. Total +550 across 11 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Attach a redacted after-fix Chromium artifact that visibly shows the canonical authenticated Gateway request, successful image decode, and one-request blob reuse across profile and sidebar, then merge only after the refreshed exact-head checks and protected review are satisfactory. Do we have a high-confidence way to reproduce the issue? No high-confidence independent reproduction was run in this review. The reported defect is source-reproducible from the prior roster path using an email where the Gateway avatar route requires the durable profile ID, and the contributor supplies focused regression coverage for that path. Is this the best way to solve the issue? Yes, conditionally: one shared, route-validating avatar loader is a narrower maintainable solution than separate credential and cache behavior in each Control UI surface. The merge gate remains inspectable real-browser evidence for the credential boundary, not another parallel implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bc54710daf38. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Maintainer verification for head The credential boundary is enforced before Exact local proof: The real Chromium scenario applies the gateway’s production CSP, proves exactly one authenticated request to the connected Gateway-origin route, verifies the PNG actually decodes ( Both the hostile-origin no-fetch regression and the browser's network, image-decoding, and cache-sharing assertions are directly inspectable in the PR. |
|
Maintainer disposition of the current ClawSweeper rank-up moves:
No migration is involved: this is a bounded in-memory browser blob cache, not a persistent cache or database schema. |
|
Merged via squash.
|
* fix(ui): consistently load and cache user avatars * fix(ui): retain avatar images across profile updates
What Problem This Solves
Fixes an issue where people using the Control UI would see a user's avatar in one place but missing or stale in the online-user list, profile, sidebar, or attributed chat, especially when gateway authentication requires a bearer token.
Why This Change Was Made
Use the durable user-profile ID and one canonical gateway avatar route across roster, profile, and chat. Fetch protected images with the connected gateway's current device/token/password authorization; deduplicate concurrent requests in a bounded, revision-aware blob cache; keep blobs alive until their images settle; and preserve existing avatar image elements while Lit live() restores fallback state during image, profile, or credential changes.
Pin every credentialed request to the exact normalized connected Gateway origin and canonical profile-avatar pathname before calling fetch. Reject external hosts, lookalike hosts, userinfo spoofing, protocol-relative origins, and unrelated Gateway endpoints.
Keep uploaded-avatar storage, ETag revalidation, and Gravatar caching in the existing gateway endpoint.
User Impact
A user's uploaded avatar or gateway-proxied Gravatar loads consistently in the sidebar, online-user list, profile preview, and shared chat. The same avatar is fetched once, profile updates invalidate the correct cached image, and missing or failed images still show readable initials.
Evidence
AI-assisted; source, gateway contracts, browser behavior, cache lifecycle, credential-origin security, and regression coverage were independently reviewed.