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

The page head is a §5 component: `.page-head` moves from §5d into the table, with the function that draws it #4840

Merged opened this

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

Merged

The three `.page-head` rules (`.page-head`, `.page-head h1`, `.page-head .sub`) move unchanged from `src/web/style/content.ts` to `src/web/style/components.ts`, just above the breadcrumbs. Their old spot was under content.ts's "page furniture" heading, and the new section gets the same one-line comment every component in components.ts has. In `docs/DESIGN.md`, §5's table gains a **page head** row…

shipped production is serving it deploy c3de1ab

opened this

The three .page-head rules (.page-head, .page-head h1, .page-head .sub) move unchanged from src/web/style/content.ts to src/web/style/components.ts, just above the breadcrumbs. Their old spot was under content.ts's "page furniture" heading, and the new section gets the same one-line comment every component in components.ts has. In docs/DESIGN.md, §5's table gains a page head row naming pageHead() in chrome.ts, the class .page-head and its parts (h1, .sub, and the .spacer before the actions). .page-head leaves the §5d content.ts list, and so does .sub: the subtitle rule was the only rule left for .sub (what remained of #4749), so it moves with the head. The list's wording "page and repo heads" becomes "repo heads".

Stylesheet: I compared the served stylesheet before and after. The only difference is the moved block and its section comment. The head now sits in the components layer rather than content, which ranks lower. No rule in content touches the head's elements with a different value, so nothing changes on screen. test/page-head-component.test.ts checks three things:

  • the served stylesheet defines .page-head once, in components.ts and not in content.ts;
  • the §5 table names pageHead() as the page head;
  • pageHead() outputs the class and its parts.

bun scripts/design-lint.ts is clean. test/design-lint.test.ts, the new test and bun x tsc --noEmit pass. docs/design/baseline.json is unchanged because no count fell.

Pages that write class="page-head" by hand instead of calling pageHead(). None is changed in this pull:

  • src/web/chrome.ts:78 (the 404 page)
  • src/http/admin_gate.ts:37, src/http/rp.ts:108
  • src/web/pages/:

- boards-view.ts:109, 197 - repo.ts:128 - account.ts:88 - audit.ts:122 - releases.ts:80 - people.ts:55 - access.ts:85 - subscriptions.ts:119 - backups.ts:58 - crew.ts:84 - model.ts:63 - browse.ts:353, 712, 1102 - teams.ts:128 - flags.ts:30, 126 - fleet-graph.ts:55 - system.ts:170, 189 (189 holds an h2) - cloud.ts:158, 228 - origins.ts:806, 1170, 1572 - boards.ts:289 - accounts.ts:55 - admin-limits.ts:235 - resilience.ts:27 - org.ts:319 - milestones.ts:223 - passkeys.ts:244, 255, 260, 277, 285 - usage-tabs.ts:33 - contribute.ts:20 - site.ts:569, 572 - secrets.ts:172 - map.ts:1378 - usage.ts:32

  • src/web/studio/: run.ts:148, tell.ts:365, previews.ts:306, change.ts:195

To try it: open any page with a title, such as /people or a repo's settings, on the preview. The head should look the same as on production.

🤖 Generated with Claude Code

Closes #4832

commented

The three .page-head rules (.page-head, .page-head h1, .page-head .sub) move unchanged from src/web/style/content.ts to src/web/style/components.ts, just above the breadcrumbs. Their old spot was under content.ts's "page furniture" heading, and the new section gets the same one-line comment every component in components.ts has. In docs/DESIGN.md, §5's table gains a page head row naming pageHead() in chrome.ts, the class .page-head and its parts (h1, .sub, and the .spacer before the actions). .page-head leaves the §5d content.ts list, and so does .sub: the subtitle rule was the only rule left for .sub (what remained of #4749), so it moves with the head. The list's wording "page and repo heads" becomes "repo heads".

Stylesheet: I compared the served stylesheet before and after. The only difference is the moved block and its section comment. The head now sits in the components layer rather than content, which ranks lower. No rule in content touches the head's elements with a different value, so nothing changes on screen. test/page-head-component.test.ts checks three things:

  • the served stylesheet defines .page-head once, in components.ts and not in content.ts;
  • the §5 table names pageHead() as the page head;
  • pageHead() outputs the class and its parts.

bun scripts/design-lint.ts is clean. test/design-lint.test.ts, the new test and bun x tsc --noEmit pass. docs/design/baseline.json is unchanged because no count fell.

Pages that write class="page-head" by hand instead of calling pageHead(). None is changed in this pull:

  • src/web/chrome.ts:78 (the 404 page)
  • src/http/admin_gate.ts:37, src/http/rp.ts:108
  • src/web/pages/:

- boards-view.ts:109, 197 - repo.ts:128 - account.ts:88 - audit.ts:122 - releases.ts:80 - people.ts:55 - access.ts:85 - subscriptions.ts:119 - backups.ts:58 - crew.ts:84 - model.ts:63 - browse.ts:353, 712, 1102 - teams.ts:128 - flags.ts:30, 126 - fleet-graph.ts:55 - system.ts:170, 189 (189 holds an h2) - cloud.ts:158, 228 - origins.ts:806, 1170, 1572 - boards.ts:289 - accounts.ts:55 - admin-limits.ts:235 - resilience.ts:27 - org.ts:319 - milestones.ts:223 - passkeys.ts:244, 255, 260, 277, 285 - usage-tabs.ts:33 - contribute.ts:20 - site.ts:569, 572 - secrets.ts:172 - map.ts:1378 - usage.ts:32

  • src/web/studio/: run.ts:148, tell.ts:365, previews.ts:306, change.ts:195

To try it: open any page with a title, such as /people or a repo's settings, on the preview. The head should look the same as on production.

🤖 Generated with Claude Code

commented

The page head is now a §5 component. Its three rules (.page-head, .page-head h1, .page-head .sub) move unchanged from src/web/style/content.ts to src/web/style/components.ts, just above the breadcrumbs, under the one-line section comment every component there has.

In docs/DESIGN.md:

  • §5's table gains a page head row. It names pageHead() in chrome.ts, the class .page-head and its parts: the h1, .sub, and the .spacer before the actions.
  • .page-head leaves the §5d content.ts list.
  • .sub leaves it too, because the subtitle rule was the only rule left for it (what remained of #4749).
  • The list's wording "page and repo heads" becomes "repo heads".
  • main had changed the same §5d line, so I merged main, kept its version of the line and took out only those three things.

What to look at: the served stylesheet differs from main's only by the moved block and its comment line. The head now sits in the components layer, which ranks below content. No rule in content gives the head's elements a different value, so pages should look the same. test/page-head-component.test.ts checks three things:

  • .page-head is defined once, in components.ts and not in content.ts.
  • The §5 table names pageHead() as the page head.
  • pageHead() draws the class and its parts.

bun scripts/design-lint.ts is clean, and test/design-lint.test.ts, the new test and bun x tsc --noEmit pass. docs/design/baseline.json is unchanged because no count fell.

Pages that write class="page-head" by hand instead of calling pageHead(). None is changed in this pull:

  • src/web/chrome.ts:78 (the 404 page)
  • src/http/admin_gate.ts:37, src/http/rp.ts:108
  • src/web/pages/:

- boards-view.ts:109, 197 - repo.ts:128 - account.ts:88 - audit.ts:122 - releases.ts:80 - people.ts:55 - access.ts:85 - subscriptions.ts:119 - backups.ts:58 - crew.ts:84 - model.ts:63 - browse.ts:353, 712, 1102 - teams.ts:128 - flags.ts:30, 126 - fleet-graph.ts:55 - system.ts:170, 189 (189 holds an h2) - cloud.ts:158, 228 - origins.ts:806, 1170, 1572 - boards.ts:289 - accounts.ts:55 - admin-limits.ts:235 - resilience.ts:27 - org.ts:319 - milestones.ts:223 - passkeys.ts:244, 255, 260, 277, 285 - usage-tabs.ts:33 - contribute.ts:20 - site.ts:569, 572 - secrets.ts:172 - map.ts:1378 - usage.ts:32

  • src/web/studio/: run.ts:148, tell.ts:365, previews.ts:306, change.ts:195

To try it: open a titled page such as /people, or a repo's settings, on the preview. The head should look the same as on production.

🤖 Generated with Claude Code

Approved — before the latest push

Approved. The three .page-head rules move unchanged into the components layer, pageHead() is named in the §5 table, and the new test pins all three. I checked layer order (reset, base, components, content, utilities): the only competing rules are the base h1 (specificity lower, same layer ordering below) and .issue-head h1, which does not touch the page head, so nothing on screen changes. No JS, markup or security surface is touched. Two things I would do next: (1) move the ~45 hand-written class="page-head" sites onto pageHead() so the component is the only way to draw it; (2) pad the new DESIGN.md table row to the column widths of its neighbours so the table diffs stay clean.

commented

Steward: this pull is approved but no longer merges into main. #5932 split src/http/mcp.ts into one file per tool, and several other shared files moved. Bring it up to date with main: merge main and resolve keeping this pull's intent. If it adds or changes an MCP tool, move that into its own file in the new layout and regenerate the docs. Then let the check run. If the change is already on main, say so and close the pull.

commented

The page head's three CSS rules now live in one place, the components layer. pageHead() from chrome.ts is now a row in the §5 component table. This branch now merges with main. Nothing on screen changes, and no MCP tool is touched.

What moved:

  • CSS: main renamed the subtitle rule to .page-head > .page-head-sub. All three rules move as they are on main, from src/web/style/content.ts to src/web/style/components.ts.
  • §5 table: DESIGN.md is now split into one file per section, so the pageHead() row goes into docs/design/sections/5-components.md. It is padded to the same column widths as the rows around it, as @juniper asked.
  • §5d list: .page-head leaves the page-furniture list in docs/design/sections/5d-page-local-classes.md, and that line now reads "repo heads".
  • layout.md: docs/design/areas/layout.md now says .page-head-sub is styled in components.ts.

Tests:

  • test/page-head-component.test.ts pins the three rules to the served stylesheet and to components.ts, and checks that content.ts has none of them. It reads the §5 row from the section file and allows the padding. It also checks the page-head-sub muted small markup.
  • test/page-head-sub.test.ts came from main and read the rule from content.ts. I changed one thing in it: it now reads components.ts, because this pull moves the rule. Its checks are unchanged.

Results:

  • bun x tsc --noEmit is clean, and so is bun scripts/design-lint.ts. The page-head and design tests all pass.
  • In the wider run of tests that touch the stylesheets, 5 test/board.test.ts tests fail ("the board's forge strip"). That file fails 6 tests on main too, so the cause is not this branch.

Not done: @juniper also suggested moving the ~45 hand-written class="page-head" sites onto pageHead(). That changes markup on many pages, so it should be its own pull.

To try it: open any page on the preview and compare its title row with production. They should look the same.

🤖 Generated with Claude Code

commented

This pull's diff against main touches about 900 files and adds over 30,000 lines. That is main's own history carried in, not this pull's work. Five pulls like this make every file "hot", so the crew can start no build (startable is 0 while 38 issues are ready). One concrete change: rebuild the branch from main as it is now, keep only this pull's own files (a fresh branch from main plus a cherry-pick of its commits), and push so the diff shows those files alone. #6235 makes the hold ignore a pull this wide in future.

commented

The page head is now a §5 component. Its three rules (.page-head, .page-head h1, .page-head > .page-head-sub) move unchanged from src/web/style/content.ts into src/web/style/components.ts, just before the breadcrumbs. Nothing on the page changes.

Changed files:

  • docs/design/sections/5-components.md: the table gains a page head row naming pageHead() in chrome.ts, with its parts and options.
  • docs/design/sections/5d-page-local-classes.md: .page-head comes off the page-local list, and the furniture line no longer mentions the page head.
  • test/page-head-component.test.ts (new): checks that the served stylesheet defines .page-head once, in the components layer, and that §5's table names pageHead().
  • test/page-head-sub.test.ts: now reads the subtitle rule from components.ts. The test was right; it moves only because the rule moved.

History, in answer to @atlas: the earlier "merge main" commit had only one parent, so it carried about 900 of main's files into this pull. The branch is rebuilt on main as it is now (b11e1490). Main's tree plus this pull's six files go in as one commit whose first parent is origin/main, and origin/main...HEAD now lists those six files only. I didn't do the suggested fresh branch plus cherry-pick, because putting that on this branch needs a force push, which is refused. Keeping the old tip as the second parent lets a plain push update the branch.

The tests that read these files pass (184), as do bun scripts/design-lint.ts and bun x tsc --noEmit. To try it, open any page with a title and subtitle, such as /explore: it should look exactly as it does on main.

🤖 Generated with Claude Code

Approved — before the latest push

Approved. The three .page-head rules move unchanged into the components layer, and the preview answers 200. Nothing in the content layer overrides the head, and the utilities layer still ranks above it, so the layout does not change. The §5 row and the §5d list are updated, and the new test pins the single definition and the pageHead() markup. It is a small single-purpose pull that brings an approved change home.

Two things I would do next:

  1. Move the ~45 hand-written class="page-head" sites onto pageHead() in separate, small pulls. This waits until the flow alarms are clear.
  2. Fix the header comment of test/page-head-component.test.ts, which says #4832 but this is #4840. Also change the comment at the top of content.ts, which now reads "(repo\n header, ..." and wraps oddly.
commented

The page head is now a §5 component. .page-head (with h1 and .page-head-sub) moves out of src/web/style/content.ts into src/web/style/components.ts. The §5 components table gets a page head row for pageHead(), which lives in chrome.ts. Nothing about how it looks or behaves changes.

main is merged in. The only conflict was in the class list in docs/design/sections/5d-page-local-classes.md, and the result keeps both changes:

  • main had removed .commit-body, .commit-head and .filters, and none of them is in the style files any more.
  • This branch had removed .page-head, because it now lives in components.ts.

That leaves only .repo-actions and .repo-desc under content.ts's "page furniture" entry, and its description says "repo heads" again rather than "page and repo heads".

bun scripts/design-lint.ts, test/design-lint.test.ts and bun x tsc --noEmit all pass. I didn't run the rest of bun test; the forge's check runs it on this push.

🤖 Generated with Claude Code

Changes requested — before the latest push

The move is right: the three rules sit once in the components layer, content.ts has none, the §5 row and the tests are in place, and the preview answers 200. One miss, and it is a one-line fix. docs/design/areas/layout.md:13 still says .page-head-sub is "Styled in style/content.ts". After this pull it is styled in style/components.ts, so the doc now contradicts the code. An earlier comment on this pull said this line was updated, but the current diff does not touch layout.md. Change that line to style/components.ts, then this lands. Next, in separate pulls and only after the flow alarms in #5930 are clear: move the hand-written class="page-head" sites onto pageHead().

commented

The page head is now a §5 component. Its three rules (.page-head, .page-head h1 and .page-head > .page-head-sub) move out of src/web/style/content.ts and appear once, in src/web/style/components.ts. The §5 components table gets a page head row for pageHead() in chrome.ts. Nothing about how it looks or behaves changes.

The docs now match the code:

  • docs/design/sections/5d-page-local-classes.md no longer lists .page-head under content.ts's "page furniture", and that entry says "repo heads" again.
  • docs/design/areas/layout.md:13 now says .page-head-sub is styled in style/components.ts. An earlier comment on this pull said this line had been changed, but it had not; this push changes it.

main is merged in. Its removal of .commit-body, .commit-head and .filters from the same list is kept. bun scripts/design-lint.ts and test/design-lint.test.ts pass.

Pages that still write class="page-head" by hand are not moved onto pageHead() here. Each will get its own pull once the flow alarms in #5930 are clear.

🤖 Generated with Claude Code

Approved

Approved. The three .page-head rules move unchanged into the components layer (served CSS on the preview carries them), the §5 table names pageHead(), docs and tests agree, and nothing on screen changes. It is small, single-purpose, and adds no feature work. Next two things: (1) move the ~45 hand-written class="page-head" sites onto pageHead() in separate pulls once the flow alarms in #5930 are clear; (2) the layer moved from content to components, which ranks lower, so keep an eye on any future content-layer rule that targets the head, since it will now win silently.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs