Public: anyone can read this; the crew can change it.
A repository's head page wraps long names, descriptions and branch names at 390 px, pinned by a static test #9478
Check · Review · Land · Live done — Landed and live in production.
A repository's head page now has the wrapping rules to stay inside a 390 px phone, and `test/repo-head-fit.test.ts` checks them without a browser. I didn't measure it in Chromium, which is the next issue. The new test, `bun scripts/gate.ts`, `bun scripts/design-lint.ts` and `bun x tsc --noEmit` all pass. The forge's full check hasn't run yet. Without the new rules in `src/web/style/content.ts`, th…
shipped production is serving it deploy aa46b8b
A repository's head page now has the wrapping rules to stay inside a 390 px phone, and test/repo-head-fit.test.ts checks them without a browser. I didn't measure it in Chromium, which is the next issue. The new test, bun scripts/gate.ts, bun scripts/design-lint.ts and bun x tsc --noEmit all pass. The forge's full check hasn't run yet. Without the new rules in src/web/style/content.ts, the new test fails.
CSS (src/web/style/content.ts)
.repo-head, the About rail (.split > aside) and.splitcarryoverflow-wrap: anywhere.- The branch picker (
.bar > .menu) can shrink, and its label truncates. - README
preandtablegetmax-width: 100%; overflow-x: auto, so they scroll inside their own box. Tables aredisplay: blockso the scroll applies.
Test
- It seeds
/alice/fitwith a 250-character description word, a 200-character branch, a 116-character file name (120 with.txt), 40 file rows, and a README with a 250-character word, a 300-character code line and a wide table. - It also renders the empty-repository page with the same description.
- It asserts that:
- neither page has an inline width or min-width;
- no shipped rule fixes a width over 390 px;
- each of the rules above is present.
The commit carries the Try: line; bun scripts/gate.ts prints nothing.
Left out
- Chromium measurement of the real page width.
- The picker's open panel: its long items aren't constrained.
Try it: bun test test/repo-head-fit.test.ts.
🤖 Generated with Claude Code
Approved. The rules are scoped, reuse existing tokens and components, add no dependency, and work with JavaScript off. design-lint and gate.ts are clean. Next: (1) measure the page in Chromium at 390 px, since the test is static and only proves the rules exist. (2) Constrain the open branch-picker panel, whose long items are still unbounded; the pull says this was left out.
Left #9454 open: 1 unticked item remain (A new test/repo-head-fit.test.ts (shape: test/issues-fit.test.ts) seeds a repository with a 250-character unbroken description word, a 200-character branch name, a 120-character file name, 40 file rows and a README holding a 250-character word, a 300-character code line and a wide table. It renders /:owner/:repo and the empty-repository page and asserts no inline width/min-width over 390 px and no rule the page ships fixes a width over 390 px.).
A repository's head page now has the wrapping rules to stay inside a 390 px phone, and
test/repo-head-fit.test.tschecks them without a browser. I didn't measure it in Chromium, which is the next issue. The new test,bun scripts/gate.ts,bun scripts/design-lint.tsandbun x tsc --noEmitall pass. The forge's full check hasn't run yet. Without the new rules insrc/web/style/content.ts, the new test fails.CSS (
src/web/style/content.ts).repo-head, the About rail (.split > aside) and.splitcarryoverflow-wrap: anywhere..bar > .menu) can shrink, and its label truncates.preandtablegetmax-width: 100%; overflow-x: auto, so they scroll inside their own box. Tables aredisplay: blockso the scroll applies.Test
/alice/fitwith a 250-character description word, a 200-character branch, a 116-character file name (120 with.txt), 40 file rows, and a README with a 250-character word, a 300-character code line and a wide table.- neither page has an inline
widthormin-width; - no shipped rule fixes a width over 390 px; - each of the rules above is present.The commit carries the
Try:line;bun scripts/gate.tsprints nothing.Left out
Try it:
bun test test/repo-head-fit.test.ts.🤖 Generated with Claude Code
Closes #9454