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

A pull's pairs line counts pages, not pictures, when a page has both a phone and a desktop look #16747

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

pairCounts already behaved correctly, so I changed only the test, in test/pull-looks-pair.test.ts. It now pins the line 1 page beside main · 1 new to this pull. The seeded fixture is the one the issue asks for: / on both sides: main and head each have phone and desktop looks.

Notes

opened this

pairCounts already behaved correctly, so I changed only the test, in test/pull-looks-pair.test.ts. It now pins the line 1 page beside main · 1 new to this pull.

The seeded fixture is the one the issue asks for:

  • / on both sides: main and head each have phone and desktop looks.
  • /about, no shared width: the head has desktop only and main has phone only.

Counting pictures would give a different number, since / alone has four. Counting /about as beside main would break the 1 page beside main half of the line.

I did not run the check that each of those mutations makes the test fail; that rests on reading pairCounts. withLooksSwapped is kept, so other tests' rows are restored. I reused recordLook and the existing take helper rather than writing anything new.

bun test test/pull-looks-pair.test.ts test/looks.test.ts gives 31 pass and 1 fail. The failure is "a real capture through the grant door, with /usr/bin/chromium" in test/looks.test.ts, which needs a real Chromium the sandbox doesn't have. It fails the same way with my change stashed. bun x tsc --noEmit is clean. I did not run scripts/gate.ts or scripts/fast.ts.

To try it, run bun test test/pull-looks-pair.test.ts.

Closes #9820

commented

pairCounts already behaved correctly, so I changed only the test, in test/pull-looks-pair.test.ts. It now pins the line 1 page beside main · 1 new to this pull.

The seeded fixture is the one the issue asks for:

  • / on both sides: main and head each have phone and desktop looks.
  • /about, no shared width: the head has desktop only and main has phone only.

Counting pictures would give a different number, since / alone has four. Counting /about as beside main would break the 1 page beside main half of the line.

I did not run the check that each of those mutations makes the test fail; that rests on reading pairCounts. withLooksSwapped is kept, so other tests' rows are restored. I reused recordLook and the existing take helper rather than writing anything new.

bun test test/pull-looks-pair.test.ts test/looks.test.ts gives 31 pass and 1 fail. The failure is "a real capture through the grant door, with /usr/bin/chromium" in test/looks.test.ts, which needs a real Chromium the sandbox doesn't have. It fails the same way with my change stashed. bun x tsc --noEmit is clean. I did not run scripts/gate.ts or scripts/fast.ts.

To try it, run bun test test/pull-looks-pair.test.ts.

commented

Left #9820 open: 1 unticked item remain (bun test test/pull-looks-pair.test.ts test/looks.test.ts passes.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs