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

The owner's /resilience page fits a 390 px phone: no sideways scroll, long names wrap #9362

opened this

Merged 31d 9h ago, live in production

On a 390 px phone, /resilience now wraps each protection's full sentence and its test path onto more lines. Before, each one was cut to one line ending in "…". The page did not scroll sideways before this change (the row's title area could already shrink), but the owner could not read the long lines.

Notes

opened this

On a 390 px phone, /resilience now wraps each protection's full sentence and its test path onto more lines. Before, each one was cut to one line ending in "…". The page did not scroll sideways before this change (the row's title area could already shrink), but the owner could not read the long lines.

  • Fix (src/web/pages/resilience.ts): the page body sits inside [data-resilience], an attribute rather than a new class. The page ships RESILIENCE_CSS, which turns on overflow-wrap: anywhere and lets a row's title and meta wrap. It follows the pulls list fix (#9354), and sets no fixed width. The row markup moved unchanged into an exported protectionsHtml(rows), so a test can render seeded rows. No route and no data read changed.
  • Test (test/resilience-fit.test.ts): the rows come from docs/THREATS.md, not from data the test can seed. So it renders protectionsHtml with 40 seeded rows: a 300-character unbroken word, a long sentence, a 150-character test path and a long adversary name. It also fetches the real page as an admin. It asserts that no inline width and no shipped rule fixes a width over 390 px, and that the container wraps anywhere. Without the fix, the wrap assertion fails.
  • Phone look: src/spawn/preview-looks.ts adds /resilience to the looks each preview takes at desk and phone, so the pull gets a 390 px picture. The preview admin is a site admin, so it can open the page. This file is outside the issue's list, but without it the preview takes no phone look to link.
  • Docs: docs/design/areas/resilience.md is new and describes the attribute; no new class.

Not done: no Chromium measurement of the page at 390×844 like the one in bets-card-fit. Chromium does not start in this sandbox, so the test reads the markup and CSS. The keep_plan tool the issue asks for was not available in this run, so the issue has no plan.

Phone look: the preview's phone picture of /resilience, which this pull's preview takes on every push. I haven't seen it yet, so whether it scrolls sideways at 390 px is not yet checked against a screenshot.

To try it: sign in as an admin on the preview and open /resilience at 390 px wide. Every protection and test path should show in full, with no sideways scroll.

Checks run: bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit pass. The new test, the page's existing resilience tests and the preview-looks and other fit tests (65 tests) pass, with the Chromium measurements skipped. scripts/fast.ts named 1208 files for this diff, too many to run, so I picked those test files by hand.

🤖 Generated with Claude Code

Closes #9328

6 earlier comments
commented

On a 390 px phone, /resilience now wraps each protection's full sentence and its test path onto more lines. Before, each one was cut to one line ending in "…". The page did not scroll sideways before this change (the row's title area could already shrink), but the owner could not read the long lines.

  • Fix (src/web/pages/resilience.ts): the page body sits inside [data-resilience], an attribute rather than a new class. The page ships RESILIENCE_CSS, which turns on overflow-wrap: anywhere and lets a row's title and meta wrap. It follows the pulls list fix (#9354), and sets no fixed width. The row markup moved unchanged into an exported protectionsHtml(rows), so a test can render seeded rows. No route and no data read changed.
  • Test (test/resilience-fit.test.ts): the rows come from docs/THREATS.md, not from data the test can seed. So it renders protectionsHtml with 40 seeded rows: a 300-character unbroken word, a long sentence, a 150-character test path and a long adversary name. It also fetches the real page as an admin. It asserts that no inline width and no shipped rule fixes a width over 390 px, and that the container wraps anywhere. Without the fix, the wrap assertion fails.
  • Phone look: src/spawn/preview-looks.ts adds /resilience to the looks each preview takes at desk and phone, so the pull gets a 390 px picture. The preview admin is a site admin, so it can open the page. This file is outside the issue's list, but without it the preview takes no phone look to link.
  • Docs: docs/design/areas/resilience.md is new and describes the attribute; no new class.

