Skip to content

fix(ux): editor, grid and results review fixes - #908

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

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

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 29, 2026

Copy link
Copy Markdown
Owner

The editor, grid and results area of the UX review (#783). Done by the implementer-frontend lane. The diff changes no backend code.

Closes #857, #858, #865, #855, #861, #860, #844, #849, #851, #853, #867.
Partial, left open: #845, #852, #843, and the EditableCell item of #784.

Changes

Tests

  • Each new test was checked to fail with the fix reverse-applied.
  • npm run test:unit: 179 files, 3569 tests pass.
  • Browser tests, run one file at a time: ResultsGrid, CellViewerModal, SQLEditor, ExplainPanel (new) and MainPanel all pass.
  • npm run lint shows 0 errors (none of the warnings are new). npm run type-check and npx dprint check are clean.

Generated by Claude Code

claude added 18 commits October 24, 2026 13:39
The row-key lookup, the row count and the column layout read the active
editor tab's connection and database. After the tab was pointed
elsewhere, the key came from another server's table of the same name and
the UPDATE/DELETE WHERE could name the wrong columns. They now use the
result's resultSource, and Edit Mode is refused when it is unknown.

Closes #857.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
In a sorted grid, Tab moved the edit to the next row in result order,
copying selected rows wrote them in result order, and the virtualized
layout's context menu always acted on column 0 because it looked for a
td. Tab and copy now go through the row model's on-screen order, and
each cell carries data-col for the context menu to read.

Closes #858.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
A re-run in the same tab already dropped the grid's pending edits and
said so afterwards. It now asks first: the grid reports its unsaved count
per tab, and executeQuery confirms before replacing results that have
edits pending. A save clears the count before its refresh, so it does
not ask.

Closes #865.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
A query tab's isDirty was set on the first edit and never cleared, so the
unsaved marker, the update guard, the favorites check and the close
confirmation treated it as unsaved for good. Tabs now keep the content
last saved (a favorite, or the restored session) and are dirty only while
their text differs from it, so undoing back to it counts as clean.

Closes #855.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The editor writes its text to the store after a 150 ms debounce, so
Ctrl+W right after typing in a fresh tab read empty content and closed
the tab without asking. The editor now registers its flush with the
editor store, and requestClose runs it before checking the tabs.

Closes #861.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Cancelling a query already cleared the previous results (#850), but
cancelling an Explain left the previous plan on screen, where it read
as the plan of the statement just cancelled. Runs now note whether they
are an Explain, and cancelling one clears the plan too.

Closes #860.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The store keeps its run generations, active executions and start order
at module level, which useResultStore.setState in a beforeEach does not
reset. A test stopped with a query in flight left it running for every
later test. resetRunBookkeeping() clears it, and the tests that drive
the real store call it before each test.

Closes #867.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The result tabs were drawn only above a grid, so when the active result
was a statement that returned only a count, the strip vanished and the
script's other results could not be reached. The strip now sits above
both the grid and the placeholder, each tab is labelled with its
statement's verb and table and its row or affected count, and a run
opens on the first result that has a grid.

Closes #844.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
# Conflicts:
#	src/components/schema/__tests__/SchemaTree.test.tsx
The error box read only "Query Error" and the message, and the
statementIndex the backend reports was dropped by CommandError. It now
carries the index, the store records the failing statement, the box says
"Statement 2 of 3 failed (1146)" with the statement's text, and the
editor marks that statement with an error marker. The error drops the
doubled "Error: " prefix.

When the error carries the results of the statements before the failing
one (completedResults), they are kept and shown under the error. The
backend does not send them yet, so that part waits on it.

Part of #845.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The badges were white text on translucent status tints, which are pale
in the light theme, so ALL, eq_ref, range and the rest were barely
legible. Each badge is now its status colour mixed toward the theme's
text colour on a light wash of the status colour, which clears 4.5:1 in
every built-in theme. The legend and its toolbar wrap instead of running
off the panel at 1024px.

Closes #849.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The viewer built its own fixed overlay, with no dialog role or
aria-modal, focus left on the body, Tab walking the page behind and no
Escape. It now renders through the shared Modal, which provides all of
those, and moves focus to Copy when it opens. The X button is labelled.

Closes #851.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Column headers are focusable and sort on Enter or Space, with Shift
adding a sort key. The grid takes focus; the arrow keys, Page Up/Down,
Home and End move the row selection in on-screen order, Shift extends
it, and Ctrl+C copies the selected rows as TSV instead of the browser's
one-value-per-line text. Rows no longer allow text selection, so
Shift+click selects rows only.

Arrow-key movement between cells is not part of this.

Part of #852.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The boolean cell's NULL toggle was a Tab stop but stayed at opacity 0
when focused, so keyboard users landed on a control they could not see.
It now shows on focus-visible and has an accessible name.

Part of #784.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
- The row-limit banner points to the toolbar's LIMIT box and pages
  rather than Settings, and its "Change LIMIT" button focuses that box.
- Explain errors drop the doubled "Error: " prefix (query errors did in
  the #845 change).
- The Explain menu button is named, reports aria-expanded, and the menu
  closes on Escape.
- New query tabs are titled Untitled-N, reusing the lowest free number.
- The unsaved-changes dot has a tooltip and screen-reader text.
- The LIMIT toggle exposes aria-pressed.
- Running from the toolbar or the editor closes the suggestion list.

Closes #853.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Nothing said that a tab's session was inside a transaction, and closing
the tab rolled it back without a word. Each tab's transaction state is
now tracked: from a grid save's reported state, from a `transaction`
field on the result once execute_query reports one, and until then from
the statements run (BEGIN, START TRANSACTION, COMMIT, ROLLBACK,
autocommit, implicit commits). The tab shows a TX badge, the toolbar
shows "Transaction open" with Commit and Rollback, and closing such a
tab asks first, saying the transaction will be rolled back.

Asking before a tab is pointed at another connection, and the backend
reporting transaction state from execute_query, are still to do.

Part of #843.

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.

Grid looks up row keys on the editor tab's connection, not the result's

2 participants