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

Board charts: readable time ticks, y-axis units, hover on stacked areas, marks for rolls and config changes #17081

opened this

Merged 34h 17m ago, live in production

Board charts now have weekday ticks, a unit on the y axis, a hover tooltip on stacked areas, and marks for rolls and config changes. tsc, the gate rules that can run here, and the tests covering the change pass. The forge's check runs the rest of the suite on this push.

Notes

opened this

Board charts now have weekday ticks, a unit on the y axis, a hover tooltip on stacked areas, and marks for rolls and config changes. tsc, the gate rules that can run here, and the tests covering the change pass. The forge's check runs the rest of the suite on this push.

What changed

  • Time ticks (src/boards/chart.ts): day ticks lead with the weekday ("Mon 20"). Hour ticks are unchanged.
  • Y-axis unit: a unit follows the top y value ("12 ms", "40 rows") and ends the screen-reader sentence. It comes from the panel's query through a new unitOf in src/boards/panel_data.ts. count gives "rows"; a _ms, _s, _bytes or _cents column gives that suffix. Any other column gives its name. A panel with no column has no unit.
  • Stacked-area hover: each time step gets a hover column. The tooltip says the stack's total, and the synced crosshair now includes area charts. The per-band <title> tooltips no longer show on hover, because the hover columns sit above the bands.
  • Marks (src/boards/marks.ts):
    • A release shows its cut, plus a "Rolled vN live" mark when it went live.
    • configMarks reads config_change and says the scope, up to three key names and who changed it. It never shows values.
    • boardMarks merges both in time order and caps them at 40. The board page and the flow page now draw from it.
  • Terminal door: /boards/<slug> in the terminal lists the same marks under the panels ("marked on the charts (UTC)"), and the unit follows a panel's latest value. The how-to (docs/features/board-chart-hover.md) and docs/design/areas/chart.md (.chart-unit) are updated.

Tests

  • test/boards-page.test.ts changed because its day ticks now carry weekdays.
  • test/boards-marks.test.ts changed because its release table now has live_at.
  • New tests cover weekday ticks, units, area hover, roll and config marks, and the terminal lines.

Not done

  • No per-series breakdown in the area tooltip. It shows the total only.
  • No marks beyond releases, rolls and config changes.
  • Not reused: scripts/similar.ts was not run. I extended the existing chart and marks functions instead of adding new ones.

Try it: open /boards/<slug> as an admin, point at a stacked area, and check the weekday ticks, the unit on the y axis and the marks. In the terminal, open the same board and read the "marked on the charts" lines.

[{"go":"/boards/<slug>","look":"a stacked-area panel: point at the plot; the top y value","expect":"a crosshair and a tooltip with the stack total; the unit after the top y value; day ticks like 'Mon 20'; dashed marks for rolls and config changes"}]

🤖 Generated with Claude Code

Closes #16727

Show 8 earlier items

7 earlier comments
commented

<!-- look-pages ff94301e924d --> Look pages for ff94301, from the gate:

  • look pages (named): this pull changes src/web/chart_hover.ts, src/web/pages/boards-view.ts; a commit names /boards?help
commented

The branch already meets each item in the comment, so I changed nothing and pushed nothing.

  • Look pages: the gate's note says the pull changes src/web/chart_hover.ts and src/web/pages/boards-view.ts, and that a commit names /boards?help. It's a note, not a failure.
  • Both doors: the rule passes. The terminal side is src/tui/screens/boards.ts with test/tui-boards.test.ts, and the how-to is docs/features/board-chart-hover.md.
  • Name the issue: the rule passes. The Direction commits end with (#16727).
  • Dead code: test/unused-exports.test.ts passes.
  • as never in tests: none in the diff against main.
  • Checks: bun x tsc --noEmit is clean, and bun test on the boards, chart-hover, TUI-boards and hollow suites passes (96 tests).

I did not act on two gate notes. The comment-width note names src/boards/chart.ts, src/boards/panel_data.ts, src/flow/pages_read.ts and one more file. gate.ts --fix left nothing to commit, and the note says the nightly rewrap handles them on main. The duplicate-function note says lineChart and barChart in chart.ts are 0.60 alike. I left them as two functions, because merging them would be a separate refactor.

Try it: open /boards/<slug> as an admin and point at a stacked area. You should see weekday ticks, the y-axis unit, a hover list of the series, and marks for rolls and config changes.

commented

Board charts now have readable time ticks under the plot and a y-axis unit. Stacked areas get a hover column per time, and releases, rolls and config changes are drawn as marks on the charts. The terminal's /boards/<slug> lists the same marks and puts the unit after each panel's latest value.

This push fixes two problems from review:

  • Day ticks now include the month. The code is dayTicks in src/boards/chart.ts:
    • When the ticks span a week or less, they lead with the weekday ("Mon 20"). If they cross into another month, the month is named on the first tick and where it turns: "Sat Nov 28, Sun 29, Mon 30, Tue Dec 1, Wed 2".
    • Past a week the weekday no longer helps a reader, so every tick says the month and day: "Sep 3 … Dec 2".
    • Hourly ticks and the screen-reader sentence are unchanged.
    • Two new tests in test/chart-hover-marks.test.ts cover ticks that cross a month and a 91-day range.
  • The unit no longer widens the y axis. .chart-unit (in src/web/style/content.ts) is now taken out of the layout and placed under the top value, so a label like "12 ms" doesn't widen the axis or move the plot. A long unit can spill to the left of the axis rather than move the plot; the units the panels use ("ms", "rows") fit. I haven't looked at it on a 360px phone; that is the first review step below.

Not changed: the gate notes that lineChart and barChart are 0.60 alike. Folding them into one function is a separate refactor.

Checks: the gate shows 0 failures. The type check and design lint are clean. The chart, boards-page and TUI-boards tests pass (58), as do the dead-code and door tests. bun scripts/fast.ts named 3,977 test files (an estimated 334 minutes), so I picked the covering suites by hand and left the full run to the forge's check.

[
  {"go": "/boards?help", "look": "a board's line chart with day buckets", "expect": "ticks within a week read 'Mon 20'; ticks that cross a month name it where it turns ('Tue Dec 1'); a 30 or 90 day range reads 'Nov 3'"},
  {"go": "/boards?help", "look": "the top of the y axis on a panel with a unit, at 360px wide", "expect": "the unit sits under the top value; the axis column is as narrow as the numbers and the plot does not shift", "ask": "Does the unit read clearly under the top value?"}
]

🤖 Generated with Claude Code

commented

Board charts get readable time ticks and a y-axis that holds its width (#16727). Day ticks name the month where they cross into a new one, and say month and day once the range is past a week. The y unit sits under the top value, so a long unit never widens the axis. Hovering a stacked chart lists its series. unitOf only names real units. Marks that can't be parsed are skipped. The dead .chart-unit rule is gone.

This update merges main:

  • Conflict in src/tui/screens/boards.ts: it was only in the imports. The resolution keeps this branch's Mark/boardMarks imports and main's keyOf import.
  • Fix for a test already failing on main: test/keymap-terminal.test.ts failed there before this branch touched it. #17094 added an r binding ("restore a snapshot") to src/tui/screens/infra.ts, while #17012 drew up the list of screens that bind r for their own action. Neither saw the other. The fix adds infra.ts to that list in the test (the test was wrong, not the screen), in a separate commit marked No door.

Verified: bun x tsc --noEmit is clean, the gate finds no failures, and the board, chart and keymap tests pass. The run covered 76 files; it showed one failure, the keymap test above, and that file passes after the fix. The browser-driven keymap tests were skipped because no Chromium starts in this sandbox. scripts/fast.ts named over 3,000 files for the merge, so the full suite is left to the forge's check.

To try it: open /boards/<slug> as an admin, point at a stacked area, and read the day ticks, the y unit and the marks.

🤖 Generated with Claude Code

commented

Board charts get readable time ticks and a y-axis that holds its width (#16727). Day ticks name the month where they cross into a new one, and say month and day once the range is past a week. The y unit sits under the top value, so a long unit never widens the axis. Hovering a stacked chart lists its series. unitOf only names real units. Marks that can't be parsed are skipped. The dead .chart-unit rule is gone.

The latest update merges main:

  • Conflict in src/tui/screens/boards.ts: it was only in the imports. The resolution keeps this branch's Mark/boardMarks imports and main's keyOf import.
  • Fix for a test already failing on main: test/keymap-terminal.test.ts failed there before this branch touched it. #17094 added an r binding ("restore a snapshot") to src/tui/screens/infra.ts, while #17012 drew up the list of screens that bind r for their own action. Neither saw the other. The fix adds infra.ts to that list in the test (the test was wrong, not the screen), in a separate commit marked No door.

Verified on head 6da986163: bun x tsc --noEmit is clean, the gate finds no failures, and the board, chart and keymap tests pass. The browser-driven keymap tests were skipped because no Chromium starts in this sandbox. The full suite is left to the forge's check. The last check run on this head was cut short without a recorded failure; nothing was pushed after it, because no defect was found.

To try it: open /boards/<slug> as an admin, point at a stacked area, and read the day ticks, the y unit and the marks.

🤖 Generated with Claude Code

commented

Board charts are easier to read on the web and in the terminal, and the branch has main merged back in.

The chart change (#16727)

  • Time ticks: they show weekdays. Day ticks also name the month when they cross into a new one, and show the month and day once the range is longer than a week.
  • Y axis: it now shows a unit, placed under the top value so it never makes the axis wider. unitOf only names real units.
  • Hover: it works on stacked areas and lists every series.
  • Marks: rolls and config changes appear as marks on the chart. Marks that can't be parsed are skipped.
  • Terminal: src/tui/screens/boards.ts lists the same marks under the board.
  • Removed: the unused .chart-unit CSS rule.

The merge src/tui/screens/boards.ts conflicted only in its imports. main added movedKey from ./moved_key.ts, and this branch added Mark and boardMarks. The merged file keeps all three, so the g key main added and the marks from this branch both work.

Checks

  • bun x tsc --noEmit passes.
  • scripts/fast.ts named 3,260 test files, too many to run here, so I ran the 79 board, keymap and moved test files: 566 pass, 7 skipped, none failing.
  • bun scripts/design-lint.ts is clean.
  • The gate notes that lineChart and barChart in src/boards/chart.ts are 0.60 similar. They are left as two functions in this pull.
[
  {"go": "/boards/<slug>", "look": "the x-axis ticks on a chart over a week long", "expect": "the month and day; ticks that cross into a new month name it"},
  {"go": "/boards/<slug>", "look": "the top of the y axis", "expect": "the unit sits under the top value and the axis is no wider than before"},
  {"go": "/boards/<slug>", "look": "hover over a stacked area chart", "expect": "the tooltip lists every series at that time"},
  {"go": "/boards/<slug>", "look": "the chart after a roll or a config change", "expect": "a mark at that time, and the same marks listed under the board in the terminal"}
]

🤖 Generated with Claude Code

commented

<!-- look-pages 851f9b35e66c --> Look pages for 851f9b3, from the gate:

  • look pages (named): this pull changes src/web/chart_hover.ts, src/web/pages/boards-view.ts, src/web/style/content.ts; a commit names /boards?help
commented

Board charts are easier to read: day ticks show the weekday and the month, the y axis shows a unit, hover works on stacked areas, and rolls and config changes appear as marks. The same marks are listed under the board in the terminal. This push has no new commit: I found nothing in the latest feedback that needed a code change, and the branch already matches origin at 851f9b35e.

Time ticks (src/boards/chart.ts): day ticks start with the weekday ("Mon 20"). They name the month where the axis crosses into a new one. On ranges longer than a week they show the month and day. Hour ticks are unchanged.

Y-axis unit: the unit sits under the top y value, so it never makes the axis wider, and it ends the screen-reader sentence. A new unitOf in src/boards/panel_data.ts takes it from the panel's query and returns only real units. count gives "rows", and a _ms, _s, _bytes or _cents column gives that suffix.

Stacked-area hover (src/web/chart_hover.ts): each time step has a hover column whose tooltip lists every series. The synced crosshair now covers area charts. The unused .chart-unit CSS rule is removed.

Marks (src/boards/marks.ts):

  • A release shows its cut, plus a "Rolled vN live" mark when it went live.
  • configMarks gives the scope, up to three key names and who made the change; it never shows values.
  • Marks that can't be parsed are skipped.

Terminal (src/tui/screens/boards.ts): the board screen lists the same marks, and it keeps the g key that main added through movedKey. The how-to is updated in docs/features/board-chart-hover.md.

About the latest feedback:

  • Look page: the gate says this rule is met. Commit 4f8fbfa2c names /boards?help, and /boards draws the board charts this pull changes.
  • Both doors: the terminal screen and the how-to both change with the page.
  • No as never: the changed tests use none.
  • Dead code: test/unused-exports.test.ts passes.
  • Issue number: every commit that isn't a merge ends with (#16727).

Not done: the gate notes that lineChart and barChart in src/boards/chart.ts are 0.60 similar. Merging them into one function is a refactor of its own, so it is not in this pull.

Checks:

  • bun x tsc --noEmit passes.
  • The 79 board, keymap and moved test files pass: 566 pass, 7 skipped, none failing. scripts/fast.ts named too many files to run here (3,260), so I picked these myself.
  • bun scripts/design-lint.ts is clean.
[
  {"go": "/boards/<slug>", "look": "the x-axis ticks on a chart over a week long", "expect": "the month and day; a tick that crosses into a new month names it"},
  {"go": "/boards/<slug>", "look": "the top of the y axis", "expect": "the unit sits under the top value and the axis is no wider than before"},
  {"go": "/boards/<slug>", "look": "hover over a stacked area chart", "expect": "the tooltip lists every series at that time"},
  {"go": "/boards/<slug>", "look": "the chart after a roll or a config change", "expect": "a mark at that time, and the same marks listed under the board in the terminal"}
]

🤖 Generated with Claude Code

the crew's run was interrupted: restart, resumes on the next pass — cancelled
Sign in to join this conversation.

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

Keyboard shortcuts

Docs