Skip to content

feat: UX review fixes for schema tree and designer - #888

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

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

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 24, 2026

Copy link
Copy Markdown
Owner

The schema tree, table designer, favorites and SQLite part of the October UX review (#783). An implementer-frontend subagent wrote one commit per issue. I added one more fix on top for a data-safety gap it found.

Changes

  • Character Set field snaps back to utf8mb4 while typing #859: the connection form's Character Set field keeps what you type. utf8mb4 is its placeholder, and an empty field saves as utf8mb4.
  • Treat SQLite views as views #825: SQLite views appear under Views and show their DDL. No backend change was needed.
    • The mock gains a view.
    • The mock no longer parses `main`.`notes` as a table called main, which used to make every SQLite table fail to open in ?mock.
  • Add a way to create a new table in the designer #818: "New Table…" is in the database and Tables menus, the Database menu and the command palette. It is hidden for SQLite.
  • Make the tree and its context menus keyboard-navigable #823: the schema tree works from the keyboard. It has a single tab stop that moves with the focused row; arrows, Home and End move between rows, Right opens and Left goes to the parent. Every row is a treeitem with aria-level.
    • ContextMenu, shared app-wide, becomes a proper role="menu": focus starts on the first item, arrow keys move between items, Escape and Tab close it, and focus returns to what opened it.
    • A menu opened from the keyboard (Shift+F10 or the menu key) appears under the focused element.
  • Add UNSIGNED, and other loaded modifiers, to the designer's column grid #814: the designer's column grid gains Unsigned, a PK toggle that edits the PRIMARY KEY index, and a details row for Zerofill, Charset, Collation and ON UPDATE.
    • The DDL generator emits each of these only for types that accept it.
    • A loaded type that isn't in the dropdown is kept rather than replaced.
  • Polish: schema browser and designer P3s from the UX review #829, all six items:
    • Clicking a table opens, or reuses, a query tab named after it, instead of overwriting the current tab.
    • The view menu uses the same "Select Top N Rows" label as tables.
    • Dropping a view or routine, and enabling or disabling an event, now wait for the statement before refreshing, and ask first.
    • The default-database marker falls back to the connection's database.
    • Composite index columns show their order and can be reordered.
    • Deleting a favorite asks first.
  • Ask before dropping or emptying a table (added in review). confirmDestructive asks only on production, so on any other connection Drop Table and Truncate Table ran on a single click. Views and routines already asked after Polish: schema browser and designer P3s from the UX review #829. These now use the same app dialog off production; on production, its own gate still asks once.

Closes #814. Closes #818. Closes #823. Closes #825. Closes #829. Closes #859.

Test plan

  • npm run test:unit on the merged branch: 165 files and 3,354 tests passed before the table-confirm commit; the schema, store and component suites pass after it.
  • New tests cover each issue. All of them fail with their fix reverse-applied, except "deletes once confirmed", which passes either way and only guards that the confirm still leads to a delete. The two table-confirm tests are among those that fail without the fix.
  • Browser tests, run one file at a time: Sidebar.browser.test.tsx 55/55 and ResultsGrid.browser.test.tsx 120/120.
  • npm run type-check and dprint are clean, and lint has no new warnings.
  • Not yet checked by eye in ?mock: the designer's details row and PK toggle, and the composite-index order list.

Generated by Claude Code

claude added 10 commits October 24, 2026 13:36
Clearing the Character Set field filled utf8mb4 straight back in. The
field now keeps what is typed and an empty one saves as utf8mb4.

Closes #859.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
SQLite reports sqlite_master.type in lower case, and the tree tells a
view from a table by table_type === "VIEW", so views were listed and
counted as tables and the Views folder was always empty. The SQLite data
source now maps "view" to VIEW and "table" to BASE TABLE, lists the
views, and reads a view's DDL from the listing, since
sqlite_get_table_ddl only reads tables.

The mock SQLite file gains a view, and its statement parser now reads
the tree's `main`.`notes` as notes rather than as a table named main.

Closes #825.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The designer's create mode could not be reached: every route into it
passed a table name. "New Table…" now sits in the database menu, the
Tables folder menu, the Database menu and the command palette. The menu
and palette use the active tab's database, or the connection's default,
and say why when there is none. It is not offered for SQLite.

Closes #818.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Four of the schema-tree polish items:

- A table or view click, and Select Top N Rows, open the rows in a
  query tab titled db.table holding the SELECT, reused on repeat,
  instead of replacing the current tab's results with an unnamed grid.
- The view menu says "Select Top 1,000 Rows", the limit it uses.
- Drop view, procedure, function, trigger and event, and enabling or
  disabling an event, run through runSchemaChange, so the refresh waits
  for the statement (and for the production confirmation).
- The tree marks the connection's default database when the active tab
  names none, as the status bar does.

Part of #829.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The tree answered only Left and Right, every row was a tab stop, leaf
rows were plain buttons, and a context menu opened from the keyboard
could not be used without a mouse.

- The tree is a WAI-ARIA tree with a roving tabindex: one tab stop, Up,
  Down, Home and End over the visible rows, Right into an open node and
  Left to the parent. Every row, leaves included, is a treeitem with an
  aria-level, and the filter input is no longer inside the tree.
- ContextMenu is a menu of menuitems: it focuses the first enabled item,
  moves with Up, Down, Home and End, closes on Tab or Escape, and gives
  focus back to what opened it unless the action moved it on.
- A menu opened from the keyboard with no pointer position is placed
  under the element instead of the window's corner.

Closes #823.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The designer loaded UNSIGNED, ZEROFILL, charset, collation and ON UPDATE
but showed none of them: an int unsigned column read as plain INT while
the preview said INT UNSIGNED, and a new column could not be made
unsigned. The Columns tab, now its own file, gains an Unsigned column, a
PK column that edits the PRIMARY KEY index, and a details row per column
for zerofill, charset, collation and ON UPDATE. The row highlight uses
the generator's own change check, which now treats an unset modifier
and an absent one as the same, and the generator emits each modifier
only on types that take it.

Closes #814.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The designer's index column chips are in table order with no position,
so (status, placed_at) looked the same as (placed_at, status), though
the key follows click order. Selected chips now carry their position,
and a composite index lists its columns in key order with buttons to
move each one up or down.

Part of #829.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Delete on a favorite's menu removed it at once, with no dialog and no
undo, while deleting a category asks. It now asks in the same
ConfirmDialog.

Part of #829.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
confirmDestructive asks only on production, so Drop Table and Truncate
Table ran on one click everywhere else. They now ask in the app's own
dialog off production, like dropping a view or routine.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
@EVWorth
EVWorth merged commit 9f13605 into main Oct 24, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/hopeful-bardeen-1k4d1h branch October 24, 2026 18:10
EVWorth pushed a commit that referenced this pull request Oct 24, 2026
With #888's keyboard ContextMenu merged, Shift+F10 on a connection tab
opens its menu with focus on the first item, and Escape returns focus
to the tab.

Part of #827.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
EVWorth added a commit that referenced this pull request Oct 24, 2026
* fix: grey out actions that need a connection

Admin Tools, Import, Backup, Restore, Disconnect and Refresh Schema
Cache looked enabled with nothing connected and then silently did
nothing. Actions can now say when they are enabled; the menu bar greys
them with aria-disabled and the palette lists them last, unselectable,
with "Connect first".

Closes #821.

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

* fix: keyboard access for menus and connection tabs

The menu bar follows the WAI-ARIA menubar pattern: one Tab stop,
arrows between titles and items, Escape back to the title, hover
switches menus while one is open. The Connect menu takes focus on open,
arrows through its rows, closes on Escape back to the button, and the
new connection's tab gets focus after connecting. Connection tabs are
real tabs with a roving tabindex, Enter to select, Delete to disconnect
and Shift+F10 or the Menu key for their menu.

The popover and a single tab move into ConnectPopover and
ConnectionTab, and the startup reconnect into useStartupReconnect, to
keep ConnectionTabs readable.

Closes #827.

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

* feat: show the environment on tabs and toolbar

Connection tabs and connect-menu rows show the PROD/STG/DEV badge, and
menu rows mark read-only profiles. A tab's tooltip names the whole
profile and its user@host:port, since the label truncates. The query
toolbar shows the badge beside the connection name and is tinted, with
a red top edge, while a production server is selected. The badge is one
shared component, also used by the status bar.

Closes #835.

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

* fix: offer a reconnect after editing a live profile

Saving a connected profile closed the dialog with nothing said, while
the session kept using the old host, user or password. When a field
that only applies to a new connection changes, the tab is now marked,
a prompt offers "Reconnect now" or "Later", and the tab menu keeps a
"Reconnect to Apply Changes" entry. Reconnecting moves the editor tabs
to the new connection. The status bar and query toolbar take the name
from the profile, and the host from the live session.

Closes #831.

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

* feat: Save & Connect in the connection dialog

A new or duplicated profile now has "Save & Connect" as the primary
button, which saves, connects and selects the new tab; "Save" stays as
the secondary. The fields sit in a form, so Enter submits, and the
dialog opens with focus in the Name field.

Closes #832.

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

* feat: custom connection colours and visible selection

The Color row gains a Custom swatch backed by a native colour input,
which shows a saved colour outside the presets as selected and lets
any colour be picked. Presets compare case-insensitively, have names
and aria-pressed, and the selected swatch gets a ring with a gap that
reads on any theme.

Closes #834.

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

* fix: dialog height, required fields, server vendor

- The connection dialog is anchored to the top with a fixed-height
  body, so switching tabs no longer makes it jump. Name and Host are
  marked required, and the footer says which is missing while Save is
  disabled.
- The status bar names a MariaDB server "MariaDB 10.11.6" instead of
  "MySQL 10.11.6-MariaDB...".
- The status-bar connection button has the `group` class its copy icon
  needs to appear on hover or focus.

Part of #838.

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

* fix: stop the query toolbar overlapping when narrow

Buttons no longer shrink or wrap. Measured on the toolbar itself with
a container query, the shortcut hint goes first, then the button
labels (each button keeps an aria-label and title), and the connection
name truncates with its host shown only when there is room.

Part of #838.

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

* fix: give the editor the selected theme's colours

Monaco used vs-dark or vs by the theme's base alone, so Nord, Solarized
and custom themes left the editor in the wrong colours. The theme store
now exposes the resolved theme, and the editor registers a Monaco theme
built from its tokens (background, text, line highlight, selection,
gutter, widgets) on top of the matching base.

The title-bar theme button item of #838 was already fixed by #782: the
label names any theme ("Theme: Nord — click for Dark"), covered by the
existing FeatureButtons tests.

Closes #838.

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

* feat: editor font size, interface scale and zoom

View > Appearance gains "Editor font size" (10-28, default 14 per the
design spec, was a hard-coded 13) and "Interface scale" (80-150%),
stored with the other query settings and repaired if unreadable. The
scale is applied as CSS zoom on the root and published as --ui-scale;
at 100% nothing is set. Ctrl+=, Ctrl+- and Ctrl+0 step and reset it,
and View has Zoom In, Zoom Out and Reset Zoom for the menu and palette.
Status bar text, and the environment badge, are raised to 12px.

Closes #837.

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

* test: native menu connect items reach connect flow

The macOS "Connect to" submenu needs a change in menu.rs. On the
frontend, a native "menu-action" with id "connect:<profile id>"
already reaches the same connect flow as the in-app menu; this pins
that down so the Rust side can rely on it.

Part of #863.

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

* test: connection tab menu works with the keyed menu

With #888's keyboard ContextMenu merged, Shift+F10 on a connection tab
opens its menu with focus on the first item, and Escape returns focus
to the tab.

Part of #827.

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

---------

Co-authored-by: Claude <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants