Repository navigation
feat(schema): the details and menu operations FR-4.2 and FR-4.3 ask for (#292, #293) - #642
Merged
Merged
Conversation
EVWorth
force-pushed
the
feat/schema-events-and-drag
branch
from
September 11, 2026 22:29
b0f2737 to
89ee608
Compare
EVWorth
force-pushed
the
feat/schema-details-and-menus
branch
from
September 11, 2026 22:29
c16b15a to
38b7fdf
Compare
EVWorth
force-pushed
the
feat/schema-events-and-drag
branch
from
September 11, 2026 22:33
89ee608 to
32e930a
Compare
Three of FR-4.2.1's eight categories were in the details panel — Columns, Indexes, DDL — and the rest had nowhere to appear, including the foreign keys the backend could already answer for (#292). Most of FR-4.3's menu operations did not exist at all (#293). The panel gains Overview, Foreign Keys, Triggers and Partitions. Overview leads, because "how big is this and what is it" is the question someone opening a table has before any of the details, and it says the row count is approximate — InnoDB samples it from the index, and presenting it as exact invites someone to trust it for a count. Foreign keys show the rules rather than only the columns: whether deleting a parent row takes its children with it is not visible anywhere else in the app. Triggers are filtered to this table, since the server has no per-table trigger query to ask instead. A tab with nothing in it still appears — "this table has no foreign keys" is an answer, and a panel whose tabs change per table is one you cannot learn. The menus gain an INSERT template, rename, duplicate structure, truncate, and — on a database — create, drop, set as default, and statistics. Some of the detail: - The Select item is named for the limit it uses. It said "Select Top 100 Rows" while using `maxResultRows`, which defaults to 1000: wrong out of the box, and wrong again for anyone who changed it. - The INSERT template opens in a tab rather than running. Every value is NULL; that is a starting point, not a statement anyone means to execute. It leaves out generated columns, which the server rejects an assignment to, and annotates each placeholder with its type. - Duplicate uses `CREATE TABLE ... LIKE`, not `AS SELECT`, which silently drops indexes and column attributes. - Statistics reads information_schema rather than counting rows. Counting every row of every table to fill a menu item is not a thing to do to a production server. - Dropping a database asks for the name to be typed. A misplaced click should not be able to take every table in one. A bug found while wiring it: the existing menus called `resultStore.executeQuery(...).then(refresh)`. That returns as soon as it opens the production confirmation — so the refresh ran against unchanged data, and when the user did confirm, nothing refreshed at all. Schema changes now go through `confirmDestructive` and `runStatement`, which can be awaited, and the cache is invalidated only once the statement has actually run. Also fixed: the DDL pane was pinned to `vs-dark`, so it stayed dark in a light window. Co-Authored-By: Claude Opus 5 <[email protected]>
EVWorth
force-pushed
the
feat/schema-details-and-menus
branch
from
September 11, 2026 22:38
38b7fdf to
a8e0a4f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #641.
Three of FR-4.2.1's eight categories were in the details panel — Columns, Indexes, DDL — and the rest had nowhere to appear, including the foreign keys the backend could already answer for. Most of FR-4.3's menu operations didn't exist at all.
Details panel
Gains Overview, Foreign Keys, Triggers, Partitions. Overview leads, because "how big is this and what is it" is the question someone opening a table has before any of the details — and it says the row count is approximate, because InnoDB samples it from the index and presenting it as exact invites someone to trust it for a count.
Foreign keys show the rules, not just the columns: whether deleting a parent row takes its children with it isn't visible anywhere else in the app. Triggers are filtered to this table, since the server has no per-table trigger query. A tab with nothing in it still appears — "this table has no foreign keys" is an answer, and a panel whose tabs change per table is one you can't learn.
Menus
INSERT template, rename, duplicate structure, truncate; and on a database: create, drop, set as default, statistics.
maxResultRows, which defaults to 1000 — wrong out of the box, wrong again for anyone who changed it.VIRTUAL GENERATED/STORED GENERATEDvsDEFAULT_GENERATEDverified on a live server — the last is a default expression, and that column is assignable.)CREATE TABLE ... LIKE, notAS SELECT, which silently drops indexes and column attributes.information_schemarather than counting rows. Counting every row of every table to fill a menu item is not a thing to do to a production server.A bug found while wiring it
The existing menus called
resultStore.executeQuery(...).then(refresh). That returns as soon as it opens the production confirmation — so the refresh ran against unchanged data, and when the user did confirm, nothing refreshed at all. Schema changes now go throughconfirmDestructiveandrunStatement, which can be awaited, and the cache is invalidated only once the statement has actually run.Also fixed: the DDL pane was pinned to
vs-dark, so it stayed dark in a light window.Verification
2604 unit + 341 browser tests. 27 new statement-builder tests, 19 on the menus (including that a declined confirmation runs nothing, and that the refresh waits for the answer), 9 on the new detail tabs.
Closes #292
Closes #293
🤖 Generated with Claude Code