fix: avoid spurious filter resets from concurrent loadDashboard calls#94
Merged
jtroup merged 1 commit intostacklet/integrationfrom Mar 6, 2026
Merged
fix: avoid spurious filter resets from concurrent loadDashboard calls#94jtroup merged 1 commit intostacklet/integrationfrom
jtroup merged 1 commit intostacklet/integrationfrom
Conversation
ephan
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
In
useDashboard.js, changedsetFilters(updatedFilters)to afunctional update that preserves the existing state reference when
filter values are unchanged (using
lodash.isEqual).why
The failing e2e test
Dashboard Filters > filters rows in a Table Visualizationexposed a race condition introduced by the axios 0.30.x /werkzeug 3.x upgrade (PR #88), which shifted request-completion timing.
On dashboard mount, two
useEffecthooks independently callloadDashboard(). Each call resolves its widget promises and callssetFilters(collectDashboardFilters(...)).collectDashboardFiltersalways returns a new array reference even when filter values are
identical. Each new reference triggers a
useEffectinVisualizationRendererthat callscombineFilters(localFilters, globalFilters), resetting any user-modified local filter selection backto the global default.
With the new timing, this reset was firing after the test clicked a
filter option, causing the widget to display 4 rows instead of the
expected 3.
By preserving the existing reference when values are unchanged, spurious
effect triggers in
VisualizationRendererare suppressed, and localfilter selections survive concurrent
loadDashboard()completions.testing
Covered by the existing Cypress e2e test
client/cypress/integration/dashboard/filters_spec.js— specificallyDashboard Filters > filters rows in a Table Visualization.docs
No docs needed.
🤖 Generated with Claude Code