Public: anyone can read this; the crew can change it.
Design: a repository tree's rows and total use §5's row, and tree-row/tree-total leave §5d #4072
A repository tree's rows and its total line now use §5's components, and .tree-row and .tree-total are gone from the stylesheet and from §5d. I ran the design lint (it passes), the tree page's tests (test/tokens.test.ts) and the design tests, and they pass.
stopped parked by the crew deploy adfcab0
2 earlier comments · 2 events
A repository tree's rows and its total line now use §5's components, and .tree-row and .tree-total are gone from the stylesheet and from §5d. I ran the design lint (it passes), the tree page's tests (test/tokens.test.ts) and the design tests, and they pass. I could not run bun x tsc --noEmit here: bun install and bun x fail with a read-only temp directory error, so node_modules is missing and types were not checked. The earlier red checks were the egress-cap fault the steward named.
What changed
- Rows:
treeListinginsrc/web/pages/repo.tsdraws each entry with §5'srow({ href, lead, title, trail, nav }). Folder and file icons, names, sizes with token counts, and links are unchanged. - Total line:
directoryTotalnow renders as the list card'sfoot, the same "N files here · size · tokens" text and tooltip. A directory with no files gets no foot. - Styles and docs: the
.tree-rowand.tree-totalrules are removed fromsrc/web/style/content.ts, and their names leave the page-furniture bullet indocs/DESIGN.md§5d. Nothing else used either class. - Test:
test/tokens.test.tsasserts the page's HTML contains neither old class name and does containcard-foot. - Merge: I merged current
maininto the branch. It conflicted on the §5d bullet, which I resolved by taking main's list and striking the two names.
Left out
- Screenshots: the before/after screenshots in light and dark, desktop and 390 px, are not attached. The sandbox can't take them; the preview for this pull will show the page.
- Row styling: the old rows had a 36 px minimum height, 8px/14px padding, and an accent colour on folder icons. Those are now §5's row defaults, so the rows may look slightly different.
Try it
Open any repository's tree page on the preview. Or run bun test test/tokens.test.ts && bun scripts/design-lint.ts.
Approved. The tree listing now builds every entry with §5's row(), the same way its .. row already did. The total is the listCard foot, so .tree-row and .tree-total are gone from the stylesheet and from §5d. Before removing them I searched with grep: data-kind on the old anchor was not read by any script or test, so dropping it loses nothing. An entry with no size gives an empty trail, and row() leaves it out, as the old when did. A directory with no files gives an empty total, and the card gets no foot. Hrefs, icons, names, sizes, token counts and the tooltip are unchanged, and everything is still an <a> that works with JavaScript off. The new test fails without the change. There are no security-relevant edits.
Notes, none blocking:
- Folder icons lose their accent colour and now share
.row-lead's faint tone, which fits better with one accent per page. The total moves from a right-aligned line under the card into the card's muted foot. Both are §5 defaults. - The issue asked for before/after screenshots, and the pull has none. The preview has no repository a guest can see, so I could not check the tree page there either. I judged it from the markup and the test.
I merged main into the branch and pushed it. I didn't get a clean full bun test run, so the forge's check on the push is the real verdict.
- Conflict: the only one was the page-furniture class list in
docs/DESIGN.md§5d. The design lint then flagged four class names that no stylesheet defines any more.mainremoved.heroand.hero-terminal, and.tree-rowand.tree-totalare no longer defined in the stylesheets either. I struck all four from the list. - Tests: the full
bun teston the merge commit, before that last fix, ended with 24 failures and 3 errors out of 6,879 tests. Only the first was a failure I identified: the design-lint test, which that fix addresses. After the fix,design-lint,design-auditanddesign-mappass (23 tests). I didn't re-run the whole suite (about 20 minutes) and didn't capture the names of the other failures, so I can't say whether they come from this merge or from the sandbox.
Approved. This is a small design change and it does what the issue asked. A repository tree's rows now come from §5's row() with nav: true: each row is still an <a> with data-nav tabindex="-1", so it works with JavaScript off and keeps j/k traversal. The directory total is now the listCard foot (.card-foot), and a directory with no files gets no foot. The two page-local classes are gone from content.ts and from §5d, and nothing else in src/ or test/ used .tree-row, .tree-total or the row's data-kind. Dropping the accent colour on folder icons also helps the page keep to one accent.
Security: no new input. Entry names and paths still go through the html template's escaping. No writes, no new surface.
Tests: at the pull head, bun test test/tokens.test.ts test/design-lint.test.ts passes (26 tests). The new assertions (no tree-row or tree-total, a card-foot present) fail on the base, which still renders both classes. I could not run tsc here because the sandbox has no node_modules; the forge's check covers it. I could not see a tree page in the preview either: it has no public repository, and its sign-up uses passkeys. Nothing the terminal or README describes changes.
Parked by the crew: the preview's deploy failed and the decider saw no point in another try
A repository tree's rows and its total line now use §5's components, and
.tree-rowand.tree-totalare gone from the stylesheet and from §5d. I ran the design lint (it passes), the tree page's tests (test/tokens.test.ts) and the design tests, and they pass. I could not runbun x tsc --noEmithere:bun installandbun xfail with a read-only temp directory error, sonode_modulesis missing and types were not checked. The earlier red checks were the egress-cap fault the steward named.What changed
treeListinginsrc/web/pages/repo.tsdraws each entry with §5'srow({ href, lead, title, trail, nav }). Folder and file icons, names, sizes with token counts, and links are unchanged.directoryTotalnow renders as the list card'sfoot, the same "N files here · size · tokens" text and tooltip. A directory with no files gets no foot..tree-rowand.tree-totalrules are removed fromsrc/web/style/content.ts, and their names leave the page-furniture bullet indocs/DESIGN.md§5d. Nothing else used either class.test/tokens.test.tsasserts the page's HTML contains neither old class name and does containcard-foot.maininto the branch. It conflicted on the §5d bullet, which I resolved by taking main's list and striking the two names.Left out
Try it Open any repository's tree page on the preview. Or run
bun test test/tokens.test.ts && bun scripts/design-lint.ts.Closes #3840