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

A repository's two-column layout uses base.ts grid utilities, and .repo-layout leaves the stylesheet #4783

Merged opened this

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

Merged

A repository's two-column layout now uses grid utilities in `base.ts`, and `.repo-layout` is gone from the stylesheet and from `docs/DESIGN.md` §5d.

shipped production is serving it deploy 9b150b4

opened this

A repository's two-column layout now uses grid utilities in base.ts, and .repo-layout is gone from the stylesheet and from docs/DESIGN.md §5d.

base.ts had no grid utilities, so I added two. .cols is the grid (gap, top margin, min-width: 0 on children). .cols-rail adds the 280px right column from 960px up, with the sticky aside. The CSS values are the same as the old rule, so I expect no layout shift, but I did not look at 375 px or 1280 px.

  • Changed files: src/web/pages/repo.ts now renders class="cols cols-rail". content.ts loses the .repo-layout rules and its entry in the shared min-width: 0 selector. docs/DESIGN.md lists .cols and .cols-rail under base.ts.
  • Test: the new test/repo-layout.test.ts checks that repo.ts uses the new classes, that no repo-layout remains in the source or design doc, and that the rail only starts at 960px.
  • Checks: bun scripts/design-lint.ts is clean, and bun test test/design-lint.test.ts test/repo-layout.test.ts passes (18 tests). docs/design/baseline.json is empty, so there was nothing to lower.
  • Not verified: tsc --noEmit could not resolve the bun types in this sandbox. I did not run the full bun test.
  • Left alone: .split is almost the same layout (260px rail). I did not fold it in, to keep the diff to the files named.

Closes #4592

commented

A repository's two-column layout now uses grid utilities in base.ts, and .repo-layout is gone from the stylesheet and from docs/DESIGN.md §5d.

base.ts had no grid utilities, so I added two. .cols is the grid (gap, top margin, min-width: 0 on children). .cols-rail adds the 280px right column from 960px up, with the sticky aside. The CSS values are the same as the old rule, so I expect no layout shift, but I did not look at 375 px or 1280 px.

  • Changed files: src/web/pages/repo.ts now renders class="cols cols-rail". content.ts loses the .repo-layout rules and its entry in the shared min-width: 0 selector. docs/DESIGN.md lists .cols and .cols-rail under base.ts.
  • Test: the new test/repo-layout.test.ts checks that repo.ts uses the new classes, that no repo-layout remains in the source or design doc, and that the rail only starts at 960px.
  • Checks: bun scripts/design-lint.ts is clean, and bun test test/design-lint.test.ts test/repo-layout.test.ts passes (18 tests). docs/design/baseline.json is empty, so there was nothing to lower.
  • Not verified: tsc --noEmit could not resolve the bun types in this sandbox. I did not run the full bun test.
  • Left alone: .split is almost the same layout (260px rail). I did not fold it in, to keep the diff to the files named.
Approved — before the latest push

The rules are moved verbatim (grid, gap, margin, 280px rail from 960px, sticky aside, min-width:0), so phone stays single-column with no horizontal push and desktop is unchanged. The preview answers 200, no repo-layout remains anywhere, and DESIGN.md lists .cols/.cols-rail under base.ts. Server-rendered, no JS, no new dependency. Two things next: (1) fold .split (260px rail) into .cols so the stylesheet has one two-column utility; (2) the test only greps source text, so add a rendered check that renderCode with a rail emits the cols classes.

commented

I merged main into the branch and pushed; the only conflict was in docs/DESIGN.md.

  • Conflict: it was the style/content.ts class list in §5d. I took main's version of that line and removed .repo-layout from it.
  • Checks: bun scripts/design-lint.ts is clean, and bun test test/design-lint.test.ts test/repo-layout.test.ts passes (18 tests). I did not run the full bun test here.

The pull is otherwise as before:

  • src/web/pages/repo.ts lays out the two columns with class="cols cols-rail".
  • src/web/style/base.ts carries the new .cols and .cols-rail utilities.
  • .repo-layout is gone from src/web/style/content.ts and docs/DESIGN.md.
  • test/repo-layout.test.ts covers the change.

I did not check layout shift at 375 px and 1280 px.

commented

I merged main into the branch and pushed. The only conflict was in src/web/style/content.ts.

  • Conflict: the shared min-width: 0 rule. main had dropped .dash from it and this branch had dropped .repo-layout. I kept both removals, so it now reads .split > * { min-width: 0; }.
  • Checks: bun scripts/design-lint.ts is clean, and bun test test/design-lint.test.ts test/repo-layout.test.ts passes (18 tests). I did not run the full bun test here.
  • Leftovers: no repo-layout remains in src/ or docs/.

The rest of the pull is unchanged:

  • src/web/pages/repo.ts lays out the two columns with class="cols cols-rail".
  • The new .cols and .cols-rail utilities live in src/web/style/base.ts.
  • test/repo-layout.test.ts covers the change.

I still haven't looked at layout shift at 375 px and 1280 px.

commented

I merged main into the branch and pushed. The only conflict was the style/content.ts class list in docs/DESIGN.md §5d.

  • Resolution: I took main's version of that line and removed .repo-layout from it. No repo-layout remains in src/, docs/ or test/, apart from test/repo-layout.test.ts, which asserts it is gone.
  • Checks: bun scripts/design-lint.ts is clean, and bun test test/design-lint.test.ts test/repo-layout.test.ts passes (18 tests). I did not run the full bun test here.

The rest of the pull is unchanged:

  • src/web/pages/repo.ts lays out the two columns with class="cols cols-rail".
  • The new .cols and .cols-rail utilities live in src/web/style/base.ts.

I still haven't looked at layout shift at 375 px and 1280 px.

Changes requested — before the latest push

The swap works (preview answers 200, same CSS values), but it adds a second two-column layout. DESIGN.md §5d says .split is the one two-column page: main, then an aside rail that sticks from 960px. .cols + .cols-rail is the same rule with a 280px rail instead of 260px, so the stylesheet now has two. Fix first: render the repo page with .split (class="split") and delete .cols/.cols-rail from base.ts and the DESIGN.md list. The 20px rail difference is not worth a second layout. If the repo page truly needs 280px, add it as a .split modifier, as data-rail="wide" is, not a parallel class. Also: the test only greps source text for strings, so it would pass with a broken layout. Assert on the rendered repo page (class on the wrapper) instead, and drop the CSS-regex assertion. Not verified by the author: 375px and 1280px, and there is no full bun test run.

commented

The repository page now uses .split, and the .cols and .cols-rail utilities are gone. I pushed that to the branch.

  • Layout: renderCode in src/web/pages/repo.ts renders <div class="split"> around the main column and the About aside. .repo-layout stays out of the stylesheet and docs/DESIGN.md §5d. src/web/style/base.ts is back to what main has, and the docs/DESIGN.md list no longer names .cols or .cols-rail. The rail is 260px instead of 280px, as you suggested; I did not add a data-rail modifier.
  • Test: test/repo-layout.test.ts now fetches the real /olive/yard page. It asserts that repo-layout is absent and that <div class="split"> wraps the main <div> and <aside aria-label="About">. The source-text and CSS-regex assertions are gone.
  • Checks: bun scripts/design-lint.ts is clean. bun test on test/repo-layout.test.ts, test/design-lint.test.ts and test/repo-about-card.test.ts passes (17 tests).
  • Full bun test: I ran the full suite and it has 12 failures, none in files this change touches. They are the typescript 7.x gate audit, the scaffolded-app typecheck, five merge-queue and updater tests, the main.ts SSH-port test, the hollow.ts and in-browser axe tests, and two looks.test.ts captures. They look like sandbox limits (no ssh, no chromium) or the planned-separately failures the issue mentions. I did not compare against main to confirm that.
  • Not done: I still haven't looked at layout shift at 375 px and 1280 px.
Approved — before the latest push

The repo page now uses .split, the one two-column page, and .repo-layout is gone from the stylesheet, the shared min-width rule and DESIGN.md section 5d. The change is small and keeps the design system. It adds no new component class and the markup is the same, with no JS dependence. The test fetches the real page and would fail on the old markup. The rail goes from 280px to 260px, which is a deliberate and small change. Two things to do next: (1) check the code page at 360px and 1280px for layout shift, since the pull says it was never looked at; (2) check that the 20px narrower rail does not wrap the About card badly at 960 to 1100px.

Approved — before the latest push

Clean, small, and true to docs/DESIGN.md §5d: the code page now uses .split, the one two-column page, and .repo-layout is gone from content.ts, the shared min-width: 0 rule and the DESIGN.md class list. No other reference to repo-layout is left in src/, docs/ or scripts/. It adds no new class, no JavaScript and no dependency, and it is server-rendered, so nothing changes with JS off. It touches no security surface: it changes markup and CSS only, adds no input and no write, and needs no terminal counterpart. The test fetches the real /olive/yard page and would fail on the old wrapper.

Using .split departs from the issue's wording ("base.ts grid utilities") on purpose, and that is the right call, because a second two-column utility would break the design system. The rail narrows from 280px to 260px.

I could not see it myself: this sandbox refused my connection to the preview. Two follow-ups for the builder:

  1. The issue's look at 375px and 1280px was never done. Before it lands, check the About card at 960–1100px with the narrower rail.
  2. Retitle the pull to match what it does: the repo page uses .split. The current title still says base.ts utilities.
Approved

Approved. The code page now uses .split, the one two-column page. .repo-layout is gone from content.ts, from the shared min-width: 0 rule and from the DESIGN.md §5d list. Nothing else in src/, docs/ or scripts/ referred to it, which the diff supports. It adds no class, no JS and no dependency. It is server-rendered, so it works with JS off. It changes only markup and CSS, so it adds no input, write or terminal surface. The test fetches the real /olive/yard page and fails on the old wrapper. One limit: my sandbox refused the connection to the preview, so I judged from the diff and the base source and did not see it render.

Two things to do next:

  1. Look at the About rail at 360px, 960–1100px and 1280px. The rail narrows from 280px to 260px, and nobody has looked at it yet.
  2. Retitle the pull. It still talks about base.ts grid utilities, but the change reuses .split.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs