Repository navigation
fix(adapters): keep the overlay background correct after a zoom or panel reset under a cross-filter - #94
Merged
Conversation
…hanges the range under a cross-filter
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
ECharts datazoom events do not provide the viewport key needed to invalidate stale backgrounds.
Review effort: Lite
Findings: None
What changed in this PR
Fixes stale or filtered overlay backgrounds after cross-filtered zooms and panel resets.
Changes:
- Corrects unfiltered-background detection.
- Invalidates stale backgrounds when viewport keys change.
- Adds regression tests and documentation updates.
| File | Summary |
|---|---|
tests/test_browser.py |
Adds regression tests for overlay behavior. |
flexviz/adapters/js/runtime/state.js |
Updates background eligibility logic. |
flexviz/adapters/js/runtime/delta.js |
Invalidates stale overlay backgrounds. |
CHANGELOG.md |
Documents the fixes. |
Architecture.md |
Clarifies overlay background behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Two client bugs in the overlay background cache. Both exist on
mainin either cross-filter model. They were found in #93 and move here, so #93 can stay open as a reference for #80.Bugs
main,isUnfilteredBaseForFigurereturned true for every figure with its own selection. But the engine filters a recomputed figure by every selection except its own. So a zoom on such a figure stored filtered data as its overlay background.ts. Brush both. Zoom figure 0. Switch to overlay mode. The background of figure 0 shows only the rows that the brush of figure 1 keeps.mainhides the bug by accident. The zoom marks the background of that figure stale, and the warm-upinitthen refreshes every background.selectionevent with viewport keys.mainmarked the background stale only onviewportevents.Changes
isUnfilteredBaseForFigure: a delta is unfiltered only when no other figure has a selection with predicates.requestHasActiveSelectionshad no other callers and is removed.postDashboardUpdate: a figure whose viewport keys are in the event gets a stale background when its delta is filtered. Before, every figure without a selection got a stale background on aviewportevent with selections.Tests
TestResponseOrderBrowser, one per commit. Each fails without its fix and passes with it. Without the first fix, the background of figure 0 stays at x = (200, 250). Without the second fix, the wait for a full-range background times out.make test: 2372 passed, 2 skipped.make test-browser: 303 passed, 9 skipped.Not changed
A figure with its own selection still shows unfiltered data after a switch from update to overlay mode and back.
maindoes the same when at least one figure has no selection. This PR adds the case where every figure has a selection, because the overlay warm-up now runs there too. #80 tracks it: option A+ refreshes the owners on the switch back.Related: #80 (the trade-off and its options), #93 (open as a reference, not merged).