-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Problem
When a user selects a query mode (YQL or PostgreSQL) in the Query Editor and then switches to another tab (History, Saved Queries, Results), returning to the Query Editor resets the mode back to the default. This forces users to re-select their preferred mode repeatedly, breaking workflow continuity.
Why this matters
Developers working with PostgreSQL-syntax queries need to stay in PostgreSQL mode across multiple editing sessions. The current behavior creates friction, especially when:
- Debugging multi-statement workflows that require switching between query history and editing
- Comparing results across different query versions (jumping between Results and Query tabs)
- Working with saved PostgreSQL queries that must be edited and re-run
Current behavior
- User selects "PostgreSQL" mode in Query Editor
- User clicks "History" tab to review past queries
- User clicks back to "Query" tab
- Mode has reset to "YQL" (the default)
Expected behavior
The selected query mode should persist in Redux state and be restored when the Query Editor tab regains focus, matching the pattern already used for other editor state (e.g., query content is preserved).
Technical context
The Query Editor's mode selector is in the src/components/QueryEditor/ directory. Currently, the mode selection appears to be local component state rather than Redux state. Compare this to:
- How
savedPathis preserved inQueryEditor(line ~120 in the component) - How the query content itself persists across tab switches
The fix likely involves:
- Moving query mode from component state to Redux (similar to
executeQueryreducer) - Dispatching the mode selection to the store when it changes
- Reading the persisted mode from Redux on component mount
Related
This is distinct from #917 (onboarding) and complements the mode UX improvements made in recent releases where data/query modes were separated.
Contributed by Klement Gunndu