Skip to content

fix(test): own UI animation and legacy database setup - #138296

Merged
steipete merged 2 commits into
mainfrom
codex/fix-submenu-animation-test-ownership
Sep 4, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/fix-submenu-animation-test-ownership

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Two UI fixtures could race the behavior they were meant to test. The dropdown owner test could receive animationstart after the finite animation had finished and throw before exercising sibling replacement. The attachment-recovery test booted the app before creating its legacy version-1 IndexedDB fixture, so the app could create version 2 first and make seeding fail with VersionError.

The original failures are release UI CI and PR E2E shard 6/7. Both fixtures are shared by the release candidate and main. Neither failure establishes a production focus or storage regression.

Why This Change Was Made

Extract the existing duringElementAnimation helper into shared test support and reuse it in the three animation-sensitive owner cases. It holds a real finite CSS animation at interior progress with native running state; public submenu operation promises are joined after the held action. Existing focus, visibility and navigation assertions remain, including final focus after property hiding.

Seed the legacy database on an inert document at the same origin before booting the app, using the existing payload-upgrade test pattern. Keep the explicit version-1 database and committed legacy attachment row, assert its version, then exercise real app upgrade, destination confirmation, attachment restoration, reload and zero sends. This removes the setup race without substituting current-schema data or altering production storage.

Evidence

  • Both complete dropdown browser files pass all 49 cases in candidate and main contexts. Three controlled browser-response faults fail the intended focus, stale-hide and retirement assertions; dependency files remain unchanged.
  • The original unchanged dropdown owner file passes 21 local cases. A native completion diagnostic produces a related missing-event failure; it is not presented as an exact reproduction of the delivered-event CI failure.
  • The unchanged attachment case passes locally when seeding wins the race. Waiting for the unchanged app's real version-2 database before its original version-1 seed deterministically reproduces the exact CI VersionError. The repaired recovery and payload suites pass all 20 cases in their original file orders, including blocked upgrade, legacy draft/queue migration, reload, exact attachment bytes and no-send outcomes.
  • Full Linux UI proof passes 902 files, 14,500 tests and one intentional skip on the unchanged release production code plus the three-file animation test overlay. All 37,373 input hashes match before/after. This run predates the additional recovery-fixture repair; the separate 20-case browser proof covers that change.
  • Production: 0 lines changed. Tests and test support: +85/−80, net +5. No dependency, schema, runtime behavior, timeout, retry or assertion relaxation.

The complete changed-file gate passed for the recovery repair, including UI E2E types, formatting, lint, i18n and all three dead-export scans. Its fresh managed P0–P2 review is clean with zero findings; unchanged animation files retain their byte-verified clean review and full-gate evidence. Recovery proof ran on macOS arm64 with Node 26.8.1, Vitest 4.1.11 and Playwright 1.62.1. Required hosted CI33883137819 passed on final head 1428931e748240c23373b259d428f6cbd8696461: 90 successful jobs, 14 intentional scope skips, zero failures/cancellations. Prior failed receipts remain unchanged.

Inspectable Browser Proof

Captured output from the linked full Linux UI run, using pnpm --dir ui test --testTimeout=30000 --isolate on Node 24.20.0 and real Chromium:

✓  chromium  src/components/web-awesome-dropdown-owner.browser.test.ts > Web Awesome submenu owner > keeps the new sibling focused when replacement interrupts an opening animation 314ms
✓  chromium  src/components/web-awesome-dropdown-owner.browser.test.ts > Web Awesome submenu owner > does not let an interrupted close retire a reopened child branch 632ms
✓  chromium  src/components/web-awesome-dropdown-owner.browser.test.ts > Web Awesome submenu owner > returns to the surviving level before a property hide animation finishes 218ms
Test Files  902 passed (902)
Tests  14500 passed | 1 skipped (14501)

The installed Web Awesome 3.12.0 dropdown-item, dropdown and animation helper modules were inspected directly. Public submenu methods await updates and return tracked animation promises; the animation helper waits for native completion before removing its class, and dropdown ownership retires before closing animation completes. Dependency-owner hashes match the reviewed source, main and Linux proof. This addresses the completed ClawSweeper review's requested trace and unavailable dependency checkout without a production workaround.

The shared IndexedDB owner and full draft recovery owner were inspected along with the original fixture history and sibling migration/blocked-upgrade tests. The version-1 setup contract remains explicit. Existing fixed-path outbox screenshot retention is a named test-harness follow-up; this task preserved each inspected proof in a separate evidence directory.

Selected captured lines from the final recovery/payload Chromium run on macOS (all 20 cases, no retry):

✓ |ui-e2e-bundled| ui/src/e2e/chat-outbox-recovery.e2e.test.ts > Control UI mocked Gateway E2E > recovers an ambiguous IndexedDB attachment draft through rendered controls without sending 2558ms
✓ |ui-e2e-bundled| ui/src/e2e/chat-outbox-payloads.e2e.test.ts > Control UI mocked Gateway E2E > retains the full composer without sending when a real IndexedDB upgrade is blocked 2169ms
✓ |ui-e2e-bundled| ui/src/e2e/chat-outbox-payloads.e2e.test.ts > Control UI mocked Gateway E2E > upgrades inline queues and the existing draft database, then edits and cancels without touching a newer composer 3884ms
Test Files  2 passed (2)
Tests  20 passed (20)

The ordered negative control waits for the unchanged app's native database version 2 before the original version-1 seed and fails with page.evaluate: VersionError: The requested version (1) is less than the existing version (2). The final test removes that ordering hazard by seeding before app boot; it does not change the storage version or weaken the migration assertions.

Use the shared finite-animation fixture for opening replacement, interrupted
closing, and navigation during property hide. DOM animationstart delivery can
follow native completion, leaving the old tests outside the intended race.

Preserve real running-state, focus, visibility and navigation assertions.
Both complete browser files pass 49 cases in release and main contexts; three
controlled dependency faults fail the intended assertions. No production
behavior changes.
@steipete steipete self-assigned this Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 4, 2026, 9:46 AM ET / 13:46 UTC.

ClawSweeper review

What this changes

The PR moves the dropdown CSS-animation holder into shared UI test support and uses it to exercise three submenu lifecycle assertions at a deterministic active animation frame.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this PR open. The focused test refactor replaces current main’s timing-sensitive animationstart callbacks with a shared helper that samples a real active CSS animation; no correctness defect was found, but the external contributor has not supplied inspectable after-fix browser-run evidence.

Priority: P3
Reviewed head: b9a3ad3c323027c17bc8205503cbb35fc3200714

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and structurally sound, but inspectable after-fix browser proof is still required before merge.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The changed owner is the browser submenu lifecycle suite, but the supplied body offers only unaccompanied claims of browser runs; attach a redacted terminal trace, log, or artifact showing the after-fix held opening, closing, and property-hide cases passing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The changed owner is the browser submenu lifecycle suite, but the supplied body offers only unaccompanied claims of browser runs; attach a redacted terminal trace, log, or artifact showing the after-fix held opening, closing, and property-hide cases passing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Introduced helper and owner assertions: The new helper holds a real CSSAnimation at finite interior progress, and the three owner cases start their public submenu operation before the hold, run the overlapping action while held, then join both operation promises afterward.
Current main retains the flaky arrangement: Current main still starts replacement and reopening from animationstart callbacks and waits for those callbacks to run, so a delayed event can prevent the intended lifecycle race from being exercised.
Pinned dependency lifecycle contract: The pinned Web Awesome patch makes public submenu operations return the tracked submenu-animation promise after an update, including joining prior animation work; capturing the promises before running the held action avoids waiting on the frozen transition inside the helper.
Findings None None.
Security None None.

How this fits together

Control UI dropdown tests drive Web Awesome popovers through overlapping submenu opens and closes, then assert focus and visibility outcomes. The new shared helper pauses the native CSS animation at interior progress so lifecycle actions can be tested before completion.

flowchart LR
  A[Browser test] --> B[Submenu open or close request]
  B --> C[Web Awesome CSS animation]
  C --> D[Shared animation holder]
  D --> E[Overlapping submenu action]
  E --> F[Focus and visibility assertions]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The changed owner is the browser submenu lifecycle suite, but the supplied body offers only unaccompanied claims of browser runs; attach a redacted terminal trace, log, or artifact showing the after-fix held opening, closing, and property-hide cases passing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The installed upstream Web Awesome package source was unavailable in this read-only checkout and outbound retrieval could not resolve, so the relevant lifecycle was inspected through OpenClaw’s pinned package patch rather than the installed dependency source.
  • Complete next step (P2) - Attach redacted after-fix browser-run output or an artifact demonstrating the three held submenu lifecycle cases; updating the PR body should trigger a fresh review.
Agent review details

Security

None.

PR surface

Tests -1. Total -1 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 77 78 -1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 77 78 -1

Review metrics

Metric Value Why it matters
Production versus test delta production 0; tests +28/−78; test support +49 (net −1) The change consolidates existing browser-test machinery without growing runtime, configuration, or dependency surface.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the single shared native-animation holder and land it after a redacted browser-run trace demonstrates the three held submenu transitions complete with the expected focus and visibility assertions.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the single shared native-animation holder and land it after a redacted browser-run trace demonstrates the three held submenu transitions complete with the expected focus and visibility assertions.

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

Yes, source-reproducible: current main couples the intended races to delayed animationstart delivery, while the PR holds the real animation before performing those actions. The read-only review did not execute the browser suite.

Is this the best way to solve the issue?

Yes. Reusing the pre-existing native-animation holder at the affected lifecycle boundary avoids synthetic event timing and removes duplicated test support without changing production behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 068ef71bd20e.

Labels

Label changes:

  • add P3: This is a narrowly scoped browser-test reliability repair with no production behavior change.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The changed owner is the browser submenu lifecycle suite, but the supplied body offers only unaccompanied claims of browser runs; attach a redacted terminal trace, log, or artifact showing the after-fix held opening, closing, and property-hide cases passing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is a narrowly scoped browser-test reliability repair with no production behavior change.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The changed owner is the browser submenu lifecycle suite, but the supplied body offers only unaccompanied claims of browser runs; attach a redacted terminal trace, log, or artifact showing the after-fix held opening, closing, and property-hide cases passing. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Introduced helper and owner assertions: The new helper holds a real CSSAnimation at finite interior progress, and the three owner cases start their public submenu operation before the hold, run the overlapping action while held, then join both operation promises afterward. (ui/src/test-helpers/web-awesome-animation.ts:5, b9a3ad3c3230)
  • Current main retains the flaky arrangement: Current main still starts replacement and reopening from animationstart callbacks and waits for those callbacks to run, so a delayed event can prevent the intended lifecycle race from being exercised. (ui/src/components/web-awesome-dropdown-owner.browser.test.ts:275, 068ef71bd20e)
  • Pinned dependency lifecycle contract: The pinned Web Awesome patch makes public submenu operations return the tracked submenu-animation promise after an update, including joining prior animation work; capturing the promises before running the held action avoids waiting on the frozen transition inside the helper. (patches/@[email protected]:67, b9a3ad3c3230)
  • Feature-history routing: The current owner-test file was introduced as a new file by the merged submenu-navigation repair; blame of its retained hidden-state assertion remains on that commit. (ui/src/components/web-awesome-dropdown-owner.browser.test.ts:90, b060c7a1105d)
  • Proof coverage gap: The complete supplied PR body reports browser results and fault probes but contains no inspectable terminal transcript, log, artifact, recording, or media showing the after-fix run.

