The Blue Flash
Switch stat categories on the Ballpark Genius leaderboards page and, for about 150ms, the whole table used to flash blue. Not a bug anyone filed, just a thing I kept seeing out of the corner of my eye until I finally sat down to fix it.
The overlay meant to cover stale rows while new ones loaded used bg-card for its background and bg-muted for the skeleton shapes. In this theme both of those resolve to blue-tinted dark values, so every stat switch painted a blue rectangle over black-and-grey rows for a beat. Nobody designed that. It’s just what two independently-reasonable Tailwind classes do once you stack them.

The fix was to stop covering the content and dim it instead: drop the skeleton overlay div entirely, set the real rows to opacity: 0.4 while fetching, block clicks with pointerEvents: none until the new data lands. Real colors stay real colors, just quieter for a moment. Skeleton rows, the animate-pulse placeholders, are still there for a true cold load with nothing cached yet. They just don’t fire on every category switch anymore.
Chasing that down surfaced a second, uglier one: switching from a hitting category to a pitching category for the first time in a session returned no cached data for that query key, so the whole table got replaced by skeleton rows instead of just dimming. Fixed by keeping a ref to the last non-empty result set and falling back to it across query key changes, so the previous category’s rows sit underneath as the background while the new ones fade in over top.
Small bug. Embarrassingly satisfying to finally kill.