Skip to content

#2870: browser regression for running-card reachability - #254

Open
jparker2006 wants to merge 1 commit into
mainfrom
cursor/running-card-reachability-5755
Open

jparker2006 wants to merge 1 commit into
mainfrom
cursor/running-card-reachability-5755

Conversation

@jparker2006

Copy link
Copy Markdown
Member

No launch-fleet start record on the ticket yet; a record author (jparker2006 / openwiz[bot]) must post it before merge.

Fixes openwizdev/OpenWiz#2870
Fixes #150

What changed

wizbar/src/footer-card.test.tsx now runs one synthetic browser regression for the running card. It opens 50 synthetic threads in a 350×480 viewport, moves the pointer across the old 6px gap, sends Tab and reads the computed focus indicator, and scrolls the thread list so the first and last rows are fully inside the list and the viewport.

The jsdom cases in the same file still only read inline styles, walk a subset of focusable markup, and move focus by calling focus(). Those can pass when a real pointer misses the card, the next Tab leaves it, the focus ring is invisible, or the list never scrolls.

browser/running-card.test.ts is left as it is. This regression lives in the owned test file and runs with npm test.

Runner (J187)

Name playwright-core
Version 1.65.1
Licence Apache-2.0
Why WizBar already pins it: wizbar/package.json has playwright-core ^1.65.1, and wizbar/package-lock.json resolves that to 1.65.1 with license: Apache-2.0 (the installed package.json says the same). It is the runner the existing browser regressions use. It is small enough: no browser binary is added to the install. The test launches the Chrome already on the machine, found the same way as wizbar/browser/running-card.test.ts.

The full playwright package, which downloads browsers on install, was not added. No workflow change was needed. wizbar/package.json and wizbar/package-lock.json are unchanged, so the licence field stays as it is on main. Pull request #252, still open, is the change that sets that field to Apache-2.0 AND MIT; this branch does not touch the line.

Pull request #253 still edits the README licence text and the root LICENSE. This ticket does not own those files. This branch is based on main at 8c0aa627 and does not take them.

What the test catches

One test, moves the pointer across the old gap, tabs to a computed focus ring, and scrolls the first and last of 50 threads:

  • catches a card floated 6px above the trigger, so the pointer leaves the hit area on the way in and the unpinned card closes
  • catches a Tab stop inside the card whose computed outline and box-shadow show no focus indicator
  • catches a card with no max height in a short viewport, so the list does not scroll and the first and last of 50 threads are not both fully in view

Red, then green

The reachability fix is already on main (WB4-10, #1585). The owned paths do not include the component files, so the red runs reintroduced each old failure locally and were not committed. The component files were restored after each run.

Red, gap only (bottom: calc(100% + 6px), paddingBottom: 0), npx vitest run --config vitest.config.ts src/footer-card.test.tsx -t "moves the pointer across the old gap" --maxWorkers=2: 1 failed, 60 skipped. pointer can cross the gap: expected false to be true.

Red, focus only (row outline and boxShadow set to none, focus-visible ring class removed): 1 failed, 60 skipped. Computed focus was { inCard: true, visible: false }.

Red, scroll only (maxHeight removed): 1 failed, 60 skipped. At the top of the list, cardInside was false, inViewport was false, overflow was false, and the last row was still inside the list.

Green, with those edits restored: that test passed (1 passed, 60 skipped).

Bench & Eval

Head: c225a84b52767d860799fea2d9170b645c7dc278. Local Node v22.23.4, npm 10.9.9, from wizbar/. CI uses Node 24.22.1. Chrome used locally: 157.0.8103.50.

  • npx tsc --noEmit: pass
  • npm test -- --maxWorkers=2: 57 files passed, 1 skipped; 1674 tests passed, 2 skipped
  • python3 -I tools/comment-check/check.py diff --base origin/main (OpenWiz's checker; this repo has no copy): comment-check: ok
  • WIZBAR_REQUIRE_BROWSER=1 npm run test:browser: 2 failed, 7 passed. Both failures are the existing shows all 100 threads cases in browser/running-card.test.ts, which this pull request does not change: after the pointer crosses the gap, mouse.move(1, height - 40) left the card open (expected false to be true at line 137). Re-ran after clearing node_modules/.vite with the same result. The product files are unchanged from main.
Open in Web Open in Cursor 

The jsdom cases never move the pointer, read a computed focus ring, or scroll. The pinned playwright-core runner does those three checks for 50 threads in a short viewport.

Co-authored-by: Jake Parker <jparker2006@users.noreply.github.com>
@jparker2006

Copy link
Copy Markdown
Member Author

Review #254 at c225a84

Independent Codex review of openwizdev/OpenWiz#2870. Builder family inferred as Grok (xAI) from the November 26 Cursor attribution.

  • R1 [blocking] wizbar/src/footer-card.test.tsx:923 (Standards). A contributor following the documented npm ci and npm test workflow on a machine without Chrome or Chromium now gets a failing suite during setup. Keep the normal local suite working without Chromium and keep the regression required in browser-enabled CI.
    • Class: other: browser-prerequisite
    • User path: A contributor verifies a clean checkout with the commands in wizbar/contracts/wizbar.v1.md:14.
    • Shows the break: With no browser on PATH or in the Playwright cache, npm test -- src/footer-card.test.tsx --maxWorkers=2 passed all 60 tests on the base. At c225a84, it failed with No Chromium or Chrome found. Set CHROMIUM_PATH.
  • R2 [nit] wizbar/src/footer-card.test.tsx:997 (Spec). The computed focus check accepts a transparent outline. The new test stayed green when the focused group button had a 1px transparent outline and no shadow. Check that the paint used as the focus indicator is visible as well as present.
  • R3 [nit] wizbar/src/footer-card.test.tsx:946 (Spec). Assigning scrollTop still reaches both ends with overflow-y: hidden. The new test passed with that change even though a real wheel event left the list at offset zero. Drive the list with wheel input and check the endpoint geometry after it moves.
  • R4 [nit] wizbar/src/footer-card.test.tsx:973 (Standards). The test-only PR has no no-changelog label, and the description is missing the Self-check and Rulings sections.

Disproved: 2 candidate findings dropped.

Checked Standards, ticket #2870 and the full diff. The test is within the owned paths and uses lockfile-pinned Playwright Core 1.65.1 (Apache-2.0). With Chromium, the new test passed and failed independently when the old pointer gap was restored, the focus ring was removed, and the viewport height bound was removed. Typecheck passed. The full local suite passed with 1,674 tests, and all nine tests in the separate browser suite passed. CI passed at this head.

VERDICT: CHANGES at c225a84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WizPlugins polish B39: a browser regression for running-card reachability Keep a browser regression for running-card reachability

1 participant