Skip to content

fix: grid cell keys, tx switch prompt, CSV import - #922

Merged
EVWorth merged 6 commits into
mainfrom
claude/hopeful-bardeen-1k4d1h
Oct 30, 2026
Merged

EVWorth merged 6 commits into
mainfrom
claude/hopeful-bardeen-1k4d1h

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 30, 2026

Copy link
Copy Markdown
Owner

The remaining frontend items from the UX review, done by the implementer-frontend lane.

Closes #921, #852, #843, #845.

Changes

  • fix: CSV import can target the previous database #921: CSV import, grants and SQLite reads.

    • CSV import uses the database that is currently selected (database was missing from the callback's deps).
    • All SHOW GRANTS reads go through one path and are recorded as internal history entries.
    • Table structure and designer reads go through dataSourceFor, so SQLite connections reach the sqlite* commands. SQLite reports no foreign keys or partitions for now.
    • In the mock, a disconnect now sticks.
  • Give the grid a keyboard path for sorting, selection and copy #852: moving between cells with the keyboard. The results grid gets a focused cell.

    • Arrow keys, Home/End and Ctrl+Home/End move it. Enter or F2 edits the cell in Edit Mode, and Escape clears the selection first, then the focused cell.
    • Ctrl+C copies the focused cell when no row is selected; with rows selected it still copies them as TSV.
    • The focused cell is scrolled into view, including while rows are virtualized.
    • Behaviour change: End now moves to the end of the row. Ctrl+End goes to the last row.
  • Show an open transaction, and warn before closing a tab that has one #843: pointing a tab at another connection. If the tab has a transaction open, the app now asks first ("Roll back and switch" / Cancel), as it already does when closing the tab. This covers:

    • choosing a database in the schema tree;
    • attaching a tab to a connection;
    • reconnecting with new settings.

    Where the backend reports the transaction state (transaction), that is used, including after a failure. Guessing from the statements that ran is the fallback.

  • Say which statement failed in a script, and keep the earlier results #845: everything was already in place. This adds an end-to-end test that runs a failing script through the mock, the bindings and the result store, plus a check in the browser preview.

Tests

  • Each new test was confirmed to fail with its fix reverse-applied.
  • npm run test:unit: 198 files, 3726 tests pass.
  • Browser tests, run one file at a time, all pass:
    • ResultsGrid.keyboard (new) and ResultsGrid;
    • ImportDialog and Sidebar;
    • AppLayout, MainPanel and TitleBar.
  • npm run lint: 0 errors and no new warnings. npm run type-check and npx dprint check are clean.

Generated by Claude Code

- ImportDialog: the CSV import callback now depends on `database`, so an
  import after the target database changes goes to the new one.
- SHOW GRANTS: the account view and the privileges editor both read
  through adminStore.showGrants, which records the read as internal.
- tableDetailsStore: every table read goes through dataSourceFor, so a
  SQLite connection uses the SQLite commands. The data source gains
  getForeignKeys and getPartitions (empty for SQLite).
- Mock: list_connections no longer reopens Local dev after it was
  disconnected in the connected and lost scenarios.

Closes #921

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The grid gets a focused cell. Up, Down, Page Up and Page Down move the
row selection as before (Shift extends it) and take the cell along;
Left, Right, Home and End move within the row; Ctrl+Home and Ctrl+End
go to the corners. Enter or F2 edits the focused cell in Edit Mode, and
focus returns to the grid when the edit ends. Escape clears the row
selection, then the focused cell. Ctrl+C copies the focused cell when no
row is selected.

The focused cell is scrolled into view below the sticky header, also in
the virtualized layout, where the row may not be rendered yet.

Home and End from an empty selection now go to the first and last row;
End used to start at the top.

Closes #852

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Pointing a tab at another connection ends its server session, which
rolls back an open transaction. The schema tree, the connection bar and
a reconnect now ask first ("Roll back and switch" / Cancel), as closing
the tab does. editorStore gains requestTabConnection and confirmRollback;
another database on the same connection keeps the session and does not
ask.

The transaction state the backend reports on a run's results is now
read from the typed field, also from the results kept before a failed
statement. Reading the statements stays as the fallback for when the
backend has no answer (MySQL, a failed run).

Closes #843

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Runs a three-statement script whose second statement fails through the
mock backend, the real bindings, CommandError and the result store, and
checks that the first statement's rows stay with the error and that the
error names statement 2 of 3 (1146). Checked in the browser preview as
well: the error box, the kept grid and the editor marker all show.

Closes #845

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The admin store now reads grants through runStatement, which imports
CommandError from lib/tauri-api. The browser test's module mock only
provided `api`, so the file failed to import in Chromium. Spread the
real module into the mock and override `api` alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Two TableDesigner tests waited for the table-name input, which comes from
a prop and renders at once, then reached for column rows that only exist
once getColumns resolves. Under CI load the rows were not there yet
("Unable to find a label with the text of: Remove column name"). Wait
for the column-dependent element itself.

Closes #923

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: CSV import can target the previous database

2 participants