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 #494
This fixes the three defects on the signed-out home's app tiles (#473): the blurry corner-crop thumbnails, the full-width status badge, and the hero button touching the grid. The new test drives Chromium only, not WebKit, and measures layout instead of comparing screenshots (details below).
stopped closed without shipping deploy cd4c1e5
Sign in to join this conversation.
new above
offline
This fixes the three defects on the signed-out home's app tiles (#473): the blurry corner-crop thumbnails, the full-width status badge, and the hero button touching the grid. The new test drives Chromium only, not WebKit, and measures layout instead of comparing screenshots (details below).
Thumbnails (
src/looks/thumb.ts,src/looks/service.ts,src/core/looks.ts)src/design/image/, so it costs one browser start fewer per deploy.Tile (
src/web/studio/home.ts,src/web/style/content.ts)srcset: the thumb at 640w, plus the same commit's desktop picture at 1280w as the 2× source. It is drawn with a 1280/800 aspect ratio,object-fit: cover; object-position: top.justify-self: start. It isinline-flex, but as a grid item the browser turns it into a block that stretches across the cell.Tests
test/home-tiles.test.tsloads the signed-out home in real headless Chromium at 393 px (3×) and 1280 px (1× and 2×). It checks that the chosen picture has at least as many pixels as the tile has device pixels, the image fit and position, the badge narrower than half the tile, a gap of at least 24 px, and no sideways scroll. All three cases fail against the old markup and CSS. It skips when Chromium is missing and says so.evaluateInPageintest/helpers/chrome.ts;measurePageWidthnow calls it.test/looks-thumb.test.tschecks the thumb is 640×400 and keeps the desktop picture's far corner.test/looks.test.tsgains a test that an old 1×1 thumb is rescaled on boot without calling the browser.forge.jsoncheck.Tests I changed, because they asserted the old behaviour this issue replaces
test/looks.test.ts: two browser calls per page instead of three, no 200×125 call, and the thumb is 640×400. The stand-in browser now writes a real 1280×800 picture at desktop width.test/studio.test.ts(#287): the tile iswidth="640" height="400"with a desktop1280wsource. The other #287 test, for a desktop-only tile, is unchanged and passes.Not done
Check status: the
forge.jsoncheck ran 604 tests, with 2 failures in shard 2, neither in looks or the home page. The vitals token test passed when rerun alone. The fork-flow mirror test failed in 2 of 4 runs on this branch and passed once onmain, so it looks like a timing flake.tscis clean.To try: on the preview, open
/signed out at phone width and at 1280 px. Tiles from before this change are rescaled when the forge boots.🤖 Generated with Claude Code
Closes #473