Repository navigation
fix(control-ui): retain unchanged agent avatar artwork - #174239
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. |
Keep the fallback face stable while an agent publication preserves its ID, and construct only the selected eye and mouth artwork. Protect subtree retention through the native identity avatar owner.
f811090 to
f157fc2
Compare
|
Codex review: needs changes before merge. What this changesThis PR memoizes the agent ID and constructs only the selected SVG features to retain fallback avatar nodes across equivalent identity publications. Example: Agent forge is republished with its name changed from Before to After.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open as an explicitly paused performance experiment; the focused change remains absent from main, and no concrete introduced defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI identity avatar receives agent snapshots and lazily renders deterministic SVG fallback artwork when no text avatar is selected. flowchart LR
A[Identity publication] --> B[AgentIdentityAvatar]
B --> C[Agent ID memo]
C --> D[Face derivation]
D --> E[Selected SVG features]
E --> F[Retained avatar DOM]
Technical reviewBest possible solution: Promote the narrow avatar-owner optimization only if comparable browser measurements show reduced mutations without worse blocking time. Do we have a high-confidence way to reproduce the issue? Source shows equivalent agent snapshots invalidating a newly allocated face object and reconstructing feature arrays; the PR reports a failing-before/passing-after regression, but no execution was performed in this read-only review. Is this the best way to solve the issue? The change addresses reconstruction in the existing renderer, preserves artwork and ID updates, and avoids another state owner; browser measurements must establish its performance value. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8114ddb5ce62. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +9, Tests +28. Total +37 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 9:55 AM ET / 13:55 UTC. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
…tions (openclaw#174239) AgentAvatarFace derived its face from props.agentId in a memo that returned a fresh object on every read, so each publication that replaced the agent object (same id) re-ran the memo and rebuilt the SVG's eye/mouth groups, and eyes()/mouths() constructed all four variants each time before indexing one. On Team this was the largest remaining transcript DOM churn (~3,900 fallback-SVG rewrites per board-dashboard reload). The id is now memoized as a string so unchanged ids stop propagation, and only the selected eye/mouth variant is created. Artwork is unchanged. Seven interleaved AWS pairs: transcript face mutations 6,528 -> 0; LoAF blocking 1,670 -> 1,666 ms (flat), total LoAF 4,756 -> 4,569 ms. Runtime +9 LOC. Native avatar e2e passes. CI: the only failure is the recurring control-ui-e2e-suite.test.ts scenario-timeout in UI shard 1 (also seen on openclaw#173870); the file passes 20/20 isolated on both heads. Admin-merged.
What Problem This Solves
During a signed-in dashboard deep-link reload and subsequent live updates, unchanged agent identities repeatedly rebuild their fallback SVG feature nodes. Campaign attribution isolated thousands of these child-list mutations (3,468 in the transcript, plus 408 in the pane, in one capture).
User Impact
Agent faces retain their existing artwork and layout while same-ID identity publications keep their SVG children. No configuration, Gateway state, or public API changes.
Why This Change Was Made
Memoize the ID before deriving the face so an equal string stops propagation. Select the eye and mouth artwork directly instead of eagerly constructing all eight variants and indexing the result. The superseded eager-construction path is removed.
Production delta: +9 lines (39 added, 30 removed) in
agent-avatar-face.tsx; the ID equality boundary and lazy branch selection account for the growth. The regression adds 28 test lines. This body carries the release-note context; the changelog remains release-owned.Evidence
Final head
f157fc2ebb92, baselinea09c26b193b4. Seven interleaved pairs on one quiet AWS c7a.4xlarge, with repository headless Chromium, production bundles, and the Team-scale live-event bench. One warmup pair excluded. Values are median (IQR width).The non-regression gate passes narrowly for blocking: whole-capture blocking is effectively flat (1,670→1,666 ms), with lower live-window blocking (800→765 ms). Whole-capture LoAF duration falls 3.9% (4,756→4,569 ms), and all measured transcript face child-list churn disappears. Do not interpret the 4 ms blocking difference as a meaningful speedup. Boot-only blocking is slightly higher within overlapping IQRs. Whole-capture LoAF duration improves in six of seven pairs; blocking improves in four of seven. All measured SVG markup is identical, and the synthetic before/after frames were inspected.
The fixture has the same traffic on both sides, with synthetic emoji avatars omitted to expose the SVG fallback. Current main's benchmark expects retired controller registrations; both measured variants omit only that obsolete controller instrumentation in a temporary harness copy. Native LoAF/mutation/RPC probes and the live event stream remain. All temporary source changes are restored before validation. No private captures or real account data are used.
AWS lease
cbx_86bea4379c5e; run. The earlier candidate was replaced after type checking caught unchecked factory indexing; only the final-head figures above apply.The new
AgentIdentityAvatarregression fails on the original code by observing replaced SVG children, then passes with this change. Final-head UI type checking passes, and both focused avatar files pass on AWS: 8 tests, 4.37 s wrapper wall time. The changed test file also passes locally in 3.52 s. Fresh independent review is clean through P2.Full UI E2E ran once on this final head with
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts: 809 files passed, 4 failed, 1 skipped; 3,525 tests passed, 2 failed, 5 skipped, in 6,143.68 s. The skipped file wasdesktop-resize.real-gateway.e2e.test.ts. Focused investigation resolved three failed files without source changes:tooltip-first-activation.e2e.test.tsandworkboard-native-bundle.e2e.test.tsworkboard-distribution.e2e.test.tsextensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.tsa09c26b193b4. The other case in that file passes. No permission guard was weakened.chat-message.test.tsx,config-page-state.ts, andsessions-page-state.tsreproduce on baseline. All three candidate dead-export findings (OLLAMA_APP_GUIDED_MIN_CONTEXT_TOKENS,redactSensitiveText,I18nController) also reproduce there.CI remains red, not waived by this lane. Final-head CI passed production/test types, lint, the other UI unit shards and selected E2E, but UI unit shard 1 failed in
control-ui-e2e-suite.test.ts:scenario-timeouthit the 60 s outer timeout, then seven cases failed on the unjoined fixture (624 files and 6,966 tests passed in that shard). A focused run under the exact pinned Bun fork passes all 20 tests on both candidate (30.42 s) and baseline (30.48 s). The latest completed main UI run also passed. The timeout is therefore unreproduced, not claimed fixed or proven inherited. No CI rerun or unrelated source repair was used to chase green.Native avatar E2E passes. Fresh independent review is clean through P2. The campaign lead owns the remaining CI decision and landing; this PR is ready for review and will not be merged by this lane.