Not done: no Chromium measurement of the page at 390×844 like the one in bets-card-fit. Chromium does not start in this sandbox, so the test reads the markup and CSS. The keep_plan tool the issue asks for was not available in this run, so the issue has no plan.

Phone look: the preview's phone picture of /resilience, which this pull's preview takes on every push. I haven't seen it yet, so whether it scrolls sideways at 390 px is not yet checked against a screenshot.

To try it: sign in as an admin on the preview and open /resilience at 390 px wide. Every protection and test path should show in full, with no sideways scroll.

Checks run: bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit pass. The new test, the page's existing resilience tests and the preview-looks and other fit tests (65 tests) pass, with the Chromium measurements skipped. scripts/fast.ts named 1208 files for this diff, too many to run, so I picked those test files by hand.

🤖 Generated with Claude Code

commented

On a 390 px phone, /resilience now wraps each protection's full sentence and its cited test path onto more lines. Before, each one was cut to one line ending in "…". The page did not scroll sideways before this change (the row's text could already shrink), but the owner could not read the long lines. No route and no data read changed.

  • Fix (src/web/pages/resilience.ts): the page body sits inside [data-resilience], an attribute rather than a new class. The page ships RESILIENCE_CSS, which turns on overflow-wrap: anywhere and lets a row's title and meta wrap, following the pulls list fix (#9354). It sets no fixed width. The row markup moved unchanged into an exported protectionsHtml(rows), so a test can render seeded rows.
  • Test (test/resilience-fit.test.ts): the rows come from docs/THREATS.md, not from data a test can seed. So it renders protectionsHtml with 40 seeded rows: a 300-character unbroken word, a long sentence, a 150-character test path and a long adversary name. It also fetches the real page as an admin. It asserts that no inline width and no shipped rule fixes a width over 390 px, and that the container wraps anywhere. Without the fix, the wrap assertion fails.
  • Phone look: src/spawn/preview-looks.ts adds /resilience to the looks each preview takes at desk and phone. The issue doesn't list this file, but without it the preview has no phone picture of the page. The preview admin is a site admin, so it can open the page.
  • Docs: docs/design/areas/resilience.md is new and describes the attribute; no new class.
  • Gate fix: the check failed because no commit message had a Try: line. A follow-up commit adds one, and the gate now passes.

Not done:

  • No Chromium measurement: the page isn't measured at 390×844 the way bets-card-fit measures the bets page. Chromium does not start in this sandbox, so the test reads the markup and CSS instead.
  • No plan on the issue: the keep_plan tool the issue asks for was not available in this run.

Phone look: the preview's phone picture of /resilience comes from this pull's preview. I haven't seen it, so whether the page scrolls sideways at 390 px is not yet checked against a screenshot.

To try it: sign in as the preview admin and open /resilience at 390 px wide. Every protection and test path should show in full, with no sideways scroll.

Checks run:

  • bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit pass.
  • The new test, the page's existing resilience tests, and the preview-looks and other fit tests pass, with the Chromium measurements skipped.
  • scripts/fast.ts named 1208 test files for this diff, too many to run here, so I picked the covering tests by hand.

🤖 Generated with Claude Code

commented

I've changed the test and rewritten the pull description below; the fix itself is unchanged. The new commit's check came back green. It measured /resilience in a real browser at 390 px, and the page does not scroll sideways. I could not open or attach the preview's phone picture itself, so @sentinel's request is only partly met.

On a 390 px phone, /resilience now wraps each protection's full sentence and its test path onto more lines. Before, each one was cut to one line ending in "…".

Phone look: the preview's phone picture of /resilience is at https://forge.open-platform.sh/trevato/forge/looks/pull-9362/22e693b98589d3197c98eed5ae6ad29fdc7f7480/resilience-phone.png. The page is live at https://lab--9362--forge-trevato-apps.open-platform.sh/resilience (sign in as an admin).

Verdict: at 390 px the page does not scroll sideways. Chromium in this pull's check (run 01m6gwd..., now 01m6gw0dk373yadaqb1r00c0b5) loaded the page as an admin at 390×844. It logged resilience look 390x844: {"scrollWidth":390,"viewportWidth":390,"overflowing":[]}: the page is exactly as wide as the screen, and no element inside it runs past the edge. At 1280×800 it logged 1280 against 1280.

Two limits on that picture link:

  • I have not seen the picture. Pictures taken as the owner are for writers only, and my token gets a 404 for them.
  • It may not exist yet. The looks service runs the forge's deployed code, and the /resilience entry this pull adds to src/spawn/preview-looks.ts is only on this branch. The service may not take the picture until this lands.

So the verdict above comes from the measured test, not from the picture.

  • Fix (src/web/pages/resilience.ts): unchanged. The page body sits inside [data-resilience], an attribute rather than a class, and RESILIENCE_CSS turns on overflow-wrap: anywhere and lets a row's title and meta wrap. It sets no fixed width, and no route or data read changed.
  • Test (test/resilience-fit.test.ts): it still checks the markup and CSS with 40 seeded rows, including a 300-character unbroken word and a 150-character test path. New in this push: where Chromium starts, it loads /resilience as an admin at 390×844 and 1280×800. It requires no sideways scroll and no element inside [data-resilience] past the screen edge. Chromium cannot start in my sandbox (it isn't allowed to open the socket it needs), so these two tests are skipped here; the forge's check runs them.
  • Phone look: src/spawn/preview-looks.ts adds /resilience to the owner looks every preview takes at desk and phone width.
  • Docs: docs/design/areas/resilience.md describes the attribute; there is no new class.

To try it: sign in as an admin on the preview and open /resilience at 390 px wide. Every protection and test path should show in full, with no sideways scroll.

Checks run: bun x tsc --noEmit and bun scripts/gate.ts pass on this push. bun test test/resilience-fit.test.ts gives 5 passed and 2 skipped here. The forge's full check passed: 11,570 tests, none failing. bun scripts/design-lint.ts passed on the earlier push; this push only touches the test.

🤖 Generated with Claude Code

Closes #9328

commented

On a 390 px phone, the owner's /resilience page now wraps its protections and test paths instead of cutting each one to a single line. test/resilience-fit.test.ts loads the page at 390×844 and 1280×800 in a real browser, where one will start, and checks that nothing scrolls sideways. The page is also on the preview's list of owner pages photographed at desktop and phone size (PREVIEW_OWNER_LOOKS in src/spawn/preview-looks.ts).

This push merges main into the branch. The only conflict was in that list: main added the issues page in the same spot, and the list now keeps both the issues page and /resilience.

Gate and bun x tsc --noEmit pass. I ran test/resilience-fit.test.ts, test/issues-fit.test.ts and test/looks.test.ts. Three tests in test/looks.test.ts fail because Chromium crashes on startup in this sandbox (exit 133); those tests take real screenshots and none of them involve this change. For the same reason, the in-browser measurement in test/resilience-fit.test.ts was skipped here. The forge's check runs all of these.

To try it, open /resilience as the owner on the preview at https://lab--9362--forge-trevato-apps.open-platform.sh with a 390 px wide viewport. The page should not scroll sideways, and long protection names and test paths should wrap.

🤖 Generated with Claude Code

commented

On a 390 px phone, the owner's /resilience page now wraps its protections and test paths instead of cutting each one to a single line. test/resilience-fit.test.ts loads the page at 390×844 and 1280×800 in a real browser, where one will start, and checks that nothing scrolls sideways. The page is also on the preview's list of owner pages photographed at desktop and phone size (PREVIEW_OWNER_LOOKS in src/spawn/preview-looks.ts).

This push merges main into the branch again. The conflict was in src/spawn/preview-looks.ts: main added PREVIEW_COMMITS_PAGE where this branch added PREVIEW_RESILIENCE_PAGE. Both constants are kept, and the photographed list now has the commits, issues and resilience pages.

Gate and bun x tsc --noEmit pass, and so do test/resilience-fit.test.ts, test/commits-fit.test.ts and test/issues-fit.test.ts. Two tests were skipped: Chromium will not start in this sandbox, so the in-browser measurements did not run here. The forge's check runs them.

To try it, open /resilience as the owner on the preview at https://lab--9362--forge-trevato-apps.open-platform.sh with a 390 px wide viewport. The page should not scroll sideways, and long protection names and test paths should wrap.

🤖 Generated with Claude Code

commented

On a 390 px phone, /resilience now wraps each protection's full sentence and its test path onto more lines. Before, each one was cut to a single line ending in "…". The page did not scroll sideways before this change either, but the owner could not read the long lines.

Verdict: at 390 px the page does not scroll sideways. In this pull's check, Chromium loaded the page as an admin and logged:

  • resilience look 390x844: {"scrollWidth":390,"viewportWidth":390,"overflowing":[]}: the page is exactly as wide as the screen, and nothing inside it runs past the edge.
  • At 1280×800 the page measured 1280 against a 1280 viewport.

That check ran on 22e693b9. Every commit since then is a merge of main that touches only the list of preview pages, so the CSS and markup it measured are unchanged.

Phone look: https://forge.open-platform.sh/trevato/forge/looks/pull-9362/22e693b98589d3197c98eed5ae6ad29fdc7f7480/resilience-phone.png. The picture is visible to owners only. The measured numbers above are the evidence anyone can check.

  • Fix (src/web/pages/resilience.ts):
    • The page body sits inside [data-resilience], an attribute rather than a new class.
    • The page ships RESILIENCE_CSS, which turns on overflow-wrap: anywhere and lets a row's title and meta wrap. It follows the pulls list fix (#9354) and sets no fixed width.
    • The row markup moved unchanged into an exported protectionsHtml(rows), so a test can render seeded rows. No route or data read changed.
  • Test (test/resilience-fit.test.ts):
    • It renders protectionsHtml with 40 seeded rows: a 300-character unbroken word, a long sentence, a 150-character test path and a long adversary name.
    • It also fetches the real page as an admin.
    • It asserts that nothing fixes a width over 390 px and that the container wraps anywhere. Without the fix, the wrap assertion fails.
    • Where Chromium starts, it measures the page at 390×844 and 1280×800 and logs the numbers quoted above.
  • Preview pages (src/spawn/preview-looks.ts): PREVIEW_RESILIENCE_PAGE is added to the owner pages the preview photographs. This is merged with current main and keeps every PREVIEW_*_PAGE constant it has, including PREVIEW_NEXT_PAGE, PREVIEW_COMMITS_PAGE and PREVIEW_ISSUES_PAGE.

Gate, bun x tsc --noEmit, test/resilience-fit.test.ts, test/next-fit.test.ts and test/commits-fit.test.ts pass on 4b85a3f2. The three in-browser measurements in those files were skipped here because Chromium will not start in this sandbox; the forge's check runs them.

Not done: the rows still come from docs/THREATS.md as before, and other admin pages were not changed.

To try it, sign in as an admin on https://lab--9362--forge-trevato-apps.open-platform.sh/resilience with the window 390 px wide. The page should not scroll sideways, and every protection and test path should be shown in full.

🤖 Generated with Claude Code

commented

I merged the latest main into this branch again so the pull merges cleanly. The resilience page (/resilience) now fits a 390 px phone: its protections and test paths wrap instead of scrolling the page sideways. The page is also on the list of owner screenshots the preview takes, at desktop and phone width.

The only conflict was in src/spawn/preview-looks.ts, and I kept both sides:

  • Next to PREVIEW_CHANGELOG_PAGE: PREVIEW_RESILIENCE_PAGE stays, and main's new PREVIEW_CHANGELOG_PAGE (the changelog, #9349) sits beside it.
  • In PREVIEW_OWNER_LOOKS: the list keeps PREVIEW_RESILIENCE_PAGE and adds main's PREVIEW_SEARCH_PAGE.

bun scripts/gate.ts and bun x tsc --noEmit pass. I ran five test files: preview-looks, looks-owner, resilience-fit, changelog-fit and search-fit. 38 tests passed, none failed, and 3 were skipped because they need unix sockets, which this sandbox can't open. The forge's check runs them on this push.

To try it, open /resilience on the preview at a 390 px width and check that nothing scrolls sideways.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs