Skip to content

fix(control-ui): retain unchanged agent avatar artwork - #174239

Merged
steipete merged 2 commits into
mainfrom
steipete/coldload-agent-face-memo
Oct 16, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/coldload-agent-face-memo

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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, baseline a09c26b193b4. 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).

Metric Baseline Candidate
Transcript face SVG child-list records, entire capture 6528 (224) 0 (0)
Transcript face SVG child-list records, live window 4696 (136) 0 (0)
LoAF blocking, entire capture (ms) 1670 (42) 1666 (79.5)
LoAF total duration, entire capture (ms) 4756 (339.5) 4569 (124)
LoAF blocking, live window (ms) 800 (70.5) 765 (66)
LoAF total duration, live window (ms) 2518 (231) 2424 (134.5)
LoAF blocking, boot window (ms) 876 (58.5) 889 (97.5)
Live RPCs 173 (0) 173 (0)

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 AgentIdentityAvatar regression 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 was desktop-resize.real-gateway.e2e.test.ts. Focused investigation resolved three failed files without source changes:

Failed file/check Evidence and outcome
tooltip-first-activation.e2e.test.ts and workboard-native-bundle.e2e.test.ts The fresh box lacked WebKit. After installing the repository's pinned WebKit, both files pass: 4 tests, 36.76 s.
workboard-distribution.e2e.test.ts The benchmark's early UI build contained zero packaged plugin assets. The canonical plugin inventory is captured at UI build time. Rebuilding after runtime/plugin artifacts existed added 33 plugin asset files; the unchanged final head then passes (1 test, 3.23 s). Baseline also passes. This was test artifact preparation, not an avatar regression.
extensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.ts The same “Private mutation boundary is writable by another POSIX principal” failure reproduces on baseline a09c26b193b4. The other case in that file passes. No permission guard was weakened.
Standalone changed checker All ten selected test type graphs, UI production types, lint and format pass. Max-lines errors in chat-message.test.tsx, config-page-state.ts, and sessions-page-state.ts reproduce 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-timeout hit 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.

Before: final baseline, synthetic live transcript

After: final candidate, unchanged SVG artwork

@clawsweeper

clawsweeper Bot commented Oct 16, 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.

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.
@steipete
steipete force-pushed the steipete/coldload-agent-face-memo branch from f811090 to f157fc2 Compare October 16, 2026 13:40
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

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

  • Before: The label updates while unchanged fallback face features are replaced.
  • After: The label updates while the same face feature nodes remain mounted.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch appears correct and has a useful retention regression, but its performance benefit remains experimental after a related candidate increased blocking time.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied maintainer-authored classification exempts ordinary contributor proof gating; the complete body supplies test claims but no current-candidate shipped-browser capture or measurements, and explicitly leaves those campaign results pending.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Live identity publications repeatedly rebuild unchanged fallback avatar artwork after a dashboard deep-link reload.
Reason: The maintainer-authored experiment follows the UI owner's documented direction to cut repeated rendering work at its owner, with an explicit measured acceptance gate.

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
Reviewed head: f157fc2ebb9247fc588fe79e6b4283b544bdad22

Before merge

  • Complete next step - Have the campaign lead explicitly lift the do-not-merge hold before landing.

Findings

None.

Tests

  • Missing end-to-end proof: The body leaves current-candidate browser mutation/LoAF comparisons and native-avatar/full-UI E2E pending; the reported baseline regression result was not independently executed.
Agent review details

How this fits together

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

Technical review

Best 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

  • Deterministic fallback face rendering keeps the original intent (43b8092: The Solid artwork migration preserved agent geometry, host classes, deterministic selection, and lazy fallback loading.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 43b8092 adds ui/src/components/agent-avatar-face.tsx:7 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 43b8092704a9; files: ui/src/components/agent-avatar-face.tsx)

PR surface

Source +9, Tests +28. Total +37 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 39 30 +9
Tests 1 28 0 +28
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 67 30 +37

Labels

Label changes:

  • add P2: Repeated avatar reconstruction is a bounded Control UI performance problem with no established outage or lost user state.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Repeated avatar reconstruction is a bounded Control UI performance problem with no established outage or lost user state.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Supply the planned interleaved browser comparison showing mutation reduction without a LoAF blocking regression.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 16, 2026, 9:55 AM ET / 13:55 UTC.

@steipete steipete changed the title experiment(control-ui): retain agent avatar face nodes [do not merge] fix(control-ui): retain unchanged agent avatar artwork Oct 16, 2026
@steipete
steipete marked this pull request as ready for review October 16, 2026 13:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T14:00:14.782150Z f157fc2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit bb642e1 into main Oct 16, 2026
169 of 174 checks passed
@steipete
steipete deleted the steipete/coldload-agent-face-memo branch October 16, 2026 16:12
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…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.
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 P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant