You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
postDashboardUpdate applies responses in arrival order #75
postDashboardUpdate (flexviz/adapters/js/runtime/delta.js) has no request id and no guard against stale responses. When two requests are in flight, the response that arrives last is applied last, even if it belongs to the older request. The page then shows data for a viewport or selection that is no longer the current state.
Reachability
Plausible, not reproduced. Scroll zoom emits one relayout per wheel tick, and each tick can post a viewport event, so several requests can overlap on a slow source. A zoom followed quickly by a reset or deselect can overlap the same way.
Fix direction
Give each request a number from a counter. When a response arrives, drop it if a newer request for the same figures has already been applied. The cube request path in runtime/cube.js needs the same check. Add a browser test that delays the first response with page.route and checks that the second one wins.
Linked axes (PR #77) make this more visible: one viewport response now covers every figure of a link group, so a late, stale response puts old data into every member at once. The members still agree with each other, but all of them can show the older range's data.
Reproduced in a browser on feat/linked-axes (9dfc87e). A and B are lines linked on x. A zooms to [100, 200], and the response to that request is held back for 1.5 s. 200 ms later, A zooms to [300, 400].
Two viewport posts were sent, each naming both linked keys.
After the second response, the data x spans of A and B were [300, 400] and [300, 400].
The older response then arrived. The final data x spans were [100, 200] for both, while the displayed axes and state.viewport stayed at [300, 400].
With linked axes, every group member gets the old data. The fix must not drop whole responses: an older selection response can carry deltas for figures that the newer request did not touch. Keep a "last applied request" number for each figure, and skip only the deltas of a figure that a newer response already updated.
Fixed by #89 (merge c3c01fc). Every write of figure data takes a number from one counter, and each slot refuses a write older than the data it holds. Checked on main 471c09b: #94 did not change this. Tests: TestResponseOrderBrowser (late zoom over a newer zoom, including the linked-axes repro, late response fills untouched slots, overlay bg/fg, late zoom after panel and global reset, init cache key) and test_browser_cube.py::test_abandoned_gesture_keeps_a_pending_response. The abandoned live brush case is tracked in #92.
Activity
jvdd commentedon Sep 23, 2026
Linked axes (PR #77) make this more visible: one viewport response now covers every figure of a link group, so a late, stale response puts old data into every member at once. The members still agree with each other, but all of them can show the older range's data.
jvdd commentedon Sep 24, 2026
Reproduced in a browser on
feat/linked-axes(9dfc87e). A and B are lines linked on x. A zooms to [100, 200], and the response to that request is held back for 1.5 s. 200 ms later, A zooms to [300, 400].state.viewportstayed at [300, 400].With linked axes, every group member gets the old data. The fix must not drop whole responses: an older
selectionresponse can carry deltas for figures that the newer request did not touch. Keep a "last applied request" number for each figure, and skip only the deltas of a figure that a newer response already updated.jvdd commentedon Sep 25, 2026
Fixed by #89 (merge c3c01fc). Every write of figure data takes a number from one counter, and each slot refuses a write older than the data it holds. Checked on main 471c09b: #94 did not change this. Tests:
TestResponseOrderBrowser(late zoom over a newer zoom, including the linked-axes repro, late response fills untouched slots, overlay bg/fg, late zoom after panel and global reset, init cache key) andtest_browser_cube.py::test_abandoned_gesture_keeps_a_pending_response. The abandoned live brush case is tracked in #92.