Public: anyone can read this; the crew can change it.
A pull's looks show main's picture beside the head's, so before and after are on every pull with no one attaching them #9676
The pull page's looks now put main's picture beside the head's, labelled "main" and "this pull". It does this per page, per width (390 and 1440), and in both light and dark. The 390/1440 pairing already existed for light looks, labelled "Before · main" and "After · #N".
stopped parked by the crew deploy b2ea200
2 earlier comments
The pull page's looks now put main's picture beside the head's, labelled "main" and "this pull". It does this per page, per width (390 and 1440), and in both light and dark.
The 390/1440 pairing already existed for light looks, labelled "Before · main" and "After · #N". This change relabels it and adds the dark pairs. It also stops printing "Main has no look of … yet" for an unpaired look.
What changed in src/web/pages/looks.ts
- Dark pairs: main's dark looks are now read as well. The "In the dark" disclosure shows main's dark picture beside the head's dark one.
- Unpaired looks: a head look with no main counterpart stands alone as before. Main is matched on page, width and theme, so a width main lacks is simply left out.
- Layout and access: still server-rendered, with no new script. Every image keeps its width and height. Main's pictures go through the same
mayFetchLookcheck as the head's, and there is no new route.
Tests
- New
test/pull-looks-pair.test.tsrenders a pull with a paired phone look (light and dark) and an unpaired desktop look. It asserts both labels, the image URLs, and that every image has width and height. It fails on the old code (checked by stashing the source change). - In
test/looks.test.tsI changed the existing "sits beside main's newest look" test, because its old labels and its "Main has no look" wording no longer exist. It now asserts the new labels and that an unpaired page has no "main" column. bun x tsc --noEmit,bun scripts/gate.tsandbun scripts/design-lint.tspass.- Three chromium capture tests in
test/looks.test.tsfail here (chromium can't open its socket in the sandbox). That file's chromium tests were already failing here before my change. I didn't run the full suite;scripts/fast.tssaid the diff was too broad to name, so I ran only the look-related test files.
Not done: I didn't check the pairs on a running preview. The forge's check runs on the push.
To try it, open a pull whose app has looks on both main and the preview.
🤖 Generated with Claude Code
The check failed only because no commit message had a Try: line. I added an empty commit with one and pushed it. No code changed.
The line reads: "open /pulls/9676 on the preview and see each head look beside main's, labelled main and this pull, in light and dark".
bun scripts/gate.ts passed locally before the push. I didn't re-run tsc or the tests, since nothing in the tree changed. The forge's check runs again on this push.
Parked by the crew: the check stayed red through 2 automatic tries
The pull page's looks now put main's picture beside the head's, labelled "main" and "this pull". It does this per page, per width (390 and 1440), and in both light and dark.
The 390/1440 pairing already existed for light looks, labelled "Before · main" and "After · #N". This change relabels it and adds the dark pairs. It also stops printing "Main has no look of … yet" for an unpaired look.
What changed in
src/web/pages/looks.tsmayFetchLookcheck as the head's, and there is no new route.Tests
test/pull-looks-pair.test.tsrenders a pull with a paired phone look (light and dark) and an unpaired desktop look. It asserts both labels, the image URLs, and that every image has width and height. It fails on the old code (checked by stashing the source change).test/looks.test.tsI changed the existing "sits beside main's newest look" test, because its old labels and its "Main has no look" wording no longer exist. It now asserts the new labels and that an unpaired page has no "main" column.bun x tsc --noEmit,bun scripts/gate.tsandbun scripts/design-lint.tspass.test/looks.test.tsfail here (chromium can't open its socket in the sandbox). That file's chromium tests were already failing here before my change. I didn't run the full suite;scripts/fast.tssaid the diff was too broad to name, so I ran only the look-related test files.Not done: I didn't check the pairs on a running preview. The forge's check runs on the push.
To try it, open a pull whose app has looks on both main and the preview.
🤖 Generated with Claude Code
Closes #9669