Public: anyone can read this; the crew can change it.
A board panel whose source has no rows says so in one line instead of drawing an empty chart #16154
Check · Review · Land · Live done — Landed and live in production.
A board panel whose query returns no rows now shows one line, "Nothing recorded yet in .", instead of an empty chart. Panels with rows draw exactly as before. The type check is clean and 56 tests pass across the new file and the existing board and chart suites.
shipped production is serving it deploy 3fede26
A board panel whose query returns no rows now shows one line, "Nothing recorded yet in <source>.", instead of an empty chart. Panels with rows draw exactly as before.
The type check is clean and 56 tests pass across the new file and the existing board and chart suites. I did not run bun scripts/design-lint.ts, because src/web is untouched. I did not run the full suite, since the forge runs it on push. The gate's comment rewrap was committed with the change.
src/boards/chart.ts: a newemptySource(kind, title, source)draws the line in the same chart box, so there is no layout shift. The screen-reader text says the same thing. A table panel gets a one-row table.drawCharttakes an optional fourth argument,source, and usesemptySourcewhen there are no cells and a source is given.src/boards/panel_data.ts:drawnPanelpasses the panel'squery.sourcetodrawChart.test/board-empty.test.ts: new. It checks that every chart type shows the line with the source name and draws no path, and that the source name is escaped. It also checks that a panel drawn from no rows names its source, and that a panel with rows is byte-identical to before. The tests that calldrawChartwithout a source still get the old "No points in this range." text.
I left src/boards/answer.ts alone. The explore page already handles zero rows itself, with no chart.
An empty time window on a source that has older rows also reads "Nothing recorded yet", because the panel code can't tell the two cases apart. Telling them apart would need an extra count query per panel, so I didn't add it.
To try it, open a board with a panel on a source with no rows. For example, point a panel at a source nothing has written to yet.
[{"go":"/boards","look":"a panel whose source has no rows","expect":"one line, 'Nothing recorded yet in <source>.', in the chart's box with no layout shift"},{"go":"/boards","look":"a panel with rows","expect":"drawn as before"}]Small, single-purpose, reuses the existing chart frame and .chart-none class, so no layout shift and no new CSS. The source name is escaped and the screen-reader text matches. Panels with rows are byte-identical, and the tests cover that. The change is in shared board code, so the terminal gets it too. Two things I would do next: (1) an empty time window on a source with older rows also reads "Nothing recorded yet", which is wrong for that case. Pass a cheap has-any-rows flag from the answer so the line can say "No rows in this range" instead. (2) The table variant drops the header row, so give the empty table a header or an aria-label so it keeps the same shape as a populated one. I did not run design-lint; src/web is untouched.
A board panel whose query returns no rows now shows one line, "Nothing recorded yet in <source>.", instead of an empty chart. Panels with rows draw exactly as before.
The type check is clean and 56 tests pass across the new file and the existing board and chart suites. I did not run
bun scripts/design-lint.ts, becausesrc/webis untouched. I did not run the full suite, since the forge runs it on push. The gate's comment rewrap was committed with the change.src/boards/chart.ts: a newemptySource(kind, title, source)draws the line in the same chart box, so there is no layout shift. The screen-reader text says the same thing. A table panel gets a one-row table.drawCharttakes an optional fourth argument,source, and usesemptySourcewhen there are no cells and a source is given.src/boards/panel_data.ts:drawnPanelpasses the panel'squery.sourcetodrawChart.test/board-empty.test.ts: new. It checks that every chart type shows the line with the source name and draws no path, and that the source name is escaped. It also checks that a panel drawn from no rows names its source, and that a panel with rows is byte-identical to before. The tests that calldrawChartwithout a source still get the old "No points in this range." text.I left
src/boards/answer.tsalone. The explore page already handles zero rows itself, with no chart.An empty time window on a source that has older rows also reads "Nothing recorded yet", because the panel code can't tell the two cases apart. Telling them apart would need an extra count query per panel, so I didn't add it.
To try it, open a board with a panel on a source with no rows. For example, point a panel at a source nothing has written to yet.
Closes #16137