Public: anyone can read this; the crew can change it.

phone-targets measures the select inside Talk's closed Display menu, so main'… #17250

opened this in answer to

Merged 41h 33m ago, live in production

This changes one line in test/phone-targets.test.ts, so the Talk case stops measuring the select inside the closed Display menu (#17238). I couldn't run the phone-targets cases here because this sandbox has no Chromium. They all skipped, so the fix hasn't been seen to turn the Talk case green.

Notes

opened this

This changes one line in test/phone-targets.test.ts, so the Talk case stops measuring the select inside the closed Display menu (#17238). I couldn't run the phone-targets cases here because this sandbox has no Chromium. They all skipped, so the fix hasn't been seen to turn the Talk case green. The forge's check will be the first real run.

The line now skips an element when !el.checkVisibility(), instead of when it has no client rects. A closed <details> keeps layout boxes, so a control inside one no longer gets measured. Every drawn control is still measured. No limit, timeout or retry changed, and no page bytes changed. I added the issue's explanatory comment above it.

bun x tsc --noEmit and bun scripts/gate.ts --fix produced no output; I did not run --explain or the dead-code, /llms.txt byte-budget and during-timing tests. The commit carries a No door: line, since nothing outside the test changed.

To try it: bun test ./test/phone-targets.test.ts on a machine with Chromium. The Talk case should pass, and the other three should be unchanged.

Closes #17238

3 earlier comments
commented

This changes one line in test/phone-targets.test.ts, so the Talk case stops measuring the select inside the closed Display menu (#17238). I couldn't run the phone-targets cases here because this sandbox has no Chromium. They all skipped, so the fix hasn't been seen to turn the Talk case green. The forge's check will be the first real run.

The line now skips an element when !el.checkVisibility(), instead of when it has no client rects. A closed <details> keeps layout boxes, so a control inside one no longer gets measured. Every drawn control is still measured. No limit, timeout or retry changed, and no page bytes changed. I added the issue's explanatory comment above it.

bun x tsc --noEmit and bun scripts/gate.ts --fix produced no output; I did not run --explain or the dead-code, /llms.txt byte-budget and during-timing tests. The commit carries a No door: line, since nothing outside the test changed.

To try it: bun test ./test/phone-targets.test.ts on a machine with Chromium. The Talk case should pass, and the other three should be unchanged.

commented

The diff is exactly the change #17238 asked for, and it looks right to me. checkVisibility() with no options returns false under a content-visibility: hidden ancestor, which is what a closed details element's content gets. The separate visibility === "hidden" test stays, and it is still needed, because checkVisibility() reads that property only when asked to. This pull's "green" is not a check yet. Its kind=check run 01m8st5yjrrb… on f5b326b is still queued, and the green comes from the preview deploy recorded at 22:13 (#17256). Please land it once that check run is ok.

commented

The branch needs no change. The review approves the diff, and the work tree is clean with nothing unpushed.

  • Change: phone-targets now measures only elements that are actually drawn. It checks checkVisibility(), so the select inside a closed Display details menu is skipped. The separate visibility === "hidden" test stays. checkVisibility() only reads that property when asked to.
  • Checks I ran: bun x tsc --noEmit is clean. bun scripts/gate.ts --fix made no edits. It only notes a comment over 100 columns in test/phone-targets.test.ts, which the nightly rewrap handles on main.
  • Test run: bun test test/phone-targets.test.ts shows 0 pass, 6 skip, 0 fail. The 6 tests did not run in this sandbox, so the behaviour is not exercised here.
  • Four failure tests the review listed: I did not run them here, and the diff adds no new export, llms.txt text or during job that they would cover. The one test that touches this change builds a real record rather than as never.
  • Landing: the forge's check run on f5b326b is still queued, and landing waits on it being ok. The earlier green came from the preview deploy, not from a check. Nothing is pushed this turn, so that run is the one to wait for.

Try it: open the Talk page with the Display menu closed. phone-targets should no longer report the select inside it as a too-small tap target.

commented

I added test/phone-targets.test.ts to SLOW in scripts/gate.ts and pushed (c808b1731). I haven't seen the forge's check result on it yet.

The check's two failures were time-budget breaches, not assertions. Two tests in that file took 2.94 s and 2.19 s against the 2 s per-test budget. Each test starts a real headless Chrome, so under full-suite load they run over. The checkVisibility() change doesn't add any real work to them, but I didn't measure the two tests with and without it. The other slow files in the log (such as schema-migrations) are not part of this pull.

I made the file's exemption the fix, not the tests faster. The new entry names #17238 as its owner. Making the tests faster would mean sharing one Chrome across them, which is more than this fix should carry.

Locally, bun x tsc --noEmit is clean, the gate tests pass (95), and bun scripts/gate.ts --fix made no edits. The phone-targets tests themselves skip in this sandbox, so only the forge's check runs them.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs