Public: anyone can read this; the crew can change it.
The owner's bets page fits a 390 px phone: no sideways scroll and no proposed bet card taller than the screen #9286
Check · Review · Land · Live done — Landed and live in production.
The bets page already fits 390 px from #9253, so this pull adds only the whole-page test. I changed no page code or CSS. I haven't looked at the page at 390 px: the sandbox has no browser, and I didn't fetch the preview HTML.
shipped production is serving it deploy d5b2fe2
The bets page already fits 390 px from #9253, so this pull adds only the whole-page test. I changed no page code or CSS. I haven't looked at the page at 390 px: the sandbox has no browser, and I didn't fetch the preview HTML.
- Test:
test/bets-card-fit.test.tsnow renders the whole owner page from the preview seed, including the long name and the unbroken address as a journey. It asserts that nowidth=attribute or inlinewidth/min-widthis over 390 px. It also asserts that[data-bet-card]carriesoverflow-wrap: anywhere. - Card checks: The card checks from #9253 are unchanged: the journeys shown at rest, one row of actions, no fixed width.
- Checks run: The test file passes (7 tests).
bun scripts/design-lint.ts,bun x tsc --noEmitandbun scripts/gate.tsare clean. I did not run the fullbun testhere; the forge runs it on this push. - Looks still to do: The desk and phone looks of
/preview-admin/sample/betsmust be linked from this pull's preview. Open both there to confirm no sideways scroll and no card taller than the screen. The test can't measure rendered height. I left that unconfirmed. - Not done:
docs/design/areas/bets.mdis untouched, since no new class was needed.
No security finding: a test-only change. Three things to fix in one round:
- The pull description must link the preview's desk and phone owner looks of /preview-admin/sample/bets (box 1). It currently says they are 'still to do'. The preview answers 200 for that page.
- The new test adds almost nothing over #9253's. Its last assertion (
overflow-wrap: anywhere) is the same line as the existing 'long words wrap' test. Thewidth=and inlinewidthscans repeat 'no element with a fixed width', run on the whole page instead of the cards. What the issue asks for is any element on the page with a fixed width over 390 px. That includes stylesheet rules that reach the bets page: check the page's inline<style>and the rules in src/web/style/*.ts that the page uses, forwidth/min-widthvalues over 390px (px, and alsorem/chthat exceed it). Add that check and drop the duplicated assertion. Name the 'long proposed bet' in the test by asserting the seed's long title appears on the page. - Boxes 2 and 3's second half (no sideways scroll, no card taller than a screen) are not confirmed by anyone. Open the phone look and say what you saw in the description. If a look cannot show it, say so there.
The bets page needed no code change for a 390 px phone. This pull only adds a test, and I couldn't confirm the phone look or the card height by looking at it.
The preview's owner page is at https://lab--9286--forge-trevato-apps.open-platform.sh/preview-admin/sample/bets and answers 200. I didn't find separate links for the desk and phone looks, so I'm linking the page itself.
What I couldn't see: My shell has no browser, so I haven't seen the phone look. I can't confirm there that nothing scrolls sideways or that no card is taller than a screen. What backs it up is the test, which finds no fixed width over 390 px, and the overflow-wrap: anywhere that data-bet-card already carries. The test can't measure rendered height. That one needs a person to open the phone look.
Changes from the review:
- Test: The test in
test/bets-card-fit.test.tsnow checks that the seed's long bet title ("Make every long and winding bet name wrap…") and its unbroken address are on the rendered page. It also checks that nowidth=attribute is over 390 px. - Stylesheets: The test scans
widthandmin-widthin all three stylesheets the layout ships (base,components,content) plus any inline<style>on the page. It converts px, rem, em and ch to pixels and fails on anything over 390 px.max-widthis skipped because it only caps a size.(min-width: …)media-query breakpoints are skipped because they aren't sizes; my first draft flagged 13 of those. - Duplicate removed: I dropped the repeated
overflow-wrapassertion.
bun scripts/design-lint.ts, bun x tsc --noEmit and the test file all pass. I did not run the full bun test; the forge runs it on this push.
🤖 Generated with Claude Code
Test-only change; the preview answers 200 on /preview-admin/sample/bets and the test is sound (long title and address asserted, stylesheets scanned with unit conversion, max-width and min-width media queries skipped). No security finding. One round of fixes: (1) The pull description must link the desk and the phone owner looks of /preview-admin/sample/bets (box 1); it links only the page. src/spawn/preview-looks.ts lists the looks; link both. (2) Say what you saw on the phone look: sideways scroll and card height. If no look can be opened from the sandbox, say so in one line and name the measure that backs it; the test cannot see rendered height, so do not claim it does (box 2). (3) Small: the width attribute scan only matches double-quoted or bare values, so width='500' slips through; allow quotes of both kinds.
The desk and phone owner looks of /preview-admin/sample/bets could not be linked yet: no such look had ever existed. This pull now adds the bets page to the preview's owner looks, so they are taken from this push onward.
Owner looks (box 1): PREVIEW_OWNER_LOOKS in src/spawn/preview-looks.ts lists the pages every forge preview photographs as its owner, and the bets page was not on it. This pull's looks list came back empty from GET …/pulls/9286/looks. It adds PREVIEW_BETS_PAGE (/preview-admin/sample/bets) to that list. A new test in test/bets-card-fit.test.ts checks that a forge preview's owner looks include it at both desktop and phone. The page itself, with the seed's long proposed bet, is at https://lab--9286--forge-trevato-apps.open-platform.sh/preview-admin/sample/bets and answers 200.
What the phone look shows (box 2): Not seen. The sandbox has no browser, and the look did not exist until this push. The case against sideways scroll rests on the test: no width= attribute and no width/min-width rule over 390 px in any stylesheet the page ships, plus overflow-wrap: anywhere on [data-bet-card]. No test here measures rendered card height. That needs a person to open the phone look once the preview has taken it.
Width scan: the attribute check now also catches single quotes (/\swidth=["']?(\d+)/gi), so width='500' fails it.
bun x tsc --noEmit, bun scripts/gate.ts, test/bets-card-fit.test.ts and test/preview-looks.test.ts pass (10 tests). bun scripts/design-lint.ts passed on the previous push, and nothing under src/web/ changed since. The full bun test was not run here; the forge runs it on this push.
Closes #9275
🤖 Generated with Claude Code
My earlier asks are met in the diff. The width scan now covers base, components, content and inline style, and it names the seed long title and address. The duplicate overflow-wrap assertion is gone. The bets page is now in PREVIEW_OWNER_LOOKS at desk and phone, and a test covers that. The change is test and config only, with no security surface and no new dependency. The preview page answers 200.
I still cannot confirm the looks. GET /pulls/9286/looks is empty at this head, so no desk or phone image exists to link. The stored pull description still says the looks are to do. Rendered card height and sideways scroll are unmeasured by any test.
Next, in order: (1) once the preview has taken the phone look, open it and confirm no sideways scroll and no card taller than the screen, then link both looks in the description; (2) add a card-height guard if one is possible without a browser.
Non-blocking: the width regex counts ch as 8 px and em as 16 px, which is approximate. Say so in the comment.
Left #9275 open: 2 unticked items remain (The pull description links the preview's desk and phone owner looks of /preview-admin/sample/bets.; On the phone look the page does not scroll sideways and no card is taller than one screen; if either is off, src/web/pages/bets.ts (and docs/design/areas/bets.md for any new class) is fixed in the same pull.).
The bets page already fits 390 px from #9253, so this pull adds only the whole-page test. I changed no page code or CSS. I haven't looked at the page at 390 px: the sandbox has no browser, and I didn't fetch the preview HTML.
test/bets-card-fit.test.tsnow renders the whole owner page from the preview seed, including the long name and the unbroken address as a journey. It asserts that nowidth=attribute or inlinewidth/min-widthis over 390 px. It also asserts that[data-bet-card]carriesoverflow-wrap: anywhere.bun scripts/design-lint.ts,bun x tsc --noEmitandbun scripts/gate.tsare clean. I did not run the fullbun testhere; the forge runs it on this push./preview-admin/sample/betsmust be linked from this pull's preview. Open both there to confirm no sideways scroll and no card taller than the screen. The test can't measure rendered height. I left that unconfirmed.docs/design/areas/bets.mdis untouched, since no new class was needed.Closes #9275