Repository navigation
refactor(ui): freeze overlay behavior test contracts - #168216
Conversation
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.
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl 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
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +518. Total +518 across 15 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
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 10, 2026, 1:13 AM ET / 05:13 UTC. |
|
Merged via squash.
|
…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.
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
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.tbx_01m4j0x91jee1rf3mv1mkjnkbc; source and all 15 file hashes were verified before execution. The lease is stopped after proof.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
bunexecutable. 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
ui/src/components/)menu-surface.browser.test.tsmodal-dialog.browser.test.tsmodal-dialog.test.tspanel-tab-strip.browser.test.tspanel-tab-strip.test.tstooltip.browser.test.tstooltip.test.tsweb-awesome-accessibility.node.test.tsweb-awesome-dropdown-owner.browser.test.tsweb-awesome-dropdown.browser.test.tsweb-awesome-migration.node.test.tsweb-awesome-select-controls.browser.test.tsweb-awesome-select.browser.test.tsweb-awesome-theme.browser.test.tsweb-awesome.test.ts