Skip to content

feat: connecting and schema browser P2s - #864

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

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

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 23, 2026

Copy link
Copy Markdown
Owner

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

Fixes #799, fixes #804, fixes #817, fixes #809, fixes #800, fixes #806, fixes #810.

Connecting

Schema browser

  • Show DDL in an editor, not one truncated grid cell #800, DDL in an editor: Show DDL opens a read-only Monaco tab (ddl tab kind) with Copy, Open in editor and Reload buttons, instead of one truncated grid cell. It works for tables (SQLite included), views, routines and triggers. Events and database statistics still use the old path, because there is no backend command for event DDL.
  • Make the tree filter search events too #806, filter searches events: the tree filter now also searches events, and says "No objects match '…'" when nothing matches.
  • Show the referenced columns, or an error, when FK column load fails #810, foreign-key target columns: when the referenced table's columns fail to load, the designer still shows and selects the key's referenced columns, and shows the error with Retry.
  • Filter preload loop:
    • The filter's preload effect depended on an array that was rebuilt on every render, and each load re-rendered the tree. So the effect restarted on every load, and a folder that failed to load (never cached) was retried forever.
    • Adding events to the preload (Make the tree filter search events too #806) made that likely in real use, because listing events fails without the EVENT privilege. In this PR's own browser test it hung the page.
    • The effect now depends on the database names. A test checks that a failing folder is tried once per database.

Checks

  • tsc --noEmit and dprint are clean.
  • ESLint has 0 errors; there is one warning fewer than on main.
  • Vitest: 156 files, 3131 tests.
  • Browser suite (CHROMIUM_PATH=… npm run test:browser): 10 files, 344 tests.
  • Rust (run by the implementer): cargo fmt, cargo clippy -p mas-core -D warnings and cargo test -p mas-core pass. The live-server tests were not run against MySQL or MariaDB.

Generated by Claude Code

claude added 15 commits October 23, 2026 03:49
Track in-flight connects per profile instead of the shared loading
flag, render a placeholder tab with a spinner and cancel button for
each, and say "Connecting to <name>…" in the status bar.

Fixes #799.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
A failed connect now opens a panel under the tab bar with the whole
message plus Retry and Edit connection. The status-bar chip carries
the message in its tooltip and expands on click instead of
dismissing. The Test Connection result wraps, and caught errors lose
the "Error: " prefix that String(e) added.

Fixes #804.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The sidebar empty state lists saved profiles with a Connect button
each (name, user@host, env badge) plus New Connection, or a "Create
your first connection" prompt on first run. The Connection menu gains
a "Connect to" submenu, the palette gets a "Connect: <name>" entry per
profile and drops Disconnect when nothing is connected, and the tab
bar's "+" now reads "Connect". All of them go through ConnectionTabs'
existing connect flow via a connect-profile event.

Fixes #817.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
Show DDL and View DDL on tables, views, procedures, functions and
triggers now open one "ddl" tab per object, filled from the schema API
(getTableDdl, getViewDdl, getRoutineDdl, getTriggerDdl) and shown in
read-only Monaco with Copy and Open in editor. Events have no DDL
command yet and still run SHOW CREATE EVENT.

Fixes #800.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The preload effect depended on `databases`, rebuilt every render, and each
load it made re-rendered the tree, so it restarted on every load. A folder
that failed to load was never cached and was retried forever. Adding events
to the preload (#806) made that common: listing events fails without the
EVENT privilege. Key the effect on the database names instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The menu bar, the palette and the sidebar can all request a connect.
A request for a profile that is already opening is now ignored, and one
for an open profile selects its connection. The menu disables and the
palette hides profiles that are still connecting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
A cancel was recorded by profile id, so after cancelling a slow connect
and pressing Connect again, whichever attempt finished first consumed
it. If the retry won, it was closed and the cancelled attempt was kept.
Each connect now gets its own token and cancel marks that token. A
cancelled attempt that settles late no longer clears the retry's
placeholder either.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The startup reconnect re-points only tabs that carry a profileId, so a
restored DDL tab kept the previous session's connection id and showed
"Connection not found". Show DDL now records the connection's profile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
to_lowercase can change a non-ASCII string's byte length, so its offsets
do not fit the original. to_ascii_lowercase keeps them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The status bar kept one open flag for the connection error popover, so
after its details were opened once, the next unrelated error appeared
with them already open. The chip is now its own component, keyed on the
message, so each error starts closed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
635ac15 reads connectionStore.connecting in the palette and 773759c passes
profileId when opening a DDL tab; the AppLayout and Sidebar mocks had
neither.

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:

  • 635ac15 (blocking): One profile could be connected twice. The menu, the palette and the sidebar can all send connect-profile, and nothing checked for a connect already running. Now a profile that is connecting is ignored, and an open one is selected instead. Connecting profiles are disabled in the menu and left out of the palette.
  • 3e63b40: Cancels were tracked per profile, so after cancelling and retrying, the retry could be the attempt that got dropped. They are now tracked per attempt.
  • 773759c: DDL tabs now carry their profileId, so the startup reconnect re-points them like query tabs. Before, a restored DDL tab said "Connection not found".
  • d63d0c1: The status bar's error details close when the error changes, so the next error no longer opens with its details already showing.
  • c3cfcf2: describe_server_version sliced the original string at an offset found in the lowercased copy. to_lowercase can change the byte length of non-ASCII text, so the offset could be wrong; it now uses to_ascii_lowercase.
  • b96cc53: DDL and foreign-key column load errors no longer start with "Error: ".
  • e058324: The test mocks now include the new connecting and profileId fields.

Left as is: When Test Connection hits the pool timeout, it now probes again, so it can take up to twice the timeout. Connect already does this, and a clear cause is worth the wait.

Vitest: 157 files, 3142 tests. Browser suite: all 10 files, 344 tests. cargo clippy -p mas-core -D warnings is clean, and the mas-core version test passes.


Generated by Claude Code

@EVWorth
EVWorth merged commit c51958e into main Oct 23, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/hopeful-bardeen-1k4d1h branch October 23, 2026 05:19
@EVWorth EVWorth mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment