Skip to content

fix(content): suppress skeleton flash on filter change and bulk actions - #367

Merged
gkhngyk merged 3 commits into
ansvisor:mainfrom
Maqbool61:main
Jul 8, 2026
Merged

gkhngyk merged 3 commits into
ansvisor:mainfrom
Maqbool61:main

Conversation

@Maqbool61

@Maqbool61 Maqbool61 commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #365

  • Added silent parameter (default false) to loadData
  • When silent=true, skips setLoading(true) so existing rows stay visible during background refresh
  • Initial load and filter-change calls remain non-silent (correct full loading state on first paint and filter switch)
  • All post-mutation calls use loadData(true): handleSendWebhook, handleDismiss, handleBulkSend, handleBulkDone, handleBulkDismiss, and pollJob completion handler
  • Zero new TypeScript errors introduced (verified via tsc --noEmit diff)

Summary

Related issue

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

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

Maqbool61 added 2 commits July 7, 2026 17:52
Closes #365

- Added silent parameter (default false) to loadData
- When silent=true, skips setLoading(true) so existing rows stay
  visible during background refresh
- Initial load and filter-change calls remain non-silent (correct
  full loading state on first paint and filter switch)
- All post-mutation calls use loadData(true): handleSendWebhook,
  handleDismiss, handleBulkSend, handleBulkDone, handleBulkDismiss,
  and pollJob completion handler
- Zero new TypeScript errors introduced (verified via tsc --noEmit diff)

Signed-off-by: Maqbool Ahmed <[email protected]>

@gkhngyk gkhngyk left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice — the bulk-action skeleton flash is fixed with the silent param (loadData(true) on the mutation paths). 🙌

One thing before it fully closes #365: the issue also covers filter changes (the reporter specifically hit "selecting a filter option runs the skeleton"), and that path still flashes — the useEffect(() => loadData(), [loadData]) re-runs non-silent whenever a Status/Impact/Type filter changes (its deps include the filters), so setLoading(true) fires and the list drops to the skeleton.

Could you suppress that case too? Two clean options:

  • (a) make the filter-change effect call loadData(true) after the first load — distinguish the initial mount via a hasLoadedRef; or
  • (b) simpler — gate the skeleton render on loading && opportunities.length === 0, so a populated list never flashes during any refetch (filter change or mutation), only the first empty load does.

Either one makes it satisfy the filter-change step (step 2 of the How-to-test in the issue). Thanks!

@Maqbool61
Maqbool61 requested a review from gkhngyk July 7, 2026 20:43

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect — gating the skeleton on loading && opportunities.length === 0 covers both cases cleanly: a filter change keeps the populated list in place (no flash), and the initial empty load still shows the skeleton. Combined with loadData(true) on the mutation paths, both the filter-change and bulk-action flashes from #365 are gone. Prettier's happy. LGTM! 🎉

@gkhngyk
gkhngyk merged commit 3fd0ba3 into ansvisor:main Jul 8, 2026
3 checks passed
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.

fix(content): the list flashes its skeleton on every filter change and bulk action

2 participants