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

A forge preview's look pictures every top-level page, desktop and phone, light and dark #2728

Parked opened this
Closed without merging

This push does not fix a known cause. The check log you sent ended at the test command, so I never saw why it failed. I merged current main into the branch (it had moved by one release commit) and pushed, so the forge's check will now run against an up-to-date base.

Notes

stopped parked by the crew deploy 64fefc0

opened this

This push does not fix a known cause. The check log you sent ended at the test command, so I never saw why it failed.

I merged current main into the branch (it had moved by one release commit) and pushed, so the forge's check will now run against an up-to-date base. If it fails again, send me the full log.

Checks I could run here, on the merged tree:

  • Gate and type check: scripts/gate.ts and tsc --noEmit are clean.
  • Looks tests, standards.test.ts, web-ui.test.ts and openapi.test.ts: 50 pass and 1 fails. The failure is the real-capture look test in test/looks.test.ts.
  • Chromium failures: two tests need Chromium, and it cannot start in this sandbox. They are that look test and test/web-phone.test.ts ("the studio's app list fits a 360px viewport", which loads /apps). Both fail on Chromium startup, not on an assertion. My diff doesn't touch the /apps page, so I expect the forge to pass them, but I couldn't confirm that here.
  • Fast-tier run: I ran it on the branch before the merge. It stopped early after the Chromium failure and skipped some shards, so it is not a full pass.

The change itself is unchanged. The preview pictures every top-level page, desktop and 360px, light and dark. The pull page shows the pull's pictures beside main's.

Continues #2728

2 earlier comments
commented

A forge preview now pictures 17 top-level pages at desktop and 360px, in light and dark. The pull page shows each page's four pictures next to main's. Typecheck is clean, and the new test/looks-pages.test.ts, test/apps.test.ts and the new set-of-pictures test in test/looks.test.ts pass. One existing test, "a real capture through the grant door", fails here because Chromium can't open a socket in this sandbox, so I couldn't take a real picture. The dark capture flag (--blink-settings=preferredColorScheme=1) has not been tried in a real browser.

What changed

  • Page list: src/looks/pages.ts lists the pictured pages and, in NOT_PAGES, each skipped top-level route with its reason. A test fails if a top-level GET route in buildRouter() is in neither list.
  • Opt-in: forge.json now has "looks": "top-level", which the manifest accepts as a string. Any other string is refused. docs/APPS.md describes it.
  • Capture: each preview is pictured at 1280px and 360px, in both themes. The 360px picture is the existing phone kind taken in a 360×740 window, and the dark one is taken with Chromium asked for prefers-color-scheme: dark. That is 17 pages × 4 pictures plus the home thumb per environment, and main gets the same set so there is a "before".
  • Pull page: the Look card gives each page a group with a row per width and theme, main's picture ("before") beside this pull's ("after"). A picture that failed shows "No picture: <reason>.", and an older head is marked.
  • Tests: the page list against the router. The plan has one picture per page × width × theme, each with its own file name. looks: "top-level" and this repo's own forge.json parse to the set. Last, an end-to-end test of a preview: 69 rows, dark and 360px asked for exactly where expected, and the pull page showing the grid and a failed cell.

What I chose

  • The dark twin of a page is the same path with a ?theme=dark suffix in the look row's page key, filed on disk as <page>+dark. I first added new kinds with a table rebuild, but test/schema-additive.test.ts forbids migrations that drop or rename a table, so there is no migration at all.

What I left out

  • /usage isn't a top-level route (it is /settings/usage), so it is not pictured. /signin and /signup redirect for the owner the look is taken as, so they are excluded.
  • Captures run one at a time, so a full set takes a few minutes per environment. It stays best-effort and never blocks a check.
  • The grid shows only that one pull's pictures and main's, with no history.
commented

This push does not fix a known cause. The check log you sent ended at the test command, so I never saw why it failed.

I merged current main into the branch (it had moved by one release commit) and pushed, so the forge's check will now run against an up-to-date base. If it fails again, send me the full log.

Checks I could run here, on the merged tree:

  • Gate and type check: scripts/gate.ts and tsc --noEmit are clean.
  • Looks tests, standards.test.ts, web-ui.test.ts and openapi.test.ts: 50 pass and 1 fails. The failure is the real-capture look test in test/looks.test.ts.
  • Chromium failures: two tests need Chromium, and it cannot start in this sandbox. They are that look test and test/web-phone.test.ts ("the studio's app list fits a 360px viewport", which loads /apps). Both fail on Chromium startup, not on an assertion. My diff doesn't touch the /apps page, so I expect the forge to pass them, but I couldn't confirm that here.
  • Fast-tier run: I ran it on the branch before the merge. It stopped early after the Chromium failure and skipped some shards, so it is not a full pass.

The change itself is unchanged. The preview pictures every top-level page, desktop and 360px, light and dark. The pull page shows the pull's pictures beside main's.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs