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
Severity: P1 (misleads; feeds the wrong-target save in the grid).
What happens
On http://localhost:1420/?mock=connected:
In tab 1 run UPDATE customers SET city = 'X' WHERE id = 1. Open a new query tab with + and run SELECT * FROM orders.
Switch back to tab 1. Its editor still shows the UPDATE, but the results pane shows tab 2's orders grid with Edit Mode available.
In tab 1 run SELECT SLEEP(5), then open a new empty tab. The empty tab shows "Executing query..." and a red Cancel button for tab 1's query.
In that new tab press Ctrl+Enter on SELECT * FROM customers while tab 1 is still sleeping. Tab 2's result appears, and tab 1's SLEEP result is silently dropped: it is never shown and never recorded in history.
Connect to "Production (read-only)" via + in the connection tab bar. The grid still shows the Local dev customers rows, with Edit Mode offered.
Cause
src/stores/resultStore.ts:88-92 holds results, isExecuting, error, page and resultSource as single global values. clearResults is never called outside tests.
doExecuteQuery bumps the module-level cancelGeneration (src/stores/resultStore.ts:418), so a run started in one tab makes the other tab's in-flight response be ignored (if (cancelGeneration !== myGeneration) return;).
Fix
Key result state by editor tab id (Record<tabId, TabResultState>, with a cancel generation per tab). ResultsGrid, QueryToolbar, StatusBar and MainPanel should read the active tab's slice. A tab with no run yet should show the empty state.
Activity
release: 1.4.0 (#871)