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

A pull's page fits a 390 px phone: its title, branch names and conversation wrap instead of scrolling sideways #9342

Parked opened this
Closed without merging

A long pull title and long branch names now wrap on a 390 px phone instead of stretching the page. I could not measure it in a browser here, so whether the page scrolls sideways is unconfirmed. What changed .page-head h1 (the pull's title) now has overflow-wrap: anywhere, in src/web/style/components.ts.

Notes

stopped parked by the crew deploy 1aa6805

opened this

A long pull title and long branch names now wrap on a 390 px phone instead of stretching the page. I could not measure it in a browser here, so whether the page scrolls sideways is unconfirmed.

What changed

  • .page-head h1 (the pull's title) now has overflow-wrap: anywhere, in src/web/style/components.ts.
  • .mono (branch names on the pull pages) now has overflow-wrap: anywhere, in src/web/style/base.ts.
  • The fix is in the shared style files, not in src/web/pages/pull.ts. The conversation page lives in src/web/studio/change.ts, and that file needed no change.
  • The conversation page already wrapped comments through .prose (overflow-wrap: break-word). I found no width over 390 px in any inline style or stylesheet the page ships.
  • I did not touch any route or data read, nor src/http/api.ts.
  • docs/design/areas/pull.md has a short note on this. No new class.

Test test/pull-phone-fit.test.ts seeds the preview pull with a long title, a 200-character branch and 12 comments, each holding a 300-character unbroken word. It checks four things:

  • The seeded long content is on the page.
  • No fixed width over 390 px.
  • The title, .mono and .prose wrap.
  • A real-browser check at 390×844 and 1280×800 that the page doesn't scroll sideways.

The branch name is not shown on the conversation page. It appears on the Files page, so the test asserts it there.

Checks run

  • The wrap assertion fails without the fix and passes with it.
  • The new test and the existing pull and phone tests pass. design-lint and tsc are clean, and I ran scripts/gate.ts.
  • The browser check was skipped here because no Chromium starts in my sandbox. The forge's check will run it and log the numbers.

Phone look I have not seen the preview's phone look of /preview-admin/sample/pulls/3, so I can't say whether it scrolls sideways. Once the preview deploys, check its phone look there.

How to try it Run bun test test/pull-phone-fit.test.ts.

🤖 Generated with Claude Code

Closes #9327

3 earlier comments
commented

A long pull title and long branch names now wrap on a 390 px phone instead of stretching the page. I could not measure it in a browser here, so whether the page scrolls sideways is unconfirmed.

What changed

  • .page-head h1 (the pull's title) now has overflow-wrap: anywhere, in src/web/style/components.ts.
  • .mono (branch names on the pull pages) now has overflow-wrap: anywhere, in src/web/style/base.ts.
  • The fix is in the shared style files, not in src/web/pages/pull.ts. The conversation page lives in src/web/studio/change.ts, and that file needed no change.
  • The conversation page already wrapped comments through .prose (overflow-wrap: break-word). I found no width over 390 px in any inline style or stylesheet the page ships.
  • I did not touch any route or data read, nor src/http/api.ts.
  • docs/design/areas/pull.md has a short note on this. No new class.

Test test/pull-phone-fit.test.ts seeds the preview pull with a long title, a 200-character branch and 12 comments, each holding a 300-character unbroken word. It checks four things:

  • The seeded long content is on the page.
  • No fixed width over 390 px.
  • The title, .mono and .prose wrap.
  • A real-browser check at 390×844 and 1280×800 that the page doesn't scroll sideways.

The branch name is not shown on the conversation page. It appears on the Files page, so the test asserts it there.

Checks run

  • The wrap assertion fails without the fix and passes with it.
  • The new test and the existing pull and phone tests pass. design-lint and tsc are clean, and I ran scripts/gate.ts.
  • The browser check was skipped here because no Chromium starts in my sandbox. The forge's check will run it and log the numbers.

Phone look I have not seen the preview's phone look of /preview-admin/sample/pulls/3, so I can't say whether it scrolls sideways. Once the preview deploys, check its phone look there.

How to try it Run bun test test/pull-phone-fit.test.ts.

🤖 Generated with Claude Code

commented

A long pull title and long branch names now wrap on a 390 px phone instead of stretching the page. I couldn't measure the page in a browser here, so whether it scrolls sideways is unconfirmed.

The earlier push failed the forge's gate rule "say how to try it on the preview": the commits touched style files but none had a Try: line. I added an empty commit whose message has one, and scripts/gate.ts now passes locally. I didn't rerun the tests, since only the commit message changed since they passed.

What changed

  • .page-head h1 (the pull's title) now has overflow-wrap: anywhere, in src/web/style/components.ts.
  • .mono (branch names on the pull pages) now has overflow-wrap: anywhere, in src/web/style/base.ts.
  • The fix is in the shared style files, not src/web/pages/pull.ts. The conversation page is built in src/web/studio/change.ts, which needed no change.
  • Comments already wrapped through .prose. I found no width over 390 px in any inline style or stylesheet the page ships.
  • docs/design/areas/pull.md has a short note on this, with no new class.
  • No route or data read changed, and I didn't touch src/http/api.ts.

Test test/pull-phone-fit.test.ts seeds the preview pull with a long title, a 200-character branch name and 12 comments, each with a 300-character unbroken word. It checks that:

  • the seeded long content is on the page,
  • nothing ships a fixed width over 390 px, and
  • the title, branch names and comments wrap.

It also has a real-browser check at 390×844 and 1280×800 for sideways scroll. That check was skipped here because no Chromium starts in my sandbox. The forge's check will run it and log the numbers.

The branch name only appears on the Files page, so the test asserts it there. The wrap assertion fails without the fix and passes with it.

Phone look I haven't seen the preview's phone look of /preview-admin/sample/pulls/3, so I can't say whether it scrolls sideways. Check it on the preview once it deploys.

How to try it Run bun test test/pull-phone-fit.test.ts.

🤖 Generated with Claude Code

commented

I pushed a likely fix for the failing phone check, but I can't confirm it works. No Chromium starts in my sandbox, so I couldn't reproduce the sideways scroll. The check log you sent stops before it names which elements overflowed, so I fixed the most probable causes.

What changed in this push

  • .prose: it now uses overflow-wrap: anywhere instead of break-word, in src/web/style/content.ts. break-word doesn't shrink an element's minimum width, so a 300-character word in a comment could still push a parent wider than the phone.
  • .tl-item: it now has min-width: 0, in src/web/style/components.ts, so timeline items can shrink to fit.

What I ran

  • The new test file and the existing phone and variant tests pass locally.
  • design-lint and scripts/gate.ts pass.
  • The 390 px browser check only runs on the forge, so it is the real verdict.

If it fails again, the log line pull look 390x844: {…} will name the overflowing elements. Send me that line and I'll fix the exact cause.

The commit message carries the Try: line the gate requires.

Try it: open /preview-admin/sample/pulls/3 on the preview at 390 px wide and look for a sideways scroll.

🤖 Generated with Claude Code

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs