Repository navigation
refactor(ui): avoid redundant presence work in avatar lists - #133548
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 5:17 PM ET / 21:17 UTC. ClawSweeper reviewWhat this changesThis PR avoids recalculating live presence for prepared avatar lists and reuses the session-owner avatar renderer. Merge readinessKeep open for explicit maintainer handling: this is a focused, net-negative Control UI repair with no source-level blocker found, while the Priority: P3 Review scores
Verification
How this fits togetherThe Control UI combines Gateway presence data with durable session owners and participants to render chat-header and sidebar avatar lists. Those rendered identities then determine which live viewers remain visible. flowchart LR
A[Gateway presence payload] --> B[Presence projection cache]
C[Session owner and participants] --> D[Avatar list renderer]
B --> D
D --> E{Prepared list supplied?}
E -->|Yes| F[Render prepared avatars]
E -->|No| G[Filter live session viewers]
F --> H[Chat header and sidebar]
G --> H
Decision needed
Why: The source repair is coherent, but the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource -16, Tests -6. Total -22 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the lazy prepared-list selection, complete exact-head validation, and satisfy any outstanding review follow-up before merging. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible with high confidence: render a facepile with either prepared empty-list property after caching a real presence payload, then assert the original projection remains cached. The focused regression test encodes both variants, but this read-only review did not execute it. Is this the best way to solve the issue? Yes: selecting prepared data before the live-viewer projection prevents unnecessary cache mutation without broadening the cache or adding a second path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 343fe90926c0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Reviewed the cache owner, facepile callers, owner/participant renderer, sidebar display branches, header projection, and sibling presence filtering. The fix avoids live projection entirely for prepared sources; it removes duplicate rendering without adding another cache or exclusion rule. Production delta: +22/-38, net -16. Test delta: +27/-33, net -6. Validation on 83c56e0:
The PR records the separate archive-attribution and channel-image-fallback investigations explicitly. Authenticated production browser proof was unavailable; this is deterministic application/browser proof, not a production deployment claim. Read the latest ClawSweeper review: it has no correctness or security findings and recommends this repair. Its remaining requests are explicit maintainer handling, exact-head validation, and checking the latest review follow-ups. Landing is explicitly authorized by the maintainer; this review and its before-merge items have now been read. There are no additional code changes or rank-up moves to apply. Live main rules require Exact-head CI run 33335694063 is green for 83c56e0. Proceeding through native |
* origin/main: (55 commits) test: include v2026.8.1 release navigation (#133581) fix: stop cloud work before unrelated provider inspection finishes (#133476) fix(e2e): keep delete fixture target-compatible (#133526) fix(release): detect optional target E2E capability (#133525) fix(package): publish readable dist inventory (#133549) docs: add complete v2026.8.1 maintainer change index (#133585) fix(browser): preserve contextless worker and iframe sessions (#133571) fix(voice): discover configured provider candidates (#133507) refactor(ui): simplify chat rendering and lifecycle state (#133567) test: reduce maturity fixture cleanup time (#133566) improve: speed up legacy imports and transcript replacement (#133546) docs: add draft v2026.8.1 release notes (#133557) test: guard multi-project Vitest cache ownership (#133554) fix(memory): clarify default agent scope in command help (#133560) fix(clawdock): keep credentials out of diagnostic output (#133547) refactor(ui): avoid redundant presence work in avatar lists (#133548) fix(agents): recognize internal requester completion replies (#133543) fix: prevent duplicate queued user messages in chat clients (#133542) chore(ui): refresh control ui locales (#133544) fix(beam): restart delivery when the receiver changes (#133533) ...
…cked-delivery * origin/main: (261 commits) fix(clawdock): keep credentials out of diagnostic output (openclaw#133547) refactor(ui): avoid redundant presence work in avatar lists (openclaw#133548) fix(agents): recognize internal requester completion replies (openclaw#133543) fix: prevent duplicate queued user messages in chat clients (openclaw#133542) chore(ui): refresh control ui locales (openclaw#133544) fix(beam): restart delivery when the receiver changes (openclaw#133533) fix(models): recover /models browse from a replaced prepared catalog (openclaw#133221) perf(terminal): reuse control scans and remove repeated sanitization work (openclaw#133527) perf(agents): prepare only consumed tool and skill diagnostics (openclaw#133512) fix(line): offer the card command only on LINE (openclaw#132895) fix: keep Android publication independent of core release (openclaw#133471) refactor(agents): simplify compaction accounting (openclaw#133521) refactor(plugins): simplify registration lifecycle policy (openclaw#133364) perf(plugins): avoid eager loader imports for active registry reads (openclaw#133518) refactor(ui): consolidate chat rendering ownership (openclaw#133508) test(auto-reply): prepare memory flush model capabilities (openclaw#133532) fix(ui): replace startup hourglasses with capacity-aware rings (openclaw#133470) fix(talk): preserve provider conversation order in browser transcripts (openclaw#133493) fix(ui): deduplicate participant and viewer avatars (openclaw#133519) feat(ui): add CRT terminal theme (openclaw#133495) ...
Related: #133519
What Problem This Solves
Prepared participant and online-avatar lists unnecessarily recompute live presence whenever they render. Because presence keeps a single cached payload, these unused computations also evict the projection reused by neighboring sidebar rows.
Why This Change Was Made
Resolve live presence only when the facepile actually needs it. Reuse the existing participant-avatar renderer and read participant data directly from the session, removing duplicate markup and redundant arguments. Tests now use the registered custom-element types rather than mirrored interfaces and casts.
This keeps the deduplication from #133519 at its existing identity and presentation boundaries. Production code is +22/-38 (net -16); tests are +27/-33 (net -6), including two new cache-reuse regressions.
User Impact
Owner and participant faces still appear once in chat and dashboard headers. Prepared avatar lists stop rebuilding and discarding live-presence state. No configuration, persistence, protocol, or visual-design changes.
Evidence
Review follow-ups
Two source-derived, pre-existing edge cases were identified during the broader review and remain outside this cache/rendering cleanup. They are not reproduced regressions of this patch:
archivedBy, while the Gateway participant preview excludes the session owner. Investigate a participant archiving another person's session; repair attribution/count ownership together rather than decrementing a truncated preview in the UI.