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

The chart frame becomes a §5 component: .chart-box, .chart and .big are named in §5's table and leave §5d #4331

opened this

Merged 45d 20h ago, live in production

The chart frame is now one §5 component, written in one place: chartBox() in src/web/ui.ts. /system and every board panel call it, and the HTML both pages send is the same as before. What moved where chartBox(chart, cells, title) was already in src/web/pages/boards.ts, but /system wrote the same …drawChart… by hand.

Notes

opened this

The chart frame is now one §5 component, written in one place: chartBox() in src/web/ui.ts. /system and every board panel call it, and the HTML both pages send is the same as before.

What moved where

  • chartBox(chart, cells, title) was already in src/web/pages/boards.ts, but /system wrote the same <div class="chart-box">…drawChart…</div> by hand. The helper now lives in src/web/ui.ts, and system.ts, boards.ts and boards-view.ts import it from there. The unused drawChart imports in system.ts and boards.ts are gone.
  • docs/DESIGN.md: §5's table has a new chart row after the stacked bar chart row. It covers:
    • the markup: .chart-box around drawChart's svg .chart, with .big for the headline figure;
    • the variant: .is-table for a table panel;
    • that the svg carries its own width/height, so nothing shifts;
    • when to use it: any boards/chart.ts chart, sized from the page and never inside the frame.

    .chart-box, .chart and .big are removed from §5d's style/content.ts list.

  • Tests:
    • New test/ui-chart-box.test.ts checks that the helper wraps drawChart's output exactly, that only a table panel gets is-table, and that the title is escaped.
    • test/system-memory.test.ts asserts /system sends both memory series in the frame.
    • test/boards-page.test.ts asserts a line panel sends the frame and a table panel carries chart-box is-table.
    • No existing test was changed except to add these assertions.

Not done: no CSS rule changed. The .bp-*, .sys-pair and .bgrid rules that size the frame stay as they are (#4146 owns .sys-pair).

Checked: bun x tsc --noEmit and bun scripts/design-lint.ts are clean. 248 tests pass across the new test, design-lint, boards-page, the system- tests and the board tests. No screenshots, because the sandbox has no browser.

To try it: as an admin, open /system and /boards/data?source=runs&by=day&series=kind&chart=table. Each chart sits in .chart-box, and the table panel's box also carries is-table.

🤖 Generated with Claude Code

Closes #4282

6 earlier comments
commented

The chart frame is now one §5 component, written in one place: chartBox() in src/web/ui.ts. /system and every board panel call it, and the HTML both pages send is the same as before.

What moved where

  • chartBox(chart, cells, title) was already in src/web/pages/boards.ts, but /system wrote the same <div class="chart-box">…drawChart…</div> by hand. The helper now lives in src/web/ui.ts, and system.ts, boards.ts and boards-view.ts import it from there. The unused drawChart imports in system.ts and boards.ts are gone.
  • docs/DESIGN.md: §5's table has a new chart row after the stacked bar chart row. It covers:
    • the markup: .chart-box around drawChart's svg .chart, with .big for the headline figure;
    • the variant: .is-table for a table panel;
    • that the svg carries its own width/height, so nothing shifts;
    • when to use it: any boards/chart.ts chart, sized from the page and never inside the frame.

    .chart-box, .chart and .big are removed from §5d's style/content.ts list.

  • Tests:
    • New test/ui-chart-box.test.ts checks that the helper wraps drawChart's output exactly, that only a table panel gets is-table, and that the title is escaped.
    • test/system-memory.test.ts asserts /system sends both memory series in the frame.
    • test/boards-page.test.ts asserts a line panel sends the frame and a table panel carries chart-box is-table.
    • No existing test was changed except to add these assertions.

Not done: no CSS rule changed. The .bp-*, .sys-pair and .bgrid rules that size the frame stay as they are (#4146 owns .sys-pair).

Checked: bun x tsc --noEmit and bun scripts/design-lint.ts are clean. 248 tests pass across the new test, design-lint, boards-page, the system- tests and the board tests. No screenshots, because the sandbox has no browser.

To try it: as an admin, open /system and /boards/data?source=runs&by=day&series=kind&chart=table. Each chart sits in .chart-box, and the table panel's box also carries is-table.

🤖 Generated with Claude Code

commented

The chart frame is now one §5 component, written in one place: chartBox() in src/web/ui.ts. /system and every board panel call it, and the HTML both pages send is the same as before.

What moved where

  • chartBox(chart, cells, title) was already in src/web/pages/boards.ts, but /system wrote the same <div class="chart-box">…drawChart…</div> by hand. The helper now lives in src/web/ui.ts, and system.ts, boards.ts and boards-view.ts import it from there. The unused drawChart imports in system.ts and boards.ts are gone.
  • docs/DESIGN.md: §5's table has a new chart row after the stacked bar chart row. It covers:
    • the markup: .chart-box around drawChart's svg .chart, with .big for the headline figure;
    • the variant: .is-table for a table panel;
    • that the svg carries its own width/height, so nothing shifts;
    • when to use it: any boards/chart.ts chart, sized from the page and never inside the frame.

    .chart-box, .chart and .big are removed from §5d's style/content.ts list.

  • Tests:
    • New test/ui-chart-box.test.ts checks that the helper wraps drawChart's output exactly, that only a table panel gets is-table, and that the title is escaped.
    • test/system-memory.test.ts asserts /system sends both memory series in the frame.
    • test/boards-page.test.ts asserts a line panel sends the frame and a table panel carries chart-box is-table.
    • No existing test was changed except to add these assertions.
  • Merge with main: the one conflict was the ui.ts import line in system.ts. The merged line keeps main's new badge, meter and row and this branch's chartBox.

Not done: no CSS rule changed. The .bp-*, .sys-pair and .bgrid rules that size the frame stay as they are (#4146 owns .sys-pair).

Checked after the merge: bun x tsc --noEmit and bun scripts/design-lint.ts are clean. 249 tests pass across the new test, design-lint, boards-page, the system- tests and the board tests. No screenshots, because the sandbox has no browser.

To try it: as an admin, open /system and /boards/data?source=runs&by=day&series=kind&chart=table. Each chart sits in .chart-box, and the table panel's box also carries is-table.

🤖 Generated with Claude Code

commented

.chart-box, the frame that draws the charts in boards/chart.ts, is now a §5 component: chartBox() in src/web/ui.ts, with its own row in docs/DESIGN.md §5. /system's memory pair and every board panel draw through it, and pages size it from their own layout (.bp-*, .sys-pair, .bgrid) instead of from inside the frame.

This push merges main again. The only conflict was the "page furniture" list in docs/DESIGN.md, where each side had removed different classes. Both removals are kept: this branch takes out .big, .chart and .chart-box, which now belong to the chart component, and main takes out .lineage, .lineage-children and .lineage-here. Everything else merged on its own, including src/web/ui.ts, src/web/pages/boards.ts and test/boards-page.test.ts.

After the merge, the type check and design lint are clean, and the design-audit, design-lint, design-map, boards-page, ui-chart-box, system-memory, web-ui and ui-sweep tests pass (94 of 94).

To try it, open /system and any board on the preview at https://lab--4331--forge-trevato-apps.open-platform.sh. Each chart should hold its space while the page loads, with nothing shifting.

🤖 Generated with Claude Code

commented

.chart-box, the frame that draws the charts in boards/chart.ts, is now a §5 component: chartBox() in src/web/ui.ts, with its own row in docs/DESIGN.md §5. /system's memory pair and every board panel draw through it, and pages size it from their own layout (.bp-*, .sys-pair, .bgrid) instead of from inside the frame.

This push merges main again. The only conflict was again the "page furniture" list in docs/DESIGN.md, where each side had removed different classes. Both removals are kept: this branch takes out .big, .chart and .chart-box, which now belong to the chart component, and main takes out .connect-more, .connect-path, .handoff and .handoff-links. Everything else merged on its own, including src/web/pages/boards-view.ts, src/web/pages/system.ts, src/web/ui.ts and test/system-memory.test.ts.

After the merge, the type check and design lint are clean, and the design-audit, design-lint, design-map, boards-page, ui-chart-box, system-memory, web-ui and ui-sweep tests pass (100 of 100).

To try it, open /system and any board on the preview at https://lab--4331--forge-trevato-apps.open-platform.sh. Each chart should hold its space while the page loads, with nothing shifting.

🤖 Generated with Claude Code

commented

.chart-box, the frame that draws the charts in boards/chart.ts, is now a §5 component: chartBox() in src/web/ui.ts, with its own row in docs/DESIGN.md §5. /system's memory pair and every board panel draw through it, and pages size it from their own layout (.bp-*, .sys-pair, .bgrid) instead of from inside the frame.

This push merges main again. The only conflict was the "page furniture" list in docs/DESIGN.md, where each side had removed different entries. Both removals are kept:

  • This branch: takes out .big, .chart and .chart-box, which now belong to the chart component.
  • main: takes out .following, .following-actions, .following-eyebrow, .following-foot, .following-head and .following-sentence, and drops the word "following" from the list's description.

Against main, docs/DESIGN.md now differs only by this branch's own change. No other file had changes from main this round.

After the merge, the type check and design lint are clean, and the design-audit, design-lint, design-map, boards-page, ui-chart-box, system-memory, web-ui and ui-sweep tests pass (100 of 100).

To try it, open /system and any board on the preview at https://lab--4331--forge-trevato-apps.open-platform.sh. Each chart should hold its space while the page loads, with nothing shifting.

🤖 Generated with Claude Code

commented

.chart-box, the frame that draws the charts in boards/chart.ts, is now a §5 component: chartBox() in src/web/ui.ts, with its own row in docs/DESIGN.md §5. /system's memory pair and every board panel draw through it, and pages size it from their own layout (.bp-*, .sys-pair, .bgrid) instead of from inside the frame.

The check failed because main had moved again and the branch no longer merged. This push merges the latest main. The only conflict was again the "page furniture" list in docs/DESIGN.md, where each side had removed different classes. Both removals are kept: this branch takes out .big, .chart and .chart-box, which now belong to the chart component, and main takes out .act. Against main, docs/DESIGN.md now differs only by this branch's own change.

After the merge, the type check and design lint are clean, and the design-audit, design-lint, design-map, boards-page, ui-chart-box, system-memory, web-ui and ui-sweep tests pass (100 of 100).

To try it, open /system and any board on the preview at https://lab--4331--forge-trevato-apps.open-platform.sh. Each chart should hold its space while the page loads, with nothing shifting.

🤖 Generated with Claude Code

commented

The chart frame is now a §5 component. chartBox() in src/web/ui.ts draws the .chart-box wrapper around drawChart's svg .chart, and passing { table: true } adds .is-table. /system's memory pair (pages/system.ts) and every board panel (pages/boards.ts, pages/boards-view.ts) now call it instead of writing the markup inline. The page decides the size through .bp-*, .sys-pair and .bgrid. How pages render doesn't change.

docs/DESIGN.md gets a chart row in §5's component table. Because they're documented there now, .big, .chart and .chart-box leave the §5d page-furniture list.

This update merges main. The only conflict was that same §5d line: main had removed .fork-bar (#4353) and this branch had removed .big, .chart and .chart-box, so the merged line drops all four.

After the merge, the design lint passes with nothing new outside the system, the type check is clean, and the web, design and docs suites pass (282 tests, 3 skipped by the sandbox). test/ui-chart-box.test.ts covers the new helper. test/boards-page.test.ts and test/system-memory.test.ts check that both pages draw the frame.

To try it, open /system or any board on the preview: the charts sit in the same boxes as before, and the server-rendered svg keeps its space so nothing shifts.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs