feat: add modal query editing and vamp-style status bars

This commit is contained in:
Valdemar Lorenzen
2026-10-19 15:30:25 +02:00
parent a032579e98
commit 8e41c27659
5 changed files with 608 additions and 89 deletions
+14 -8
View File
@@ -27,32 +27,38 @@ Expansion never runs shell commands. Quote CLI paths to let dbdash expand them.
PostgreSQL URLs and libpq-style key=value strings are accepted.
Use sslmode=require for mandatory TLS; certificates and hostnames are verified.
Use sslmode=disable only for trusted local connections.
The inspector needs 70×14 terminal cells; the PostgreSQL window needs 74×20.
The inspector needs 70×17 terminal cells; PostgreSQL/SQLite windows need 74×22/74×18.
Navigation:
Tab/Shift-Tab Cycle explorer, query editor, and rows/schema (Esc returns to explorer)
Tab/Shift-Tab Cycle explorer, query editor, and rows/schema
Up/Down, j/k Move selection; Enter connects/expands a database or opens a relation
Home/End, g/G First / last item
s Toggle rows and column schema
Left/Right Collapse/expand in explorer; scroll columns in rows/schema (h/l too)
Left/Right Collapse/expand in explorer; select cells in rows/schema (h/l too)
n/p, PgDn/Up Next / previous 100-row relation page
c Add a configured database in a floating window
i Show configured database info (Esc/Enter closes; passwords omitted)
r Refresh relations and the active relation
Connected databases show their tables and views beneath them in the explorer.
Connected databases have a trailing * and show their tables/views beneath them.
Enter on the connected database collapses/expands it without reconnecting.
Navigation help spans the bottom as one line, wrapping only when needed.
Navigation help has its own bordered pane and wraps when needed.
Full-width bars show dbdash/provider/READ ONLY above and mode/database below.
Focused inputs show one-based line:column (Unicode characters, not screen cells).
The query editor sits above rows/results; the explorer spans both panes.
Explorer and rows/schema bottom borders align; relation/page/column status
appears in the rows/schema border. Read errors appear above the query editor.
In the query editor, type SQL directly; Enter inserts a newline. Arrow keys,
Home/End, Backspace/Delete, Ctrl-U (clear), and multiline pasting are supported.
Query editor starts in NORMAL: i/a/I/A enters INSERT; hjkl/arrows move.
In INSERT, type SQL; Enter inserts a newline. Arrow keys, Home/End,
Backspace/Delete, Ctrl-U (clear), and multiline pasting are supported.
Esc leaves INSERT first; Esc in NORMAL returns to the explorer.
Connection/password fields remain direct-entry; query paste requires INSERT.
SQL syntax colors follow the connected database's PostgreSQL/SQLite dialect,
including quoted identifiers, literals, and multiline comments/strings as you type.
F5 / Ctrl-Enter executes one SELECT/CTE on the current connection, showing up
to 100 rows below. Results report truncation; use SQL LIMIT/OFFSET for more.
Failed queries keep the previous results. Opening a relation restores browsing
without clearing the query text. Query text is not saved across connections.
q / Ctrl-C Quit (q is literal text in the query editor)
q / Ctrl-C Quit outside the query editor (q inserts text only in INSERT)
New database window: Up/Down chooses a provider; Enter starts editing.
Tab/Shift-Tab changes fields; Left/Right changes TLS when that field is focused.
Enter saves without connecting, including when the database is offline.