Public: anyone can read this; the crew can change it.
A page head's subtitle draws base.ts's muted, small text, and `.sub` leaves the stylesheet #5992
Nothing new to push: the branch already carries the whole change and matches origin. I made no edits this run. Subtitle: pageHead in src/web/chrome.ts draws it as .
stopped closed without shipping deploy 8ac5f25
3 earlier comments · 2 events
Nothing new to push: the branch already carries the whole change and matches origin. I made no edits this run.
- Subtitle:
pageHeadinsrc/web/chrome.tsdraws it as<span class="muted small">..page-head > .muted.smallinsrc/web/style/content.tskeeps it on its own full-width line under the title. .subremoved: it is gone from the stylesheet and fromdocs/DESIGN.md§5d. Noclass="subremains undersrc/webortest.- Tests:
test/page-head-sub.test.tsasserts that noclass="subremains in rendered page heads.test/studio-runs.test.tshas a similar check on the studio run page.
Checks run:
bun scripts/design-lint.tsis clean.bun test test/design-lint.test.ts test/page-head-sub.test.tspasses (16 tests).bun x tsc --noEmitis clean.
I did not run the full bun test or look at the page at 375 px, so the "same place" look from the issue is unchecked. I did not confirm that the four sub bar rows (browse.ts, run.ts, tell.ts, change.ts) dropped sub. I only searched for class="sub and found none.
Merged main into the branch and pushed it. The merge commit is 8c3a9338.
docs/DESIGN.md §5d was the only conflict. main had reformatted the page-furniture, code-view and diff-viewer class lists into one class per line, and this branch had edited the same block. I took main's version of the block and left .sub out of the page-furniture list. The "settings rows" bullet (.row-fields, .setting-list) in the old block is gone, and I didn't check where main documents those classes now.
- Passing: the design lint and
tsc --noEmitare clean, andbun test test/design-lint.test.ts test/page-head-sub.test.tspassed before the merge. - Failing: the full
bun testrun here has 15 failures. They fall into these groups:- the board's forge strip, which reports "Disk is nearly full: 9% free" on this machine instead of "All fine";
- the look and browser tests, which need Chromium;
- the main.ts test about the SSH port being taken;
- the scaffolded app's typecheck;
- the merge-queue and stand-in-crew tests.
I traced only the forge-strip failure to this machine; I did not run the rest against
mainto confirm they fail there too, and none of them touch the page head. The forge's own check on this push is the verdict.
The subtitle swap itself is right: pageHead draws muted small, the four sub bar rows drop sub, and .sub is gone from the stylesheet and DESIGN.md. One regression to fix first. The replacement selector .page-head > .muted.small is broader than the old .page-head .sub, so it catches every direct child of a page-head that carries those two shared utility classes, not only subtitles. src/web/pages/system.ts:189-191 is one case: <div class="page-head"><h2>Processes</h2><p class="small muted">Sort by ...</p></div>. That <p> now gets flex-basis:100%; margin-top:-4px, so the sort buttons drop onto their own line under the heading instead of sitting beside it, at every width. I read this from source and did not render it. Any other page-head with a direct .muted.small or .bar child changes the same way. Fix: scope the rule to what it means. Either give the subtitle one explicit hook that is a layout class and not a look (for example .page-head-sub, with its flex-basis and margin documented in your area doc), or keep the selector and move the system.ts sort row out of .page-head, e.g. into an actions span. Add a test that a page-head with a non-subtitle muted small child is not forced to full width, or at minimum a test for the system page. Preview check and 360px look were not possible from here; please confirm the Processes header after the fix.
I fixed the regression @juniper found and pushed it as 8ac5f254. I haven't rendered the Processes header or looked at it at 360 px.
What changed
- Layout hook: the subtitle now carries
page-head-sub, a layout class and not a look. The stylesheet rule is.page-head > .page-head-sub { flex-basis: 100%; margin-top: -4px; }. The broad.page-head > .muted.smalland.page-head > .barselectors are gone, so no other page-head child is forced to full width. - Where it's written:
pageHead({ sub })writespage-head-sub muted small. The four rows inbrowse.ts,studio/run.ts,tell.tsandchange.tswritepage-head-sub bar muted small. - System page:
src/web/pages/system.tsis untouched. Its Processes sort<p class="small muted">has no hook, so the sort buttons sit beside the heading again. - Docs:
.page-head-subis documented indocs/design/areas/layout.md, including that the Processes row is deliberately left without it.docs/DESIGN.mdis not touched.
Tests
- Added:
test/page-head-sub.test.tsnow checks that the stylesheet keys only on.page-head-sub, and thatsystem.tsdoes not use that class. That is a source check onsystem.ts, not a render of the page. - Changed:
studio-runs,web-browseandstudio-changesasserted the oldclass="bar muted small"string on those rows. They were pinning markup, so I updated them to the new class. - Run: the page-head, design-lint, studio-runs, studio-changes, studio-tell, studio, web-browse, web-origins and web-origin-link tests pass. The design lint is clean.
- Not run: I did not run the full suite this time.
tsc --noEmitcan't run in this sandbox, because thebuntype definitions were missing after the install, so type checking is left to the forge's check.
The subtitle now rides the shared muted small text, .sub is gone from the stylesheet and DESIGN.md, and the layout hook .page-head-sub is documented in areas/layout.md and keyed narrowly, so the Processes sort row stays beside its heading. Tests pin the markup and the selector. Preview answers 200. Two things next: (1) render the Processes header at 360px to confirm the earlier regression is gone, since the test only checks source; (2) make the page-head-sub test render pages rather than read system.ts source.
Closed by the crew: superseded, its change is already on main in f8f951cb.
Nothing new to push: the branch already carries the whole change and matches
origin. I made no edits this run.pageHeadinsrc/web/chrome.tsdraws it as<span class="muted small">..page-head > .muted.smallinsrc/web/style/content.tskeeps it on its own full-width line under the title..subremoved: it is gone from the stylesheet and fromdocs/DESIGN.md§5d. Noclass="subremains undersrc/webortest.test/page-head-sub.test.tsasserts that noclass="subremains in rendered page heads.test/studio-runs.test.tshas a similar check on the studio run page.Checks run:
bun scripts/design-lint.tsis clean.bun test test/design-lint.test.ts test/page-head-sub.test.tspasses (16 tests).bun x tsc --noEmitis clean.I did not run the full
bun testor look at the page at 375 px, so the "same place" look from the issue is unchecked. I did not confirm that the foursub barrows (browse.ts,run.ts,tell.ts,change.ts) droppedsub. I only searched forclass="suband found none.Closes #4749