What does this issue track?
Follow-up to PR #141 (data-focused UX polish). The initial PR shipped rich query tables, progress bars, cost badges, schema previews, type indicators, percentage bars, relative timestamps, column statistics, and boolean/NULL styling.
This issue tracks the interactive TUI features that require state management and keyboard handling — higher complexity, separate scope.
Proposed features
- Interactive sorting — keyboard shortcuts to sort result table by column (▲/▼ indicators in header, frozen headers while scrolling)
- Copy-to-clipboard — select cell/row/column and copy as CSV, JSON, or SQL
IN clause (C/J/L shortcuts)
- EXPLAIN plan visualization — auto-run
EXPLAIN ANALYZE, render as ASCII tree with cost indicators and index usage hints (per-dialect: PostgreSQL, Snowflake, BigQuery, Databricks)
- Column reorder + hide/show —
←/→ to reorder, H to toggle visibility, persist to session state, show "+ N hidden columns" indicator
Why
These directly address common data engineering workflows:
- Sorting: avoid rewriting
ORDER BY and re-executing queries during exploration
- Copy: paste IDs into
WHERE IN, copy metrics for reports, copy column names for SELECT lists
- EXPLAIN: instant performance diagnosis without leaving the tool
- Column reorder: wide result sets (20+ cols) become scannable by hiding noise
Research source
Full research in memory: competitive analysis of DataGrip, DBeaver, Snowsight, k9s, lazygit patterns. See PR #141 discussion for screenshots of the foundation these build on.
Implementation notes
- All features require interactive TUI state (keyboard event handlers, re-render on state change)
- Sorting and column reorder can share a column state management layer
- EXPLAIN is the highest complexity — requires per-dialect SQL parsing (~200 LOC per DB)
- Copy needs Node.js clipboard integration
- Each feature can be shipped independently
Checklist
What does this issue track?
Follow-up to PR #141 (data-focused UX polish). The initial PR shipped rich query tables, progress bars, cost badges, schema previews, type indicators, percentage bars, relative timestamps, column statistics, and boolean/NULL styling.
This issue tracks the interactive TUI features that require state management and keyboard handling — higher complexity, separate scope.
Proposed features
INclause (C/J/Lshortcuts)EXPLAIN ANALYZE, render as ASCII tree with cost indicators and index usage hints (per-dialect: PostgreSQL, Snowflake, BigQuery, Databricks)←/→to reorder,Hto toggle visibility, persist to session state, show "+ N hidden columns" indicatorWhy
These directly address common data engineering workflows:
ORDER BYand re-executing queries during explorationWHERE IN, copy metrics for reports, copy column names forSELECTlistsResearch source
Full research in memory: competitive analysis of DataGrip, DBeaver, Snowsight, k9s, lazygit patterns. See PR #141 discussion for screenshots of the foundation these build on.
Implementation notes
Checklist