polish: row numbers, ping indicator, frozen column, keyboard nav

- ResultsPanel: _RowNumberProxy keeps vertical header numbers sequential
  in visual order (sort-stable); both views get a 48 px wide row-number header
- MainWindow: _PingWorker pings each active connection every 30 s via
  test_connection(); status dot (green/red) shown in status bar with tooltip
- TableViewer: 📌 toggle freezes first column using dual-view overlay
  (_frozen_view child widget) with synced scroll, row heights, and resize
  event-filter; column 0 is hidden in the main view while frozen
- RowDialog: OK set as default button; first field focused on open
- ConnectionDialog: OK set as default; Enter in password field submits

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 17:37:50 -04:00
co-authored by Claude Sonnet 4.6
parent b7e7411c1b
commit 6cff9557b3
5 changed files with 191 additions and 9 deletions
+4 -6
View File
@@ -140,6 +140,10 @@ All four drivers have a `_where(where: dict) → (clause_str, params)` static he
- File open/save/recent: Ctrl+O open SQL file, Ctrl+S save, File → Open Recent (persisted to `~/.dbclient/recent_files.json`, max 10)
- Ctrl+W to close current workspace tab
- Catppuccin Frappé theme: full palette upgrade from Mocha; all colors updated in `resources/style.qss`, syntax highlighter, completer popup, and inline Python stylesheets
- Row numbers column in results grid: `_RowNumberProxy` shows sequential visual-order numbers in the vertical header (sort-stable); fixed 48 px wide header in both `ResultsPanel` and `TableViewer`
- Connection ping indicator: 30-second `_PingWorker` (QThread) pings each active connection via `test_connection()`; status dot (● green / ● red) shown in status bar right side with per-connection tooltip
- Frozen first column in `TableViewer`: 📌 toggle button in toolbar; dual-view overlay (`_frozen_view` child of `_table_view`) with synced vertical scroll and row heights; event-filter updates geometry on resize
- Keyboard navigation in dialogs: OK set as default button (Enter submits) in `RowDialog` and `ConnectionDialog`; focus jumps to first input field on open; Enter in password field submits `ConnectionDialog`
### Not Yet Implemented
**High impact:**
@@ -153,9 +157,3 @@ All four drivers have a `_where(where: dict) → (clause_str, params)` static he
- Global schema search: search across all tables/columns/procedures in a database
- Light theme: Catppuccin Latte or similar, toggle from Preferences
- Schema diff: compare two database schemas and show structural differences
**Small polish:**
- Row numbers column in results grid (virtual, not from DB)
- Connection ping indicator: periodic heartbeat dot in tab / status bar
- Frozen / pinned columns in table viewer (keep PK column always visible while scrolling)
- Keyboard navigation in RowDialog / connection dialogs (Tab order, Enter to confirm)