Skip to content

fix(ui): grid, editor, connection and backup P1s - #856

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

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

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 23, 2026

Copy link
Copy Markdown
Owner

This is the second batch of fixes from the UX review (#783). Each fix is its own commit with a regression test.

Fixes #839, fixes #840, fixes #841, fixes #847, fixes #848, fixes #846, fixes #850, fixes #788, fixes #792, fixes #795, fixes #813, fixes #789, fixes #793, fixes #798, fixes #803, fixes #807, fixes #811. Part of #843.

Results grid (two data-loss bugs in 1.3.0)

Query editor

Connections

Backup, restore and import

Held back

The #842 fix (results per editor tab) was reviewed and has blocking bugs: grid edits carry across tabs, a DDL tab's result lands in the previous tab, and runs without a session are filed under the wrong tab. It will come in its own PR.

Other changes

  • CLAUDE.md now warns parallel agents not to use git stash, because the stash list is shared across worktrees.

Checks

  • tsc --noEmit is clean, and dprint is clean.
  • ESLint reports 0 errors. The warnings are the same as on main.
  • Vitest passes without main.test.tsx, which times out in this container: 154 files, 3066 tests.
  • Not run here: the browser tests and the MySQL integration tests (no backend changes).

Generated by Claude Code

claude added 21 commits October 23, 2026 03:25
Keep the typed text for Port and the timeouts apart from the form, take
the value only once it parses, flag out-of-range values inline, and
disable Save and Test while a field is invalid.

Fixes #813.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
saveProfile now rethrows, as connect does, so the form can stay open
and show the error in the dialog instead of closing and losing what was
typed.

Fixes #792.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Delete Profile now asks first, naming the profile and saying its open
tabs will disconnect. Saved profiles that are not connected get Edit,
Duplicate and Delete on a right-click in the connect popover, and the
Edit dialog footer offers Delete and Duplicate.

Fixes #795.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Run resolved the selected connection while the editor tab's markers came
from the tab's own, so a tab marked production could run on dev. Run now
uses the tab's live connection, switching editor tabs selects its
connection, clicking a connection tab moves to (or opens) one of its
editor tabs, and connecting a new server opens a tab for it instead of
re-pointing the open one.

Fixes #788.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Run, Explain and Explain Analyze now read the SQL through one helper,
sqlAtCursor, which Ctrl+Enter already used: the selection if there is
one, otherwise the statement under the cursor. Explain no longer sends
a two-statement buffer that the backend rejects.

Fixes #846.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Cancelling a query now records how long it ran (cancelledAfterMs)
instead of putting "Query cancelled by user" into the error slot, and
clears the previous query's results so the status bar no longer shows
its row count. The results pane says "Cancelled after 1.2 s" in neutral
styling, the executing placeholder shows an elapsed-time counter, and
the Run/Cancel button has a fixed width so the toolbar does not shift.

Fixes #850.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Close, middle-click, Delete, Ctrl+W, Close Others and Close to the
Right now go through editorStore.requestClose, which asks before
discarding a query tab whose SQL was typed or edited. Empty and
untouched tabs still close at once.

The open-transaction indicator and the close warning for an open
transaction need execute_query to report the session's transaction
state, which the backend does not do yet; that part is left for a
backend change.

Part of #843 (the transaction part is still open).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The restore passed an empty statement list to the production guard,
which waves through anything without a destructive statement, so the
prompt never appeared. Ask regardless.

Fixes #789.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
A cancelled or partly applied restore was shown in green with a check
mark. Keep green for a clean full run only, word the heading by whether
Stop on error was on, and key the error list by index so repeated
errors do not collide.

Fixes #793.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Starting a backup, restore or import unmounted or disabled the focused
button, dropping focus to the page body where Escape did nothing and
Tab walked the page behind. Move focus to Cancel (or the import's
progress region) when a run starts, and have Modal answer Escape and
Tab on the document when focus has fallen out of the topmost dialog.

Fixes #798.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Closing Backup or Restore during a run hid the dialog and left the run
going invisibly. While a run is active, the header X, Escape and the
backdrop now ask "Cancel the backup/restore?" and cancel it on yes; the
backdrop is ignored. Restore's footer Close is disabled mid-run, Import
routes Escape and backdrop through its guarded handleClose, and both X
buttons get an accessible name.

Fixes #803.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The whole Backup and Restore panel scrolled, so the progress box pushed
the footer and its Cancel button out of view on short windows. Make the
panel a flex column with a scrolling body and fixed header and footer,
as ImportDialog already does.

Fixes #807.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
A cancelled backup dropped back to the plain form without a word; it
now says the backup was cancelled and the partial file removed. The bar
divided the 1-based current table by the total, so a one-table backup
read 100% at once; it now counts finished tables whole and the current
one by rows against the server's estimate. A "Starting…" status shows
until the first progress event, and the unreachable button spinner is
gone.

Fixes #811.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The row handlers passed the row's position on screen, but the context
menu, delete, Set NULL, copy and the row highlight look rows up by their
index in the result. Pass row.index instead, and extend Shift ranges
over the on-screen order.

Fixes #839.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Grid saves resolved the target table from the editor's current text and
the connection from the editor tab, so edits made after the editor moved
on were written to another table or connection. Use the result's own
statement and the connection, database and session it was read on, and
refresh with that statement.

Fixes #840.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The column definitions captured the editing state in inline cell
renderers, so they were rebuilt on every render and flexRender treated
each as a new component type. Every cell remounted after the first
click of a double-click, so dblclick never fired. Render all cells
through one stable GridCell component that reads the editing state from
context.

Fixes #841.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Virtual rows were positioned from the top of the container, whose first
child is the one-row sticky header, so row 1 sat underneath it. Offset
every virtual row by the header height.

Fixes #847.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The input stored only values in 1-100,000 on every keystroke, so it
could not be emptied and new digits were appended to the old value.
Edit a local draft instead and store it on blur or Enter, clamping out
of range numbers, reverting anything else, reverting on Escape, and
showing the allowed range while the draft is invalid.

Fixes #848.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Cancelling with no query in flight wiped the results on screen and showed
"Cancelled after 0.0 s". Also retitle the Run button now that it runs the
statement at the cursor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
main.tsx imports Monaco by deep paths the test did not mock, so it loaded
the whole editor into jsdom. That took most of the 10 s hook timeout and
failed on slow runners (always in the cloud container, and now in CI).
Mocked, the file runs in about a second.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g

EVWorth commented Oct 23, 2026

Copy link
Copy Markdown
Owner Author

Test Frontend failed on 6fcfedd. All 3066 tests passed; the only failure was src/__tests__/main.test.tsx, where the beforeAll hook timed out after 10000 ms.

This isn't caused by this PR's changes, because main.tsx imports App, which the test mocks. The cause is older. main.tsx imports Monaco by deep paths (editor.all.js, editor.api.js and the two SQL language contributions), but the test only mocked the monaco-editor barrel. Each run therefore loaded the whole editor into jsdom, which takes close to the 10 s hook limit. That's why the file always timed out in the cloud container, and this time it ran over in CI as well.

9670a7d mocks those deep paths. The file now runs in about a second, including in the container. I also removed the CLAUDE.md note that said it times out there.


Generated by Claude Code

Opening a SQLite file only changed the selected connection. Since Run
follows the editor tab's own live connection (#788), it kept going to the
tab's MySQL server while the toolbar showed the file. Opening a file now
goes through the same attach path as a new connection.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
rowsExported is the total over every table so far, so from the second
table on the bar treated the current table as full and the time left went
blank. The dialog now notes where each table's rows began.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
- LIMIT box: 2.5 and 1e3 revert instead of truncating to 2 and 1.
- Delete Profile: stop if its connection failed to close.
- Restore: reset only when the dialog opens, so a selection change mid-run
  no longer hides Cancel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g

EVWorth commented Oct 23, 2026

Copy link
Copy Markdown
Owner Author

Fixes from a review of this PR:

  • c1cd372 (blocking): Opening a SQLite file only changed the selected connection. Since Make the editor tab and Run agree on which server a query goes to #788, Run goes to the editor tab's own live connection. So after opening a file, statements still went to the tab's MySQL server while the toolbar showed the file. Opening a file now uses the same attach path as a new connection.
  • 0994134: The backup bar divided rowsExported, which is the running total over every table, by the current table's estimate. From the second table on, the bar jumped ahead and the time left went blank. The dialog now records where each table's rows begin.
  • a26ebdd:
    • The LIMIT box reverts 2.5 and 1e3 instead of truncating them to 2 and 1.
    • Delete Profile stops if its connection fails to close.
    • The Restore dialog resets only when it opens. Before, a change of selected connection during a run (which Make the editor tab and Run agree on which server a query goes to #788 makes happen when switching editor tabs) hid Cancel while the restore was still going.

The virtualized grid's context menu always using column 0, and Tab following result order in a sorted grid, are older bugs. They're tracked in #858.

The full suite passes, now including main.test.tsx: 155 files, 3075 tests.


Generated by Claude Code

Explain now reads the statement at the cursor (#846) and Run follows the
tab's live connection (#788). The fake editor had no getPosition and the
connection store mock no activeConnections, so the browser test threw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The cloud container's Chromium is not the build Playwright expects, so
the browser suite could not run there and its failures only showed in CI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
@EVWorth
EVWorth merged commit 93e2d31 into main Oct 23, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/hopeful-bardeen-1k4d1h branch October 23, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment