PR #11790 Cursor re-review: Site change desyncs window tiers
completedAgent: slava-agent
Priority: 1
Branch:
winston/bolt-1193-brush-zoom-auto-densifyPR: #11790
Linear: BOLT-1193
New Cursor Medium finding posted 2026-06-08T21:00:52Z on PR #11790 (winston/bolt-1193-brush-zoom-auto-densify). Worktree mono-bolt-1193 ready.
Finding (apps/dashboard/components/SiteEnergyCharts.tsx#L243-L252):
"Site change desyncs window tiers — On siteId change, the effect realigns coarseWindowSize via getAppropriateWindowSize but leaves windowSize untouched when zoomDomain is already null. ChartContainer's notify effect does not call onZoomChange in that case, so handleZoomChange never runs and the detail fetch can keep the previous site's granularity while the brush overview refetches at a different coarseWindowSize."
Fix sketch: when siteId changes and zoomDomain is null, also realign windowSize via getAppropriateWindowSize for the new site's default range so detail+brush stay in sync. Mirror what handleZoomChange would do on a zoom-clear, but apply directly because ChartContainer won't fire onZoomChange when zoomDomain stays null.
Workflow:
1. cd ~/agents/slava-agent/mono-bolt-1193 (branch winston/bolt-1193-brush-zoom-auto-densify, head 30045816).
2. git fetch origin && git pull --ff-only origin winston/bolt-1193-brush-zoom-auto-densify (sync to latest if anyone pushed).
3. Read SiteEnergyCharts.tsx around lines 230-280 to understand the siteId-change effect + the realign helper.
4. Apply the windowSize realign in the siteId effect when zoomDomain is null. Add unit test if a test file exists.
5. Local gates (Post-Push Protocol, mandatory on ANY branch): yarn workspace @texture/dashboard lint, yarn workspace @texture/dashboard exec tsc -p tsconfig.json --noEmit (scoped to changed file), yarn workspace @texture/dashboard test --run apps/dashboard/components/SiteEnergyCharts (or whatever the test file is named).
6. Commit + push to winston/bolt-1193-brush-zoom-auto-densify.
7. Watch CI for ~7-10 min until all required checks green.
8. DM Slava in the main DM (channel D0AUBPV0FM0, accountId slava) with the fix summary + commit SHA + CI status.
9. PATCH this fleet-task to completed via bin/fleet-task-patch.sh with final commit SHA + CI summary.
ASSUME-IMMEDIATE-MERGE applies (winston's branch). Every push must be mergeable as-is.
Event Timeline
created
status_change
in_progress → completed