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

Home tiles on a phone: thumbnails are 200×125 corner crops upscaled 1.8×, status badge stretches full width, hero CTA touches the grid #524

Closed opened this in answer to
Closed without merging

Home tiles now show the whole page instead of a corner crop, the status badge shrinks to its text, and the hero keeps a gap above the grid. The Playwright screenshot tests are not done. I ran test/home-tiles.test.ts, test/looks.test.ts, test/web-apps.test.ts and test/landing.test.ts, and they pass.

Notes

stopped closed without shipping deploy 36680a2

opened this

Home tiles now show the whole page instead of a corner crop, the status badge shrinks to its text, and the hero keeps a gap above the grid. The Playwright screenshot tests are not done. I ran test/home-tiles.test.ts, test/looks.test.ts, test/web-apps.test.ts and test/landing.test.ts, and they pass. tsc --noEmit couldn't run here because the bun type definitions weren't found, so the type check is untested. I also did not run the full check from forge.json or look at the page in a browser.

  • Thumbnails. A thumb is now the 1280×800 desktop window captured at 0.5 scale, so a 640×400 picture of the whole page. capture.ts gains an optional scale, which sets Chromium's device scale factor. LOOK_VIEWPORTS in src/core/looks.ts says what window each look is taken in, and LOOK_SIZES is now the pixel size of the file.
  • Tile image. The tile <img> gets srcset="thumb 1x, desktop 2x", using the existing desktop picture as the 2× variant. It is drawn with aspect-ratio: 8/5; object-fit: cover; object-position: top.
  • Badge. .app-tile-body .badge now has justify-self: start.
  • Hero. .hero has a 32px bottom margin at every width.
  • Tests. test/looks.test.ts is updated for the new capture sizes. test/home-tiles.test.ts is new and added to the forge.json check; it checks the thumb is the desktop window at half size and that the CSS has the cover, badge and hero-gap rules.

Not done:

  • Playwright screenshot tests (393 px and 1280 px, Chromium and WebKit). Zero runtime dependencies is an invariant in CLAUDE.md, and I didn't add Playwright as a dev dependency without a person's say. I asserted the CSS instead, which doesn't catch visual regressions. Someone should decide whether to allow Playwright as a dev-only dependency; I'd split the screenshot tests into their own issue.
  • Existing 200×125 thumbs. They are not regenerated and stay blurry until their app's next deploy takes new pictures. Until then they are drawn with cover from the top, but without the 2× variant.

To try: deploy any app on this branch's preview, then open / signed out on a 393px viewport.

🤖 Generated with Claude Code

Closes #473

3 earlier comments
commented

Home tiles now use a half-size thumbnail of the whole desktop page, and the check config is short enough to run again.

What changed

  • Thumbnail: it is the 1280×800 desktop window drawn at 0.5, so 640×400. The desktop picture is its 2× in srcset. The badge shrinks and the hero clears the grid. These changes were already on the branch.
  • Check config: forge.json's check.run was over the 1000-character limit. The list of test files now lives in scripts/check-files.txt, and check.run reads it with $(cat scripts/check-files.txt). The same 43 files run, and forge.json is now 262 bytes.
  • Test fix: test/studio.test.ts still expected the old 200×125 thumb. The test was stale, not the code, so it now expects 640×400.

Checks

  • Tests: I ran the full check-file set. 628 tests passed and one failed, the stale studio test above. I re-ran that test alone after the fix and it passes. I didn't re-run the whole set.
  • Typecheck: bun x tsc --noEmit doesn't run in this sandbox because the bun types are missing. It is untested here, so the forge's check is the first real run.

Not done: I left the 117 test files outside the curated list alone.

Try it: open the home page on a phone-width window. Tiles show the whole page at half size.

🤖 Generated with Claude Code

commented

Operator: main moved under this branch (forge.json's check command was shortened, among others). Merge main into the branch, resolve the conflicts keeping this change's intent, run the check locally, and push.

commented

I merged main into the branch and pushed. The local check is not fully green: one test fails, in code this pull doesn't touch.

What changed

  • The only conflict was forge.json's check.run. I took main's version, since main's scripts/check.ts reads the command straight from forge.json.
  • Because of that, I deleted scripts/check-files.txt, which this pull had added for the same purpose. Nothing else referenced it.
  • The home-tile changes (thumbnails, badge, hero spacing) are unchanged.

Check result bun scripts/check.ts passes tsc and 770 of 771 tests. The failure is test/board-windows.test.ts, "the board shows each window to an admin, and each app's efficiency". It expects "$0.40 spent, nothing shipped this week" on the board page and doesn't find it. This pull doesn't change the board, so I think it's a weekly-window or date issue on main. I didn't run it on a clean main checkout, so that isn't confirmed.

commented

Parked by the crew: the check failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs