Skip to content

refactor(ui): freeze overlay behavior test contracts - #168216

Merged
steipete merged 1 commit into
mainfrom
solid2/p1-09
Oct 10, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/p1-09

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The overlay behavior suites couple their scenarios to Web Awesome private DOM, event names, and Lit completion waits, making them hard to reuse when the shared primitives change renderer.

User Impact

No production behavior or dependency changes. The existing dropdown, select, dialog, tooltip, menu, and tab contracts remain the migration oracle, including their interruption, veto, focus, remount, controlled-value, and native-occlusion races.

Why This Change Was Made

Move renderer-specific selectors, completion waits, and event plumbing into small file-local semantic adapters. Keep race assertions at their original checkpoints, explicitly pin the inherited typography, 75 ms transition, and focus-ring defaults, and make the architecture guard admit shared native primitives and TSX without admitting consumer-owned menus or dialogs.

Release-note context: internal test contract refactor; no user-visible release note required.

Evidence

  • Testbox, Node + Chromium: all 259 cases in 15 files passed, both the unchanged baseline and the refactored suites. Group wall time: 46.14 s baseline, 45.53 s final candidate, using pnpm test <all 15 paths> --maxWorkers=1.
  • pnpm check:changed --timed -- <all 15 paths> passed in 183.80 s, including typechecking, lint, formatting, line-count/timeout/assertion ratchets, and dead-export checks.
  • Codex autoreview through the shared isolated workflow: clean for P0–P2. A review finding about an extra microtask was fixed by running the initial-opening assertions inside the original continuation.
  • Testbox run, lease tbx_01m4j0x91jee1rf3mv1mkjnkbc; source and all 15 file hashes were verified before execution. The lease is stopped after proof.
  • All files also passed separately with pnpm test <file> --maxWorkers=1; measured serial wall times below exclude remote source preparation. GitHub CI seconds are pending the initial PR run.

Known gaps: WebKit awaits the separate browser-lane foundation. An additional Bun attempt could not start because the Testbox image has no bun executable. The required Node/Chromium proof passed. An initial mixed-project JSON reporter attempt failed in reporting; the normal reporter was used for the passing runs. No tests, budgets, or guards were weakened.

Per-file serial wall times
File (ui/src/components/) Wall time
menu-surface.browser.test.ts 7.75 s
modal-dialog.browser.test.ts 4.49 s
modal-dialog.test.ts 3.50 s
panel-tab-strip.browser.test.ts 1.90 s
panel-tab-strip.test.ts 2.02 s
tooltip.browser.test.ts 5.90 s
tooltip.test.ts 3.05 s
web-awesome-accessibility.node.test.ts 3.13 s
web-awesome-dropdown-owner.browser.test.ts 10.48 s
web-awesome-dropdown.browser.test.ts 14.09 s
web-awesome-migration.node.test.ts 1.59 s
web-awesome-select-controls.browser.test.ts 4.39 s
web-awesome-select.browser.test.ts 2.42 s
web-awesome-theme.browser.test.ts 2.01 s
web-awesome.test.ts 2.03 s

Keep the dropdown, select, modal, tooltip, menu and tab race cases behind semantic test adapters. Pin theme defaults and keep shared-control ownership independent of Web Awesome and TypeScript file extensions. No production behavior changes.
@clawsweeper

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

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves overlay tests behind file-local semantic adapters and extends architecture checks to shared native primitives and TSX.

Example: A tooltip reopens while its previous hide animation is unfinished.

  • Before: The test directly inspects Web Awesome events and internal visibility fields.
  • After: Semantic adapters expose the same lifecycle and visibility assertions at the existing checkpoints.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test isolation with no concrete introduced defect found; supporting execution evidence is harness-based and reported in the PR.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only refactor changes no shipped behavior; the body supplies baseline/candidate harness results, with the linked logs inaccessible from this review environment.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Existing overlay scenarios embed renderer details, increasing the cost of preserving behavior through a renderer migration.
Reason: The change preserves valuable regression contracts without adding production APIs, configuration, dependencies, or persisted state.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a coherent test-contract refactor, preserves the inspected race assertions, and introduces no concrete defect found in this review.

Priority: P3
Reviewed head: 45a30d5fdb965ad039c6b6c9e49b5b40f6b0a953

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI component tests exercise shared overlay owners using DOM interactions, lifecycle events, animation boundaries, and accessibility observations.

flowchart LR
  A[Test scenarios] --> B[File local adapters]
  B --> C[Shared UI components]
  C --> D[Web Awesome renderer]
  D --> E[DOM and lifecycle observations]
  E --> A
Loading

Technical review

Best possible solution:

Retain the semantic adapters and preserved race checkpoints as the shared primitives’ migration oracle.

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

This PR refactors existing tests rather than reporting a product defect; runtime reproduction was outside this read-only review.

Is this the best way to solve the issue?

The file-local adapters isolate renderer details while retaining the inspected lifecycle, interruption, focus, and visibility contracts.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Shared-control architecture guard changes intended behavior with a stated reason (8590655: Centralize interaction behavior and prevent consumer-owned replacements with inconsistent keyboard and accessibility behavior.)
  • Dropdown and submenu lifecycle scenarios keeps the original intent (9ec9a1f: Protect dismissal, interrupted transitions, focus, and completion ownership when dropdowns reopen.)
  • Select lifecycle scenarios keeps the original intent (b07b7d8: Prevent stale closing work from hiding reopened options and preserve public-operation settlement.)
  • Tooltip lifecycle scenarios keeps the original intent (3d43d2e: Keep reopened tooltips visible and prevent superseded transitions from publishing stale completion.)
  • Modal entrance motion keeps the original intent (cf95246: Assign motion by interaction type while preserving native focus, dismissal, and reduced-motion behavior.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Introduced scope: The pinned introduction changes only component test files; the verified synthetic merge retains that same scope against fetched main. (45a30d5fdb96)
  • Opening checkpoint preserved: The modal adapter performs the original completion waits and executes focus assertions inside its continuation, avoiding an additional return-boundary microtask before those assertions. (ui/src/components/modal-dialog.test.ts:52, 45a30d5fdb96)
  • Bounded architecture change: The ownership guard scans TS and TSX, normalizes owner filenames, and exempts named shared primitives while retaining checks against consumer-owned menus and dialogs. (ui/src/components/web-awesome-migration.node.test.ts:21, 45a30d5fdb96)
  • Original ownership intent: refactor(ui): use Web Awesome controls throughout Control UI #106865 established consistent shared controls and a guard against consumer-level homegrown interaction models; this PR explains its renderer-independent extension of that guard. (ui/src/components/web-awesome-migration.node.test.ts, 8590655190d3)
  • Validation evidence and inspection limit: The full PR body reports passing baseline and candidate Node/Chromium suites and changed-file checks. The linked Testbox lease is canceled after shutdown; retrieving its logs redirected to a blocked artifact host, so those reported results were not independently verified. No target code was executed during this review.

PR surface

Tests +518. Total +518 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 15 1342 824 +518
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 1342 824 +518

Labels

Label changes:

  • add P3: Internal test maintainability work with no production behavior change or observed urgent regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Internal test maintainability work with no production behavior change or observed urgent regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 10, 2026, 1:13 AM ET / 05:13 UTC.

@steipete
steipete merged commit 6ca61e2 into main Oct 10, 2026
76 of 77 checks passed
@steipete
steipete deleted the solid2/p1-09 branch October 10, 2026 06:05
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
…penclaw#168216)

Keep the dropdown, select, modal, tooltip, menu and tab race cases behind semantic test adapters. Pin theme defaults and keep shared-control ownership independent of Web Awesome and TypeScript file extensions. No production behavior changes.
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL 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