Skip to content

fix(dashboard): stop skeleton flash on background refetch - #1132

Merged
izadoesdev merged 3 commits into
databuddy-analytics:stagingfrom
ANSHSINGH050404:fix/dynamic-query-loading-state
Oct 17, 2026
Merged

izadoesdev merged 3 commits into
databuddy-analytics:stagingfrom
ANSHSINGH050404:fix/dynamic-query-loading-state

Conversation

@ANSHSINGH050404

@ANSHSINGH050404 ANSHSINGH050404 commented Oct 13, 2026 •

Copy link
Copy Markdown

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.

useDynamicQuery and useBatchDynamicQuery set isLoading to query.isLoading || query.isFetching, so every 10-minute background refetch flipped isLoading to true and unmounted cached results behind skeletons. isLoading now tracks query.isLoading only; isFetching stays available for subtle refresh indicators. Consumers already read isFetching separately or combine explicitly, so no behavior is lost.

Written for commit b7f4a40. Summary will update on new commits.

View guided diff

@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

@ANSHSINGH050404 is attempting to deploy a commit to the Databuddy OSS Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 433cf206-1b1b-43e7-823b-6b36c50f2541

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
documentation Skipped Skipped Oct 16, 2026 11:44am UTC

@vercel
vercel Bot temporarily deployed to Preview – documentation October 13, 2026 16:06 Inactive
@ANSHSINGH050404
ANSHSINGH050404 marked this pull request as ready for review October 13, 2026 19:01
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

Both dashboard query hooks now keep cached results visible during background refreshes.

  • Dashboard query hooks keep cached results visible during background refreshes.

Reviews (1) · Last reviewed commit: "Merge branch 'staging' into fix/dynamic-..." · Reviewed by Greptile

@ANSHSINGH050404

Copy link
Copy Markdown
Author

@izadoesdev

@vercel
vercel Bot temporarily deployed to Preview – documentation October 16, 2026 11:44 Inactive
@izadoesdev
izadoesdev merged commit 7fec02f into databuddy-analytics:staging Oct 17, 2026
10 of 12 checks passed

This branch was previously deployed

1 inactive deployment
Preview – documentation — b7f4a406 Deployed Oct 16, 2026 by vercel[bot]
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.

2 participants