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

The signed-in home timeline fits a 390 px phone: a post with a 250-character word, a long title and a code span wraps, nothing scrolls sideways #9382

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The signed-in `/` page fit a 390 px phone before this change, as far as I could check without Chromium. The change adds a test that pins this and a few scoped width rules in `src/web/style/content.ts`.

shipped production is serving it deploy 9e69a5f

opened this

The signed-in / page fit a 390 px phone before this change, as far as I could check without Chromium. The change adds a test that pins this and a few scoped width rules in src/web/style/content.ts.

  • What / shows. Signed in, / is the tell box, the "Being built" and "Just shipped" rows, and the app chips. The feed timeline lives at /feed, so that is the page I seeded and tested.
  • Already clipped. A moving row's title is a .row-title that clips to one line with an ellipsis (.row-main has min-width: 0). A long title never pushes the page wider.
  • Rows stay one line. I kept that on purpose. The rows are fixed-height so nothing below them shifts, and wrapping a 250-character word would break that.
  • New rules. I added .moving, .moving > section and #live-chips with min-width: 0 and overflow-wrap: anywhere. A long app name now wraps inside its chip, and .tell-box .input gets min-width: 0. None of these rules reaches another page.
  • New test. test/home-fit.test.ts seeds merged pulls with a 250-character word, a long title and a code-span title. It asserts no inline or shipped width/min-width over 390 px, and that the wrap rules are present.
  • Chromium case, not measured. There is a Chromium case that loads / at 390x844 and asserts scrollWidth <= innerWidth. It was skipped here because no Chromium starts in this sandbox. The forge's check will run it and log the numbers.
  • Test status. The CSS-reading assertions would fail without the new content.ts rules.
  • Checks run. home-fit passes with 3 passing and 1 skipped. The issues, pulls, milestones, next, commits and waves *-fit tests pass. bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit are clean.

I did not touch src/web/pages/site.ts or src/web/feeds.ts, because neither renders the home body. I added no preview look.

To try it, sign in and open / on a phone-width window.

🤖 Generated with Claude Code

Closes #9378

commented

The signed-in / page fit a 390 px phone before this change, as far as I could check without Chromium. The change adds a test that pins this and a few scoped width rules in src/web/style/content.ts.

  • What / shows. Signed in, / is the tell box, the "Being built" and "Just shipped" rows, and the app chips. The feed timeline lives at /feed, so that is the page I seeded and tested.
  • Already clipped. A moving row's title is a .row-title that clips to one line with an ellipsis (.row-main has min-width: 0). A long title never pushes the page wider.
  • Rows stay one line. I kept that on purpose. The rows are fixed-height so nothing below them shifts, and wrapping a 250-character word would break that.
  • New rules. I added .moving, .moving > section and #live-chips with min-width: 0 and overflow-wrap: anywhere. A long app name now wraps inside its chip, and .tell-box .input gets min-width: 0. None of these rules reaches another page.
  • New test. test/home-fit.test.ts seeds merged pulls with a 250-character word, a long title and a code-span title. It asserts no inline or shipped width/min-width over 390 px, and that the wrap rules are present.
  • Chromium case, not measured. There is a Chromium case that loads / at 390x844 and asserts scrollWidth <= innerWidth. It was skipped here because no Chromium starts in this sandbox. The forge's check will run it and log the numbers.
  • Test status. The CSS-reading assertions would fail without the new content.ts rules.
  • Checks run. home-fit passes with 3 passing and 1 skipped. The issues, pulls, milestones, next, commits and waves *-fit tests pass. bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit are clean.

I did not touch src/web/pages/site.ts or src/web/feeds.ts, because neither renders the home body. I added no preview look.

To try it, sign in and open / on a phone-width window.

🤖 Generated with Claude Code

commented

The check failed because no commit message had a Try: line, and I've now pushed one. bun scripts/gate.ts printed nothing after the new commit (I didn't check its exit code), and I didn't re-run the tests or tsc, since the commit changed no code. I haven't seen the forge's check re-run on this push.

The new commit is empty and adds only this line: Try: open the preview's / signed in at a 390 px wide window and check it does not scroll sideways.

The change itself is the same as before. src/web/style/content.ts has a few scoped width rules for the home's moving rows and app chips, and test/home-fit.test.ts pins that / fits a 390 px phone. The Chromium case is skipped in this sandbox, so the forge's check is the first run that measures scrollWidth.

🤖 Generated with Claude Code

commented

The home page already fits a 390 px phone. The failing check was my test measuring it too strictly, so I fixed the test and left the page alone. I've pushed that, but I haven't seen the forge's check re-run on it.

The Chromium run in the forge's check log printed home 390x844: {"scrollWidth":390,"viewportWidth":390,"overflowing":["span.truncate","span.truncate"]}. So the page does not scroll sideways. The two spans it listed are one-line titles inside rows that clip with an ellipsis, so their text runs past the row but is cut off at the row's edge.

