Public: anyone can read this; the crew can change it.
A client's invite page and first-login page are readable at 360 px with no horizontal scroll #15122
Check · Review · Land · Live done — Landed and live in production.
The invite page (/claim, /welcome) and the first-login card now wrap their text at 360 px instead of clipping it. I never measured either page at 360 px: there is no browser in the sandbox, so the no-horizontal-scroll check rests on the CSS rules and the test below.
shipped production is serving it deploy cfe12e4
7 earlier comments · 2 events
The invite page (/claim) and the first-login card now wrap at 360px, and the vacuous tests are replaced. I couldn't open either page at 360px here: the sandbox has no Chromium, and the one real-capture test in test/looks.test.ts fails here for that reason, on the base commit as well. I ran test/claim-phone-fit.test.ts, tsc, design-lint and gate; all pass.
CSS (src/web/style/components.ts)
- Crew rows:
.row-titleand.row-metain#crew-nowand#next-stepsnow wrap to at most two lines (-webkit-line-clamp: 2), and the rows still wrap. They no longer useoverflow: visible, so the list can't grow without bound on a phone. - Long words:
overflow-wrap: anywhereis gone from.narrow. It is nowbreak-word, only on the claim page's settings block and#next-steps. Sign-in and the other.narrowpages are untouched.
Tests (test/claim-phone-fit.test.ts)
- Dropped: the viewport test and the hand-picked selector list.
- Width check: it now takes every class and id from the rendered
/claimHTML and from the class literals inclaim.ts,next-steps.tsandforge_made.ts. It adds.input,.btn,.to-phoneand the row classes. It then scans every matching rule inbase,componentsandcontentforwidthormin-widthin px, rem, em or ch (as px: 1, 16, 16 and 8 per unit) over 360px, and skips@media (min-width: 361px+)blocks. This check passes onmainas well, because the change adds no width. It guards against one being added. - Behaviour: the two-line clamp and the scoped
break-wordtests fail onmain's CSS and pass here; I ran them againstmain'scomponents.tsto confirm.
/claim picture: /claim is added to forge.json app.looks, so the forge takes a picture of it. I didn't check at what width the looks job captures.
Wording: no wording changed. The CSS comment and the passkey.md note are the only text added, and passkey.md now says two lines.
Left out
- The terminal is unaffected, since this is CSS only.
#crew-now's class literals are not scanned (crew-now.tsdoesn't exist); its rows use the shared.rowclasses, which are covered.
[
{"go": "/claim at 360px wide", "look": "the invite page, a long username and the crew rows", "expect": "no sideways scroll; each crew row is at most two lines"},
{"go": "/ signed in, first login", "look": "the first-login card", "expect": "wraps at 360px; row text clamps at two lines"},
{"go": "/login at 360px wide", "look": "another .narrow page", "expect": "wraps as before; the claim change doesn't touch it"}
]The preview deploy failed because app.looks was already at 32 paths. I've pushed a fix that drops /claim from the looks and puts forge.json back to main's list. The 16 tests in test/forge-looks.test.ts, test/look-pages-comment.test.ts and test/claim-phone-fit.test.ts now pass.
My first attempt swapped /claim in for /nope/nothing. That broke two tests in test/forge-looks.test.ts, which I only caught after pushing. This forge answers /claim with 404, even to an admin, and the test names it as not a page. It exists only on a child forge for the link-holder. So a look path for /claim isn't possible here, and the claim page at 360px is not pictured by the forge.
What stands in its place:
- Width check:
test/claim-phone-fit.test.tsrenders/claimon a real child forge and scans every rule that applies to its classes for a width over 360px. - Two-line wrap and scoped
break-word: the same file tests both, and each fails on main's CSS. - First-login card: it appears on
/once a child forge's owner signs in. It is covered by the CSS rules and the width check, but no look picture shows it. - Claim page picture: to see it, open
/claimat 360px on a spawned forge. No one has done that yet.
The rest of the pull is as in my previous message: the CSS wrap (two lines, scoped break-word) and the three tests. No wording was changed.
[
{"go": "/claim at 360px on a spawned forge", "look": "the invite page", "expect": "no sideways scroll; crew rows are at most two lines"},
{"go": "/ signed in as a new forge's owner", "look": "the first-login card", "expect": "wraps at 360px; row text clamps at two lines"}
]<!-- look-pages b5f2f231f076 --> Look pages for b5f2f23, from the gate:
look pages (named): this pull changes src/web/style/components.ts; a commit names /
The gate message is a report, not a failure. It lists the look pages for b5f2f23: / is named by a commit, and this pull changes src/web/style/components.ts. It asks for no change, so I made none. The working tree is clean and nothing new is pushed.
/claim is not in the forge.json looks, which are back to the original list. The forge answers /claim with a 404 to an admin, so it can't serve as a look. The 360px check on the claim page is covered by the test that derives its width check from the page's classes.
I did not re-run bun test or tsc in this turn. The last commit only touched the forge.json looks list.
Review
[{"go":"/","look":"the home page at 360px wide","expect":"no horizontal scroll and no layout shift"}]Earlier asks: the unbounded overflow:visible and the global overflow-wrap:anywhere on .narrow are fixed (two-line clamp, break-word scoped to the claim block and #next-steps). That is met. One miss remains. Issue box 2 asks for a test asserting the viewport meta, and the header comment of test/claim-phone-fit.test.ts claims it, but the last round dropped that test and nothing asserts it now. Fix first: fetch /claim from the child forge in the test and expect the HTML to match meta name=viewport content containing width=device-width; do the same for the signed-in / first-login card if reachable. Non-blocking: the two wrap tests regex the CSS source text, so they pin wording of the rule rather than behaviour; fine for now. Non-blocking: no picture of /claim or the card exists (404 on this forge), so box 1 rests on rules alone; open an issue for a 360px capture on a spawned forge. Design: no new class, no README change, no src/tui screen needed for CSS-only, docs note in passkey.md is right.
The claim page (/claim) and the first-login card (the signed-in / on a forge spawned for a client) read at 360 px with no horizontal scroll. This round puts back the viewport test that the header of test/claim-phone-fit.test.ts describes but that the last round had dropped.
- Viewport tests: two new tests fetch the rendered HTML and expect a
<meta name="viewport">whose content includeswidth=device-width.- The invite page:
/claimon the spawned child forge. - The first-login card:
/signed in as the new owner on a claimed forge, from thetest/helpers/claimed-forge.tshelper. The test first checks thatid="next-steps"is on the page, so it is reading the card and not a generic home.
- The invite page:
- Earlier fixes, unchanged: each crew row wraps to two lines and then clips. The break for long words applies only to the claim block and
#next-steps, not to every page using the.narrowlayout. - Not done: the two wrap tests still match the CSS source text, so they pin how the rule is worded rather than how the page behaves; the review marked this as fine for now. There is still no picture of either page at 360 px, so #15220 asks for that capture on a spawned forge.
bun test test/claim-phone-fit.test.ts passes (5 tests), bun x tsc --noEmit is clean, and bun scripts/gate.ts --fix reports only the look-pages note.
[{"go":"/claim","look":"the invite page at 360px wide","expect":"no horizontal scroll; the forge name and buttons wrap inside the screen"},
{"go":"/","look":"the first-login card at 360px wide, signed in as the new owner","expect":"no horizontal scroll; crew rows wrap to at most two lines"}]
🤖 Generated with Claude Code
<!-- look-pages e76915f267f3 --> Look pages for e76915f, from the gate:
look pages (named): this pull changes src/web/style/components.ts; a commit names /
The claim page (/claim) and the first-login card (the signed-in / on a spawned forge) read at 360 px with no horizontal scroll. The latest look-pages note for e76915f is the same one as for b5f2f23. It lists the pages to look at and names no failure, so there is nothing new to push and the branch is level with the forge.
What to look at:
- CSS (
src/web/style/components.ts): each crew row on the card wraps to at most two lines, then clips. Long words break only inside the claim block and#next-steps, not on every page using the.narrowlayout. - Tests (
test/claim-phone-fit.test.ts):- Both pages are checked for a viewport meta with
width=device-width./claimis fetched from a spawned child forge./is fetched signed in as the new owner, and the test first checks thatid="next-steps"is on the page. - No style rule that applies to either page sets a width over 360 px.
- The two-line wrap and the narrow scope of the long-word break are checked.
- Both pages are checked for a viewport meta with
- Not done: the two wrap tests match the CSS source text, so they pin how the rule is worded rather than how the page behaves. There is still no 360 px picture of either page, because the forge answers
/claimwith a 404 to an admin and no look can capture it. #15220 asks for that capture on a spawned forge.
That test file passes (5 tests) and bun x tsc --noEmit is clean; both were run before e76915f was pushed.
[{"go":"/claim","look":"the invite page at 360px wide","expect":"no horizontal scroll; the forge name and buttons wrap inside the screen"},
{"go":"/","look":"the first-login card at 360px wide, signed in as the new owner","expect":"no horizontal scroll; crew rows wrap to at most two lines"}]
🤖 Generated with Claude Code
Since my last review the only change is the two viewport tests, one for /claim on a spawned child forge and one for the signed-in / with #next-steps. That was my earlier ask, and it is met. The CSS is scoped (break-word only on the claim block and #next-steps, two-line clamp on crew rows), no new class, and the passkey.md note is in the right place. The README is untouched.
I could not diff against b5f2f231f076 because the commit is not in the clone, so I judged the change as listed. I did not open the pages at 360px.
Next two things, both non-blocking:
- Non-blocking: the wrap tests match the CSS source text, so they pin the wording of the rule rather than the page. Replace them with a real 360px capture once #15220 lands.
- Non-blocking: take a phone-width look at /claim and the first-login card on a spawned forge. Neither page has a picture today, because /claim 404s on this forge.
Left #15090 open: 1 unticked item remain (Both pages have a look at 360 px with no horizontal overflow).
The invite page (
/claim,/welcome) and the first-login card now wrap their text at 360 px instead of clipping it. I never measured either page at 360 px: there is no browser in the sandbox, so the no-horizontal-scroll check rests on the CSS rules and the test below.test/claim-phone-fit.test.tsandtest/claim-page-words.test.tspass,bun x tsc --noEmitis clean, andbun scripts/design-lint.tsis clean. I did not run the full suite; the forge's check does that on push.What changed
#crew-nowand#next-stepsare the crew's-work list on the invite page and the first-login card. Their titles and meta lines were forced onto one line and clipped with an ellipsis, so a phone showed half a sentence. They now wrap, and long names break instead of pushing the page sideways. The rules are at the end ofsrc/web/style/components.ts.test/claim-phone-fit.test.tsboots a spawned forge and asserts the/claimpage haswidth=device-width, initial-scale=1. It also asserts that no rule for the page's CSS sets awidthormin-widthover 360 px, and that the crew lines havewhite-space: normal. The rule scan matches by selector text, so a width added under an unrelated selector would not be caught.docs/design/areas/passkey.md. There is no new component class.Not done
.narrowkeepsmax-width: 400px; that is a cap, not a fixed width, so it shrinks on a phone.The pre-push hook wants a "Try:" commit per push, so there is an empty commit saying how to try it.
To try: open a spawned forge's
/claim#<token>at 360 px wide and read it top to bottom without scrolling sideways.Closes #15090