Likely related people:

  • Peter Steinberger: Raw commit b060c7a adds ui/src/components/web-awesome-dropdown-owner.browser.test.ts:89 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b060c7a1105d; files: ui/src/components/web-awesome-dropdown-owner.browser.test.ts)

Rank-up moves

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

  • Attach redacted after-fix browser-run output or an artifact covering the three held submenu lifecycle cases.

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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 4, 2026

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is stronger than waiting on animationstart: it holds the real CSS animation at a finite interior sample, so the lifecycle assertions are about an actually running animation rather than event-delivery timing. Joining the captured open/close promises after the held action also avoids turning setup into a deadlock. Production animation timing remains untouched.

Create the legacy version-1 IndexedDB fixture on an inert same-origin
page before the app can create its current database. Preserve actual
upgrade, attachment recovery, reload and no-send assertions.

Reproduce the original VersionError after the unchanged app opens v2;
verify all 20 recovery and payload browser cases pass after the repair.
@steipete steipete changed the title fix(test): hold submenu animations during lifecycle assertions fix(test): own UI animation and legacy database setup Sep 4, 2026
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The body now includes captured native-browser output for all three held-animation cases and the linked full Linux run, plus direct installed Web Awesome source/hash verification. The final head also fixes the separate legacy IndexedDB fixture exposed by CI: seed genuine v1 before app boot. The exact VersionError has an ordered native reproduction; the complete recovery and payload browser suites pass 20/20, and the incremental changed gate and independent review are clean. Production and schemas are unchanged. Fresh CI is running on 1428931.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit a6a979c into main Sep 4, 2026
137 of 139 checks passed
@steipete
steipete deleted the codex/fix-submenu-animation-test-ownership branch September 4, 2026 14:55
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 4, 2026
…9-prep

* commit '407a8f453c0f0306af1ddc0aafa8697c1d49a9e7': (312 commits)
  perf(ui): coalesce automation event refreshes (#138065)
  fix: reject incomplete Skill Workshop directory reads (#138082)
  test(ui): decouple rendering checks from generated wording (#138283)
  perf: avoid temporary entries in bounded JSON traversal (#138017)
  fix(irc): render complete messages before splitting (#138328)
  perf: prepare worker trajectory payloads only for recorded events (#138086)
  fix(mcp): paginated listings no longer time out after a forward clock step (#137206)
  fix(codex): page native transcripts and bound UI previews (#136282)
  feat(gateway): apply more settings without restarting (#138112)
  fix(docs): preserve mirrored ClawHub maturity links (#138241)
  fix(test): own UI animation and legacy database setup (#138296)
  fix(tts): preserve literal directives in Markdown code (#138319)
  fix: load chat widgets behind authenticated gateways (#138074)
  chore(ui): cover native approval finalization (#137259)
  fix(cron): cancel conditions before main-session handoff (#138313)
  fix(backup): preserve text after embedded NUL characters (#138327)
  fix(android): align composer control sheets (#137442)
  fix(ci): wait for replacement PR runs instead of stale failures (#138307)
  fix(sessions): keep Gateway responsive with long transcripts (#138094)
  fix(computer): map window inputs to delivered image coordinates (#138271)
  ...

# Conflicts:
#	scripts/release-check.ts
#	test/release-check.test.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
* fix(test): hold submenu animations during lifecycle assertions

Use the shared finite-animation fixture for opening replacement, interrupted
closing, and navigation during property hide. DOM animationstart delivery can
follow native completion, leaving the old tests outside the intended race.

Preserve real running-state, focus, visibility and navigation assertions.
Both complete browser files pass 49 cases in release and main contexts; three
controlled dependency faults fail the intended assertions. No production
behavior changes.

* fix(test): seed legacy recovery database before app boot

Create the legacy version-1 IndexedDB fixture on an inert same-origin
page before the app can create its current database. Preserve actual
upgrade, attachment recovery, reload and no-send assertions.

Reproduce the original VersionError after the unchanged app opens v2;
verify all 20 recovery and payload browser cases pass after the repair.
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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants