Skip to content

fix(ci): wait for forwarded avatar imports before assertions - #146729

Merged
vincentkoc merged 1 commit into
mainfrom
fix/ui-avatar-import-fence-20260913
Sep 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/ui-avatar-import-fence-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Unblocks #133331

What Problem This Solves

Fixes a Control UI test race where the forwarded-agent face assertion can run before its render-triggered dynamic import settles.

User Impact

No production behavior changes. This maintainer-directed prerequisite addresses the exact observed validation blocker in PR133331, not a general main-CI cleanup. It allows the existing Sessions lifecycle repair to be validated without changing avatar rendering or weakening its assertions.

Why This Change Was Made

The shared avatar renderer loads face artwork asynchronously. The existing expected-face table branch now awaits vi.dynamicImportSettled() immediately before its unchanged vi.waitFor, face-presence, and no-initials assertions.

Only one test line changes. The six cases and their order, mocks, timeouts, production code, and Sessions files remain unchanged.

Evidence

  • Baseline: PR133331 run 34736493043, job 103668835308 failed "renders face for forwarded agent research with null" at chat-message.test.ts:2622; 6,704 tests passed. The relevant test, owner, and configuration are identical on protected main 9fbbfa35bd0026ea890438efc7e4b2b6b460dee7.
  • Independent source and plan reviews accepted this native dynamic-import synchronization. This is an identified asynchronous-import race, not a claim about measured import duration.
  • Fresh static review found no actionable P0-P2 findings. Targeted formatting, lint, and git diff --check passed.
  • Fresh isolated AWS proof at exact acd1ad36a92ad36a0783513545e3bcec2003dd67: the existing six-case table passed 6/6 in its original order in a fresh process without prewarming; the complete identity-avatar-view sibling passed 20/20 with no skips. Selected one-path check:changed passed. All three commands exited 0 with joined process trees and the reviewed source hash unchanged. Proof run.
  • Earlier local collection stopped before executing cases because the shared UI dependency installation was incomplete; it was not reinstalled or reconciled. Those attempts are not counted as runtime passes.
  • Exact-head hosted CI run 34737311250 passed, including the required openclaw/ci-gate. This prerequisite does not bypass the blocked UI PR's own checks.

@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 04:11
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 12:55 AM ET / 04:55 UTC.

ClawSweeper review

What this changes

The PR waits for dynamically imported avatar artwork before checking forwarded-agent faces in the Control UI test.

Merge readiness

✅ Ready for maintainer review

Keep open with no actionable findings. The synchronization remains absent from current main and addresses the documented validation blocker for the separate Sessions repair.

Priority: P3
Reviewed head: acd1ad36a92ad36a0783513545e3bcec2003dd67

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused synchronization fix with unchanged assertions, an established sibling pattern, and successful exact-head UI checks.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored test-only PR changes no production owner; exact-head UI CI passes support the synchronization repair, and no external-contributor runtime-proof gate applies.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored test-only PR changes no production owner; exact-head UI CI passes support the synchronization repair, and no external-contributor runtime-proof gate applies.
Evidence reviewed 8 items Verified introduced change: The pinned merge-base-to-head diff adds only the import-settlement await; all six cases, assertions, mocks, and timeout settings remain unchanged.
Production asynchronous boundary: The shared avatar renderer imports agent-avatar-face.ts during rendering and resolves its result through Lit’s until directive. The sibling tests already use dynamicImportSettled for pending artwork.
Vitest dependency contract: The patch directly calls Vitest’s API. Its v5.0.0 declaration explicitly supports awaiting imports initiated by synchronous calls, including additional imports started while waiting; OpenClaw declares Vitest 5.0.0.
Findings None None.
Security None None.

How this fits together

The Control UI renders forwarded messages using the source agent’s identity and lazily loaded face artwork. This change synchronizes the test with that loading step before checking the rendered avatar.

flowchart LR
  A[Forwarded message fixture] --> B[Chat avatar renderer]
  B --> C[Lazy face artwork import]
  C --> D[Rendered agent face]
  C --> E[Test waits for imports]
  E --> F[Existing avatar assertions]
  D --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +1. Total +1 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 0 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 0 +1

Review metrics

None.

Technical review

Best possible solution:

Retain the existing avatar assertions and synchronize them with the renderer’s actual asynchronous import boundary.

Do we have a high-confidence way to reproduce the issue?

No deterministic current-main reproduction was established here. Source confirms the asynchronous import boundary, and the captured discussion records the corresponding CI failure; this read-only review did not run tests.

Is this the best way to solve the issue?

Yes. Vitest’s import-settlement API matches the identified asynchronous boundary while preserving the existing DOM assertions and timeouts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 176184c2e6f3.

Labels

Label changes:

  • add P3: This is a focused test-reliability repair with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored test-only PR changes no production owner; exact-head UI CI passes support the synchronization repair, and no external-contributor runtime-proof gate applies.

Label justifications:

  • P3: This is a focused test-reliability repair with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored test-only PR changes no production owner; exact-head UI CI passes support the synchronization repair, and no external-contributor runtime-proof gate applies.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head diff adds only the import-settlement await; all six cases, assertions, mocks, and timeout settings remain unchanged. (ui/src/pages/chat/components/chat-message.test.ts:2621, acd1ad36a92a)
  • Production asynchronous boundary: The shared avatar renderer imports agent-avatar-face.ts during rendering and resolves its result through Lit’s until directive. The sibling tests already use dynamicImportSettled for pending artwork. (ui/src/components/identity-avatar-view.ts:259, acd1ad36a92a)
  • Vitest dependency contract: The patch directly calls Vitest’s API. Its v5.0.0 declaration explicitly supports awaiting imports initiated by synchronous calls, including additional imports started while waiting; OpenClaw declares Vitest 5.0.0. (packages/vitest/src/integrations/vi.ts:469, f441c6fab25e)
  • Current main still needs synchronization: The corresponding current-main table still starts vi.waitFor without first settling the render-triggered imports. (ui/src/pages/chat/components/chat-message.test.ts:2620, 176184c2e6f3)
  • Latest release comparison: v2026.9.4 contains the older synchronous initials-based table, rather than this newer face assertion or its proposed synchronization. (ui/src/pages/chat/components/chat-message.test.ts:2570, 3a9d69db306c)
  • Exact-head hosted validation: GitHub confirms all three checks-ui jobs and openclaw/ci-gate succeeded at the reviewed head in run 34737311250. The captured PR body additionally reports isolated passes for the six-case table and 20 sibling tests; those isolated results were not independently executed here. (acd1ad36a92a)

Likely related people:

  • steipete: 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.

@vincentkoc
vincentkoc merged commit 32bf352 into main Sep 13, 2026
136 of 137 checks passed
@vincentkoc
vincentkoc deleted the fix/ui-avatar-import-fence-20260913 branch September 13, 2026 11:17
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to zachisfine/openclaw that referenced this pull request Sep 13, 2026
* temp/pr-146799: (70 commits)
  test: reuse explicit fallback config fixtures (openclaw#146948)
  fix(computer): return fresh window observations after actions (openclaw#146822)
  refactor(feishu): remove unreachable requester topic selection (openclaw#146904)
  improve(gateway): reduce CPU spent listing agent-owned sessions (openclaw#137745)
  fix(ui): avoid recapturing chat drafts during UI updates (openclaw#146884)
  fix(ui): show system uptime in the debug overlay (openclaw#146960)
  fix(retry): honor waits beyond the native timer limit (openclaw#145718)
  fix(ui): keep chat history idle when run status changes (openclaw#146802)
  fix(ui): reuse persisted text during chat streaming (openclaw#146831)
  refactor(qa): share harness drift result construction (openclaw#146903)
  test(agents): coordinate settings lock contention (openclaw#146949)
  fix(worker): avoid repeatedly serializing screenshot history (openclaw#146907)
  fix(secrets): stop buffered upload writes after cancellation (openclaw#146840)
  perf(doctor): avoid unnecessary state runtime imports (openclaw#146926)
  improve: reduce compaction request estimation work (openclaw#146961)
  fix(ci): wait for forwarded avatar imports before assertions (openclaw#146729)
  perf(workers): skip configured Git author lookups (openclaw#146833)
  fix: admit borrowed memory writes through the agent database owner (openclaw#146760)
  fix(discord): prevent voice playback gaps and stale turn controls (openclaw#146798)
  improve: reduce worktree filesystem stalls and archive syncs (openclaw#146906)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'ccfd2377cd07d1ad3a583ba64d08e29a065f7061': (1587 commits)
  fix(ui): avoid recapturing chat drafts during UI updates (#146884)
  fix(ui): show system uptime in the debug overlay (#146960)
  fix(retry): honor waits beyond the native timer limit (#145718)
  fix(ui): keep chat history idle when run status changes (#146802)
  fix(ui): reuse persisted text during chat streaming (#146831)
  refactor(qa): share harness drift result construction (#146903)
  test(agents): coordinate settings lock contention (#146949)
  fix(worker): avoid repeatedly serializing screenshot history (#146907)
  fix(secrets): stop buffered upload writes after cancellation (#146840)
  perf(doctor): avoid unnecessary state runtime imports (#146926)
  improve: reduce compaction request estimation work (#146961)
  fix(ci): wait for forwarded avatar imports before assertions (#146729)
  perf(workers): skip configured Git author lookups (#146833)
  fix: admit borrowed memory writes through the agent database owner (#146760)
  fix(discord): prevent voice playback gaps and stale turn controls (#146798)
  improve: reduce worktree filesystem stalls and archive syncs (#146906)
  fix(ui): avoid extra chat rail work while replies stream (#146883)
  improve(ui): speed up populated Usage timelines (#146947)
  test(gateway): retain auth recovery failure diagnostics (#146925)
  fix(tests): create private temporary home directories (#146931)
  ...

# Conflicts:
#	test/tsconfig/tsconfig.core.test.agents-other.json
#	test/tsconfig/tsconfig.core.test.agents-root.json
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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