test(primitives): fix menu.spec:26 and selector.spec:138 (#1153) #1171

Closed
kayg wants to merge 0 commits from fix/guards-1153-primitives-e2e into dev
Owner

Root causes: the menu mounts inside Float's wrapper box so the spec's observer never matched [role=menu]; the harness never imported base.css, which holds the shared .bounce press the Selector options use. No sleeps, retries or looser asserts. Evidence in the comments.

Part of #1153. Do not merge before review.

🤖 Generated with Claude Code

Root causes: the menu mounts inside Float's wrapper box so the spec's observer never matched `[role=menu]`; the harness never imported base.css, which holds the shared `.bounce` press the Selector options use. No sleeps, retries or looser asserts. Evidence in the comments. Part of #1153. Do not merge before review. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test(primitives): fix menu stack-count observer and give the harness the shared base styles (#1153)
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled
4f97a3b6d1
menu.spec 'taps never stack openings': the menu now mounts inside Float's
wrapper box, so the observer saw the box, not [role=menu]; it counts menus in
added subtrees too (still exactly 2 for 4 taps).
selector.spec 'nothing chosen': the options take the press from the shared
.bounce rule in base.css, which the harness never loaded, so the press never
scaled. The harness imports base.css like the app does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Owner

Root causes (both failed 40/40 on prod and dev, reproduced on dev-02 chromium + webkit):

  • menu.spec:26: the menu mounts inside Float's display: contents box, moved to <body>. The spec's MutationObserver only matched added nodes that were themselves [role=menu], so it counted 0 openings, not 2. It now also checks inside added nodes; still asserts exactly 2 for 4 taps.
  • selector.spec:138: the Selector options take their press from the shared .bounce rule in base.css (#912). The primitives harness imported tokens.css but never base.css, so the press never scaled (scale stayed 1). The harness now imports base.css, as the app's main.ts does.
    No sleeps, retries or looser assertions.
    Results: whole primitives suite 98/98 (chromium + webkit, dev-02). --repeat-each=30 on both specs: webkit 60/60, chromium 60/60 (both on dev-02: chromium logic specs run on aarch64 per the orchestrator).
    Command: cd packages/ui && bunx playwright test -c src/primitives/playwright.config.ts menu.spec.ts:26 selector.spec.ts:138 --project=<p> --repeat-each=30 --workers=1.

🤖 Generated with Claude Code

Root causes (both failed 40/40 on prod and dev, reproduced on dev-02 chromium + webkit): - `menu.spec:26`: the menu mounts inside `Float`'s `display: contents` box, moved to `<body>`. The spec's MutationObserver only matched added nodes that were themselves `[role=menu]`, so it counted 0 openings, not 2. It now also checks inside added nodes; still asserts exactly 2 for 4 taps. - `selector.spec:138`: the Selector options take their press from the shared `.bounce` rule in `base.css` (#912). The primitives harness imported `tokens.css` but never `base.css`, so the press never scaled (`scale` stayed 1). The harness now imports `base.css`, as the app's `main.ts` does. No sleeps, retries or looser assertions. Results: whole primitives suite 98/98 (chromium + webkit, dev-02). `--repeat-each=30` on both specs: webkit 60/60, chromium 60/60 (both on dev-02: chromium logic specs run on aarch64 per the orchestrator). Command: `cd packages/ui && bunx playwright test -c src/primitives/playwright.config.ts menu.spec.ts:26 selector.spec.ts:138 --project=<p> --repeat-each=30 --workers=1`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

Merged into dev with --no-ff together with #1169–#1175 (dev df16d3a24, orchestrator 16 Nov ~05:20 IST). Combined tree gated on dev-02: cargo fmt --check, clippy -D warnings, workspace tests all pass; every guard passes except the size-budget line for NoteList.svelte (595 > 567, slice 3c's file). I checked the four Rust splits myself: only moved code, plus visibility, mod, use and cfg lines.

Merged into dev with `--no-ff` together with #1169–#1175 (dev `df16d3a24`, orchestrator 16 Nov ~05:20 IST). Combined tree gated on dev-02: `cargo fmt --check`, `clippy -D warnings`, workspace tests all pass; every guard passes except the size-budget line for `NoteList.svelte` (595 > 567, slice 3c's file). I checked the four Rust splits myself: only moved code, plus visibility, mod, use and cfg lines.
kayg closed this pull request 2026-11-15 23:27:49 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!1171
No description provided.