Skip to content

fix(ui): stop non-default themes crashing the app - #782

Merged
EVWorth merged 1 commit into
mainfrom
claude/hopeful-bardeen-1k4d1h
Oct 21, 2026
Merged

EVWorth merged 1 commit into
mainfrom
claude/hopeful-bardeen-1k4d1h

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Fixes #781.

Choosing Nord, Solarized Light, High Contrast or an imported theme crashed the whole window, and because the choice is saved, it crashed again on every launch after that.

The cause was in FeatureButtons: it looked up the theme's icon and label in a map holding only the three ids the title-bar button cycles through (dark, light, system). Every other theme id got undefined, and React threw when rendering it.

Change

  • Icon: falls back to the theme's base, so light themes get Sun and everything else gets Moon.
  • Label: falls back to the theme's own name, from the built-in themes or the user's custom themes, then to its id. The tooltip and the screen-reader announcement now say "Solarized Light theme" rather than "undefined theme".
  • Tests: the button renders with every non-cycling built-in theme and with an imported id, and a built-in theme is announced by name. The existing tests mocked the store with only dark/light/system, which is how this was missed.

How it was found

In the UX review running on the mock backend from #780: View → Appearance → Nord.

Checks

  • tsc --noEmit is clean and dprint is clean.
  • The FeatureButtons tests pass (18).

This affects 1.3.0, so it's worth a 1.3.1 patch release.


Generated by Claude Code

FeatureButtons looked the theme's icon and label up in a map of the
three ids the title-bar button cycles through. Any other theme (Nord,
Solarized Light, High Contrast, an imported one) got `undefined`, and
rendering it took the whole window down on every launch, since the
choice is saved. The icon now falls back to the theme's base, and the
label to the theme's name.

Fixes #781.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
@EVWorth
EVWorth merged commit 0f2e969 into main Oct 21, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/hopeful-bardeen-1k4d1h branch October 21, 2026 23:47
@EVWorth EVWorth mentioned this pull request Oct 23, 2026
EVWorth pushed a commit that referenced this pull request Oct 24, 2026
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
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]>
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.

Choosing Nord, Solarized Light or High Contrast crashes the app on every launch

2 participants