Skip to content

feat(stats): "custom only" checkbox on the symbols bubble chart - #34

Merged
talpitoo merged 1 commit into
mainfrom
stats-symbol-chart-custom-only
Aug 9, 2026
Merged

feat(stats): "custom only" checkbox on the symbols bubble chart#34
talpitoo merged 1 commit into
mainfrom
stats-symbol-chart-custom-only

Conversation

@talpitoo

@talpitoo talpitoo commented Aug 9, 2026

Copy link
Copy Markdown
Owner

What

Adds a "custom only" checkbox to the symbols bubble chart on the Stats page — title left, checkbox right-aligned on the same line (the sleep chart's "smooth" header pattern). Checking it hides the opted-in built-in symbols so the user's own creations get the room, matching the Symbols page's checkbox semantics.

How

  • No new DB query, no refetch: getDreams already ships each dream's full symbol rows to the client and setChartsData aggregates there — the entries now carry each symbol's builtIn flag, and StatSymbolChart filters on it locally ("custom" = !builtIn; a symbol attached to your own dream is either an opted-in built-in or your own creation).
  • Checkbox state persists in sessionStorage like the other stats toggles (new key in range.ts).
  • Fully local to StatSymbolChart: the Filters panel, range buttons, and the other facet charts are untouched; the advanced-charting view gets the checkbox automatically since it renders the same component; the PDF export (isPdf) keeps rendering the full set with no checkbox.

Testing

  • New unit test (written first, watched fail) for the builtIn passthrough in chartsData.test.ts; existing by-id test loosened to objectContaining.
  • npm test (129 passing), npm run type:check, eslint all green.
  • Verified empirically with puppeteer as the seeded zhuangzi user: checkbox sits on the title line, toggling live-filters 26 bubbles → the 3 custom symbols (rendered much larger), state survives a reload, no new console errors.

🤖 Generated with Claude Code

Filters the stats-page symbol chart down to the user's own creations so
they get the room — title left, checkbox right on the same line, the
sleep chart's "smooth" header pattern. Purely client-side: the
aggregated chart data now carries each symbol's builtIn flag, so no new
query or refetch; state persists in sessionStorage like the other stats
toggles. The PDF export keeps rendering the full set with no checkbox.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@talpitoo
talpitoo merged commit 8aa33a4 into main Aug 9, 2026
1 check passed
@talpitoo
talpitoo deleted the stats-symbol-chart-custom-only branch August 16, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant