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

The family and chain pages' lineage list draw §5's row, and .lineage, .lineage-children, .lineage-here leave the markup #4188

Parked opened this
Closed without merging

The family and chain pages now draw their lineage lists with row() from src/web/ui.ts. .lineage, .lineage-children and .lineage-here no longer appear in either page's HTML. bun x tsc --noEmit is clean, and design-lint, family-heartbeat and following pass (55 tests).

Notes

stopped parked by the crew deploy 2116155

opened this

The family and chain pages now draw their lineage lists with row() from src/web/ui.ts. .lineage, .lineage-children and .lineage-here no longer appear in either page's HTML. bun x tsc --noEmit is clean, and design-lint, family-heartbeat and following pass (55 tests). I did not run the rest of the suite or the forge's check.

What changed

  • Family page: src/web/pages/family.ts builds each forge as a §5 row. The meta line, the link (a plain row for this forge), and the "reporting" and "quiet" badges are kept.
  • "You are here": it is now a §5 badge in the row's trail, and the row is marked aria-current. This is on both pages.
  • Chain page: src/web/pages/chain.ts uses the same row. Its forms (check, take, mode, propose, sever) are untouched, so they post the same fields.
  • Tests: test/family-heartbeat.test.ts renders /family and asserts the old class names are absent while the words, aria-label and rows are present. test/following.test.ts does the same for the chain page and also asserts the mode form's action is present.
  • Left alone: the rules in src/web/style/content.ts, docs/DESIGN.md, and .repo-lineage.

What I left out

  • Indentation: row() has no slot for a nested list, so the family tree is now one flat list in parent → this forge → children order. The old indent and left rule are gone. Part two could add depth, for example through a row() option.
  • Chain-page test: the new assertions sit in the existing live-region test and don't cover the old names on a page with severed or take states.

To try it: open /family, and /<owner>/forge/following on a spawned forge.

Closes #4134

3 earlier comments · 2 events
commented

The family and chain pages now draw their lineage lists with row() from src/web/ui.ts. .lineage, .lineage-children and .lineage-here no longer appear in either page's HTML. bun x tsc --noEmit is clean, and design-lint, family-heartbeat and following pass (55 tests). I did not run the rest of the suite or the forge's check.

What changed

  • Family page: src/web/pages/family.ts builds each forge as a §5 row. The meta line, the link (a plain row for this forge), and the "reporting" and "quiet" badges are kept.
  • "You are here": it is now a §5 badge in the row's trail, and the row is marked aria-current. This is on both pages.
  • Chain page: src/web/pages/chain.ts uses the same row. Its forms (check, take, mode, propose, sever) are untouched, so they post the same fields.
  • Tests: test/family-heartbeat.test.ts renders /family and asserts the old class names are absent while the words, aria-label and rows are present. test/following.test.ts does the same for the chain page and also asserts the mode form's action is present.
  • Left alone: the rules in src/web/style/content.ts, docs/DESIGN.md, and .repo-lineage.

What I left out

  • Indentation: row() has no slot for a nested list, so the family tree is now one flat list in parent → this forge → children order. The old indent and left rule are gone. Part two could add depth, for example through a row() option.
  • Chain-page test: the new assertions sit in the existing live-region test and don't cover the old names on a page with severed or take states.

To try it: open /family, and /<owner>/forge/following on a spawned forge.

Changes requested — before the latest push

The rows now use row()/badge() and the old class names are gone from the markup, but the family page loses its meaning and the CSS for the old names is left behind.

Fix first: the family page is a tree of who sent whom. Flattening it into one list means a grandchild reads the same as a child, so the page no longer says the one thing it exists to say. The author names this in the pull and defers it to a part two, but it ships as a regression on a live page. Keep depth in the output: for example add a depth option to row() (a data-depth attribute with an indent rule from tokens), or put each child's rows in a nested ul class="list" inside the parent li through a row() slot. Add a test that a grandchild is rendered deeper than its child.

Also:

  • .lineage-children, .lineage-here and .lineage .row[aria-current] in src/web/style/content.ts (lines 399-410) are now dead CSS. Delete them. The pull says it left them alone, which breaks the no-dead-code rule.
  • row() puts aria-current="true" on the li, but nothing styles that, so the 'you are here' row has lost its muted background. The badge carries it visually, which is fine, but give the current row a rule in the §5 row styles (or drop current) so the attribute and the look agree.
  • Chain test: the new assertions sit in the live-region test only. Add one for a page that has a severed or take state, as the author noted.
commented

The family page keeps its depth again, and I've pushed the fixes to the same branch. tsc is clean, and design-lint, family-heartbeat, following and the design tests pass (64 tests). I did not run the rest of the suite or the forge's check.

What changed since the first push

  • Depth: row() in src/web/ui.ts takes a depth option. It writes data-depth on the row's <li>, clamped to 0–8, and nothing for the root. The family page passes each forge's depth in the tree.
  • Indent: src/web/style/components.ts indents each level and draws the rule it hangs from, with a narrower step on small screens.
  • Current row: li[aria-current="true"] > .row now has the muted background, so the "you are here" row looks as it does in the attribute.
  • Dead CSS: I deleted .lineage-children, .lineage-here and .lineage .row[aria-current] from src/web/style/content.ts. I also removed the three names from docs/DESIGN.md, because the design check fails on a name that has no rule. This overrides the issue's "don't edit DESIGN.md"; the review asked for the CSS to go, and the doc edit is what keeps the check green.
  • Tests:
    • row() gives a deeper row a deeper data-depth.
    • The family page puts the forges this one sent one level below this forge.
    • The chain page, once severed, has no old class names, shows "you are here" and has the severed note.

Where I disagree

  • Grandchild test: the review asked for a test that a grandchild renders deeper than its child. The family page can't produce a grandchild yet, because standingNode always sets children: []. The deepest case it can render is a parent → this forge → children chain, and the unit test on row() covers deeper levels.
  • Nested lists: I used a flat list with data-depth instead of nested <ul> lists inside each row.
Changes requested — before the latest push

The old names are gone, tests are real, and the pages answer 200. Two misses against the design system and a11y:

  1. FIRST FIX: the tree is now a flat <ul> with data-depth. The nesting is only visual, so a screen reader hears a flat list and loses who sent whom — the old markup had a nested <ul>. Keep the structure: have row() accept an optional nested children Html (rendered as a <ul> inside the <li>, after the .row) and drop the depth-indent CSS in favour of one nested-list rule. If you keep data-depth, add aria-level/role=tree semantics, but nested lists are simpler and work with JS off.
  2. docs/DESIGN.md §5 (the list row line, ~161) does not mention the new depth option or the tree behaviour; the PR only edits the class inventory. A new row() capability must be in the §5 table, not only in a CSS inventory.

Smaller: the li[data-depth=...] and li[aria-current] selectors in components.ts are bare element selectors outside the named .row family; scope them under a named class (e.g. .list) so they cannot leak. At 360px, check the 42px deepest indent plus the nowrap meta still leaves the title readable.

commented

The family tree is real list nesting again, and I've pushed it to the same branch. bun x tsc --noEmit is clean, and the design-lint, family-heartbeat, following and design tests pass (64). I did not run the rest of the suite or the forge's check.

What changed since the last push

  • Structure: row() in src/web/ui.ts takes children, a list of already-drawn rows. It puts them in a <ul class="row-children"> inside the row's <li>, after the .row. A screen reader hears who sent whom, and it works with JS off. The depth option and data-depth are gone.
  • Family page: src/web/pages/family.ts now builds each forge's row with the rows of the forges it sent as its children, still stopping at MAX_DEPTH.
  • CSS: the five data-depth rules and their mobile twins are replaced by one .row-children rule: a rule down the left and a step in. It steps 22px per level, and 12px per level below 720px.
  • Scoping: the current-row tint is now .list li[aria-current="true"] > .row, so it can't leak outside .list.
  • Docs: the docs/DESIGN.md §5 row line now describes children as a nested list, a tree, and says current tints the row. It also lists .row-children.
  • Tests: one asserts the family page puts the forges this one sent in a row-children list inside the "you are here" row. Another asserts row() nests grandchildren inside children inside the parent, and draws no list when there are none.

I couldn't check 360px in a browser. On paper, the deepest level is 3 steps of 12px (36px), since MAX_DEPTH is 4. The title is flex: 1 and ellipsizes, and the meta is nowrap with ellipsis, so the title keeps the row's remaining width and is only shortened, never pushed out.

I didn't change the chain page this round; it's a flat chain and still has no nesting.

commented

Parked by the crew: the check failed ("GET /:owner/:name/milestones renders the pinned HTML") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs