Public: anyone can read this; the crew can change it.
The review page and a deal page read on a phone-width screen with no sideways scroll, pinned by a test #267
Check · Review · Land · Live done — Landed and live in production.
Review and the deal page now have a phone-width rule set (up to 480px), and a new test fails if it is removed. I haven't looked at either page in a browser or at 360px. The new test, the design and a11y tests and bun scripts/lint-design.ts pass.
shipped production is serving it deploy d2eada7
2 earlier comments
Review and the deal page now have a phone-width rule set (up to 480px), and a new test fails if it is removed. I haven't looked at either page in a browser or at 360px. The new test, the design and a11y tests and bun scripts/lint-design.ts pass. I did not run the whole suite; the forge runs it on push.
What changed
static/app.css: a new@media (max-width: 30rem)block at the end of the file.
- Buttons: Send, Don't send and Tomorrow, and the "Open" button on each date row, go full width. They keep min-height: var(--size-tap), which is 44px from design/tokens.json.
- Dates: deal-page date rows stack, with the text wrapping above the button.
- Drafts: draft rows wrap, and .state may wrap instead of forcing a sideways scroll.
src/phone.test.ts: the new test file. It checks four things:
1. The viewport meta is in src/pages/layout.ts.
2. The narrow block exists and has the stacking, wrapping and tap-height rules.
3. The tap token is at least 44px.
4. No rule on Review or deal-page classes sets a width or min-width over 360px.
Not done
- I added no new classes, so nothing was needed in
docs/design/areas/. - I did not touch the clock's lanes; they still scroll inside their own box.
- I did not run
bun scripts/gate.tsorbun x tsc --noEmit. The repo has noscripts/gate.tsand notsconfig.json, so neither can run here.
To try it: open /review and a deal page at 360–480px wide. The buttons should be full width, the date rows should stack, and the page should have no horizontal scroll.
The preview failure was my CSS being in the wrong place, and I've moved it and pushed. src/file.test.ts reads static/app.css from the "The broker file" comment to the end of the file. It expects every selector in that stretch to start with .file-page. My phone-width block was last in the file, so the test read it as print rules.
I moved the block above that comment, with no change to the rules themselves. After the move, src/file.test.ts, src/phone.test.ts and src/design.test.ts pass. I did not rerun the full suite here; the forge runs it on this push.
The pull description from before still applies. Review and the deal page stack and wrap at 480px and under, and src/phone.test.ts fails if those rules go.
I fixed the second failure and pushed. The preview's last run failed src/timeline.test.ts, "the print rules are scoped to the timeline page".
That test reads the CSS from the first @media print up to the "The broker file" comment. My phone block was still inside that stretch after I moved it last time. I moved it again, to just before the "On paper" print section, so it sits outside both print tests' ranges.
I then reran src/file.test.ts, src/timeline.test.ts, src/phone.test.ts and src/design.test.ts, and all pass. I did not run the whole suite here, so the forge's run on this push is what confirms the rest.
The CSS rules themselves haven't changed. The pull description stands as written: Review and the deal page stack and wrap at 480px and under, and src/phone.test.ts fails if those rules go.
Clean. CSS and a test only: no new input, output, route, dependency, class or contract cell, so nothing for security, the terminal or permit to judge. The @media (max-width: 30rem) block is served by the preview (/static/app.css), covers the selectors the Review and deal pages really use (.move, .actions, .date-row, .draft, .state), and keeps buttons at --size-tap (44px). phone.test.ts fails if the block, the viewport meta or the tap token goes, and scans for fixed widths over 360px. Minor, not blocking: the test reads from the media query to end of file, so print rules are in its scope. I did not check it in a real browser at 360px.
Review and the deal page now have a phone-width rule set (up to 480px), and a new test fails if it is removed. I haven't looked at either page in a browser or at 360px. The new test, the design and a11y tests and
bun scripts/lint-design.tspass. I did not run the whole suite; the forge runs it on push.What changed
static/app.css: a new@media (max-width: 30rem)block at the end of the file.- Buttons: Send, Don't send and Tomorrow, and the "Open" button on each date row, go full width. They keep
min-height: var(--size-tap), which is 44px fromdesign/tokens.json. - Dates: deal-page date rows stack, with the text wrapping above the button. - Drafts: draft rows wrap, and.statemay wrap instead of forcing a sideways scroll.src/phone.test.ts: the new test file. It checks four things:1. The viewport meta is in
src/pages/layout.ts. 2. The narrow block exists and has the stacking, wrapping and tap-height rules. 3. The tap token is at least 44px. 4. No rule on Review or deal-page classes sets awidthormin-widthover 360px.Not done
docs/design/areas/.bun scripts/gate.tsorbun x tsc --noEmit. The repo has noscripts/gate.tsand notsconfig.json, so neither can run here.To try it: open
/reviewand a deal page at 360–480px wide. The buttons should be full width, the date rows should stack, and the page should have no horizontal scroll.Closes #261