Share the set charts between the console and the guest site #35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/shared-set-charts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The upcoming guest site at
/liveneeds the same set charts as the console. Right now those charts live insideSetStats, next to the console's tRPC calls, so nothing else can reuse them. Separately, a play whose track is unrated on a dimension was silently dropped from that trend, which shifted every later point left.Solution
app/shared/chartData.tsholds pure helpers:setTrends,categoryCountsandruns.TREND_DIMSmoves here from the router.app/shared/SetCharts.tsxis a pure lasertag component that takes plain props.SetStatsrenders it, and the set view's taller charts become atallprop.setStatsin the router builds its trends and counts with the shared helpers. Unrated plays stay asnull, so the line breaks there and the averages still ignore them.bun run checknow also lintsapp/**/*.module.css.This is Slice 2 of
projects/2026-09-27-dj-online-companion/plan.md.Testing
bun test: 109 pass. That includes the newchartDatatests and a router test showing an unrated play charts as a gap.bun run check:tscis clean, and lasertag reports no dead CSS./retroon a past set and confirm the charts look as they did before.🤖 Generated with Claude Code