Hide charts with no recent data by default in group view#8
Merged
Conversation
|
Vercel preview for |
Several groups (appian, clickbench, polarsignals/100000, statpopgen/100000, tpcds, tpch sf=10/100, some wide-table charts) render compression-size cards as bare axes because their fact rows all predate the default latest-100 commit window. Hide those cards by default and add a per-group toolbar toggle (left of "Reset group") that reveals them. - chart-format: `chartHasRecentData` inspects only the trailing latest-100 slots of each series, so the bounded `?n=100` payload, its normalized form, and a full `?n=all` history all classify a chart identically. - chart-store: `GroupSnapshot` gains `emptyCharts` (data-derived, kept across Reset like `knownSeries`) and `showEmptyCharts` (user toggle, Reset returns it to hidden). The group-bundle prime classifies every chart in the group, including cards that never intersect the viewport; the per-chart `?n=100` and full-history paths classify as fallbacks. - Chart island: the card gets the `hidden` attribute while classified empty and not revealed; `maybeConstruct` bails on hidden cards (a display:none canvas would build a zero-size chart) and a reveal effect re-enters construction once the un-hidden DOM is committed. - GroupToolbar: a "Show/Hide N empty charts" button renders once the group has classified at least one empty chart, with a title explaining the latest-100 rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RvL7reZ8o1qo3NGtXXNuwP Signed-off-by: Claude <noreply@anthropic.com>
connortsui20
force-pushed
the
claude/hide-empty-benchmark-charts-is05e2
branch
from
July 9, 2026 17:00
f6f19d5 to
86692bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds functionality to automatically hide charts that have no data in the latest 100 commits (the default window) when viewing a group, with a toggle in the group toolbar to reveal them. This reduces visual clutter on the landing page while keeping all data accessible.
Key Changes
Empty chart detection: Introduced
chartHasRecentData()utility that inspects only the trailing window of a chart payload to determine if it contains any real data points. Works consistently across bounded?n=100payloads and full history responses.Store enhancements: Extended
GroupSnapshotwith:emptyCharts: array of chart slugs classified as having no recent datashowEmptyCharts: toggle state for revealing hidden empty chartsnoteChartRecentData(),setShowEmptyCharts(),chartIsHiddenAsEmpty()Classification on bundle fetch: Charts are classified as empty immediately when the group bundle is fetched in
ensureGroupBundle(), allowing cards to hide without waiting for individual chart hydration or intersection observation.Chart component integration:
hiddenAsEmpty()check to prevent constructing Chart.js into hidden (display:none) canvasesnoteChartRecentData()when payloads arrive (both default window and full history)maybeConstruct()when the empty-charts toggle reveals a cardUI additions:
GroupToolbar, positioned left of the Reset button[hidden]attribute viadisplay: noneReset behavior:
resetGroup()now also resetsshowEmptyChartsto false (re-hiding revealed empty charts), while preserving the classification data itself.Implementation Details
chartHasRecentData()function inspects only the trailingwindowSizeslots, making it produce identical verdicts whether called on a bounded?n=100payload or the tail of a full historyknownSeries), so it persists across group resets but is cleared when the payload cache is resethttps://claude.ai/code/session_01RvL7reZ8o1qo3NGtXXNuwP