Skip to content

feat(insights): refetch overlay while a filter change reloads data - #494

Merged
gkhngyk merged 2 commits into
mainfrom
feature/insights-refetch-overlay
Jul 21, 2026
Merged

gkhngyk merged 2 commits into
mainfrom
feature/insights-refetch-overlay

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

On /dashboard/insights, changing the date preset or any filter kept the previous window's data on screen with no signal until the new payload arrived — users read stale numbers as the new period's, then watched them jump. Follow-up to #490's period-consistency work:

  • During a refetch the content dims under a small floating spinner (no label — the dimmed content reads as a reload on its own). The overlay also swallows clicks so a stale KPI card can't be interacted with.
  • The first load keeps the existing skeleton unchanged (isRefetching = isLoading && summary !== null).
  • The filter bar sits outside the overlay, so switching presets again mid-load keeps working.
  • The overlay wraps the NoDataForPeriod branch too — leaving an empty window also shows the reload state instead of a lingering empty message.

Related issue

Follow-up to #490.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. Open /dashboard/insights — first load shows the skeleton as before.
  2. Switch the date preset (e.g. 24h → 30d) — the content dims and a spinner floats over it; when the new data lands the overlay clears.
  3. While the overlay is up, the filter bar remains clickable; the dimmed KPI cards do not respond to clicks.
  4. Pick a window with no data — the period empty state appears after the overlay clears, and switching away from it shows the overlay again.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

gkhngyk added 2 commits July 20, 2026 20:18
On a date/filter change the previous window's data stayed on screen
with no signal until the new payload arrived, so users read stale
numbers as the new period's. Content now dims under a floating
Updating… spinner during refetches (first load keeps the skeleton);
the overlay swallows clicks on stale cards while the filter bar stays
interactive.
Drop the Updating… label — the dimmed content plus spinner reads as a
reload on its own.
@gkhngyk
gkhngyk merged commit d246237 into main Jul 21, 2026
5 checks passed
@gkhngyk
gkhngyk deleted the feature/insights-refetch-overlay branch July 21, 2026 00:05
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.

1 participant