Repository navigation
fix(dashboard): stop skeleton flash on background refetch - #1132
izadoesdev merged 3 commits into
Conversation
|
@ANSHSINGH050404 is attempting to deploy a commit to the Databuddy OSS Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
7fec02f
into
databuddy-analytics:staging
Fixes #1131 — use-dynamic-query flashes skeletons on background refetch.
Problem: useDynamicQuery and useBatchDynamicQuery returned isLoading as query.isLoading || query.isFetching, so every 10m background refetch flipped isLoading true and unmounted cached data behind skeletons.
Changed: apps/dashboard/hooks/use-dynamic-query.ts — return isLoading as query.isLoading only; isFetching stays exposed for subtle refresh indicators. Checked consumers (use-events-stream, use-funnels, realtime-stats) already read isFetching separately or combine explicitly, so no behavior loss.
Checked: bunx biome check on the file passes; bunx tsc --noEmit in apps/dashboard passes. Full pre-push test run is blocked by a pre-existing, unrelated apps/links shutdown test failure (Bun.spawn ENOENT on Windows path with space); dashboard change does not touch links.
Dependencies/overlaps: none. Only open PR on this surface is #1127 (collapsed sidebar), unrelated.
AI disclosure: assisted by OpenCode (Muse Spark). Human-verified: read the hook and consumers, ran typecheck and lint.
Summary by cubic
Fixes the dashboard hooks so background refetches no longer flash skeletons over cached data.
useDynamicQueryanduseBatchDynamicQuerysetisLoadingtoquery.isLoading || query.isFetching, so every 10-minute background refetch flippedisLoadingtotrueand unmounted cached results behind skeletons.isLoadingnow tracksquery.isLoadingonly;isFetchingstays available for subtle refresh indicators. Consumers already readisFetchingseparately or combine explicitly, so no behavior is lost.Written for commit b7f4a40. Summary will update on new commits.