My test counted those spans as overflow. It now skips any element that sits inside an ancestor that clips or scrolls. The scrollWidth <= innerWidth assertion is unchanged.

Locally test/home-fit.test.ts passes (3 passing, the Chromium case skipped because no Chromium starts in this sandbox), and bun x tsc --noEmit is clean. The new commit carries the Try: line the gate asks for. I did not re-run bun scripts/gate.ts or bun scripts/design-lint.ts for this push; neither's inputs changed.

The pull now holds the scoped wrap rules in src/web/style/content.ts, the new test, and this measured result.

🤖 Generated with Claude Code

Changes requested — before the latest push

The home already fit 390 px (Chromium printed scrollWidth 390 / viewport 390), so this pull is mostly a pin, but the pin does not cover what the CSS changes. Fix in one round:

  1. FIRST: the new rules for #live-chips .btn (wrap, height:auto) and .tell-box .input have no test. The test seeds no app, so the chips never render; the rule that lets a long app name wrap is never exercised, in jsdom-free CSS regex or in Chromium. Seed an app (or repo that serves) named with a 250-char word, assert the chip is on the page, and let the Chromium case measure it. Also seed a writable repo with a long slug so the tell-box <select> is measured. As written, nothing fails if those rules are removed; the .moving regexes only pin text the pull itself added.
  2. height:auto; white-space:normal on chips changes their height when a name wraps; say in a comment/test that no layout shift occurs on first paint (the chip row is server-rendered, so assert chips are in the served HTML at the same height with and without a long name), or keep the chip one line clipped like the rows.
  3. .moving .row-title { overflow-wrap:anywhere } contradicts the comment: titles are .truncate single-line clips, so it does nothing. Drop it (and the redundant .moving > section min-width; .moving > *{min-width:0} already exists in feed_style.ts) or justify it.
  4. The Chromium measure skips every element with a clipping ancestor, which includes anything inside any overflow:auto box; tighten it to ancestors that are inside main and actually clip text (overflow-x hidden/clip with ellipsis), so a real leak is not excused.
  5. Box 2 asks wide content to scroll in its own box; say in the pull that the home has no code/table/tree, since the code span title case is only seeded as text.
  6. State in the pull body, in one line, what the Chromium case printed and that the page already fit (box 3/4).
commented

The home page already fit 390 px, so this pull is a pin plus two small rules for the long-name cases. The Chromium case is skipped in this sandbox, so the new chip and tell-box measurements have not run yet. The forge's check will print them.

The last Chromium run on this pull printed home 390x844: {"scrollWidth":390,"viewportWidth":390,"overflowing":["span.truncate","span.truncate"]}. That was before the changes below, and the two spans were one-line titles clipped by their row.

What changed, point by point:

  1. Chips and tell box.

- Seeding. test/home-fit.test.ts now seeds a writable app named with a 100-character word (the repo-name limit in src/git/guard.ts). It asserts that the chip and the tell-box <option> are in the served HTML. - Rules. It also asserts the #live-chips .btn and .tell-box .input rules exist. These regex pins fail if the rules are removed. - Chromium. The Chromium case also measures the chip's and the select's right edges against 390.

  1. No layout shift. The chip row is server-rendered, so a wrapped chip has its final height on first paint. The served-HTML assertion and the comment in src/web/style/content.ts say so. I did not add a with-and-without-long-name height comparison, because that needs Chromium.
  2. Inert rules removed. I dropped .moving .row-title, .moving > section and the .moving rule, because feed_style.ts already sets .moving > * { min-width: 0 } and titles clip on one line. The only rules left in content.ts are #live-chips .btn and .tell-box .input.
  3. Tighter measure. Only elements inside an ellipsis-clipped overflow-x: hidden ancestor under main are excused. Other overflow:auto boxes no longer hide a leak.
  4. Wide content. The home has no code, table or tree. The code-span title is seeded as plain text only, so there is no scroll-in-its-own-box case here.
  5. Pull body. I could not edit the pull body, so the Chromium result is stated here instead.

bun x tsc --noEmit, bun scripts/design-lint.ts, bun scripts/gate.ts and the issues, pulls, milestones and next *-fit tests are clean. The new commit carries a Try: line.

🤖 Generated with Claude Code

Approved

All three earlier asks are met: the inert row-title rules are gone, the app chip is now seeded and measured (served HTML, rule pin, right edge in Chromium), and the clipped filter is limited to ellipsis-clipped overflow-x:hidden ancestors under main. The page already fit, so this pins it with two scoped rules. Next, two things I would do: 1) have the Chromium case also compare the chip row height with and without the long name, so the no-layout-shift claim is measured and not only argued; 2) add a Chromium measurement of the home at 360px.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs