Repository navigation
Closed
Labels
Description
Status: filed
Drives: docs/audits/designer.md
Findings
Critical (P0/P1)
- F1 [P0] [bug] extractBaseType/extractLength discard column modifiers — UNSIGNED, ZEROFILL, CHARACTER SET, COLLATE, ON UPDATE CURRENT_TIMESTAMP lost on round-trip — [P0][bug] extractBaseType/extractLength discard column modifiers — UNSIGNED, ZEROFILL, CHARACTER SET, COLLATE, ON UPDATE CURRENT_TIMESTAMP lost on round-trip #377
- F2 [P0] [bug] originalConfig.options is always defaultOptions — every Apply Changes emits a spurious ALTER TABLE … ENGINE=… DEFAULT CHARSET=… and silently clears table comment — [P0][bug] originalConfig.options is always defaultOptions — every Apply Changes emits a spurious ALTER TABLE ENGINE/CHARSET/COLLATE and silently clears table comment #378
- F3 [P0] [bug] handleSave runs multi-statement ALTER as a single executeQuery call — partial apply on failure, no transaction, no read-only check, no production-safety confirm — [P0][bug] handleSave runs multi-statement ALTER as a single executeQuery call — partial apply, no transaction, no read-only, no production-safety confirm #379
- F4 [P0] [security] CREATE mode Save button runs CREATE TABLE directly without preview — no confirmation, no diff against existing schema — [P0][security] CREATE mode Save button runs CREATE TABLE directly without preview — no confirmation, no diff against existing schema #380
- F5 [P1] [bug] COLUMN_TYPES is incomplete — BIT, JSON, YEAR, BOOL, SERIAL, GEOMETRY fall back to VARCHAR on round-trip — [P1][bug] COLUMN_TYPES is incomplete — BIT, JSON, YEAR, BOOL, SERIAL, GEOMETRY fall back to VARCHAR on round-trip #382
- F6 [P1] [bug] AutoIncrement checkbox enabled on all column types — designer emits VARCHAR AUTO_INCREMENT, fails on save — [P1][bug] AutoIncrement checkbox enabled on all column types — designer emits VARCHAR AUTO_INCREMENT, fails on save #383
- F7 [P1] [bug] Designer allows multiple PRIMARY KEY indexes and duplicate index names — produces invalid ALTER TABLE — [P1][bug] Designer allows multiple PRIMARY KEY indexes and duplicate index names — produces invalid ALTER TABLE #384
- F8 [P1] [bug] No type-compatibility check between FK local column and referenced column — invalid FK slips through to save — [P1][bug] No type-compatibility check between FK local column and referenced column — invalid FK slips through to save #385
- F9 [P1] [bug] Designer doesn't load existing FKs in alter mode — originalConfig.foreignKeys = [] always; existing FKs always re-emit on every save — [P1][bug] Designer doesn't load existing FKs in alter mode — originalConfig.foreignKeys = [] always; existing FKs always re-emit on every save #386
Backlog (P2/P3)
- F10 [P2] [ux] OptionsTab collation list is hardcoded — no relationship with selected charset
- F11 [P2] [doc-drift] get_foreign_keys Tauri command promised in ARCHITECTURE §5.3 but not implemented — affects Designer F9 + Schema Compare F2
- F12 [P2] [ux] Designer shows LOADING spinner but no error retry — failed load leaves user stuck
- F13 [P2] [ux] Columns tab has no search/filter — long column lists hard to navigate
- F14 [P2] [a11y] Designer has no keyboard navigation for column reordering — drag/drop is mouse-only
- F15 [P2] [perf] idCounter is module-level — multi-instance Designer tabs accumulate ID collisions
- F16 [P3] [convention] Designer table name input has no validation — empty name silently emits a SQL placeholder string as an error
- F17 [P3] [test] TableDesigner.test.tsx doesn't cover the alter diff path
- F18 [P3] [arch] COLUMN_TYPES array and TYPES_WITH_LENGTH set duplicate the type list
Good (👍)
- Index change handled by drop-then-add (matches MySQL semantics)
- Primary-key name input disabled (PK has no user-chosen name)
- FK column picker is two-step workflow
- Reused-tab dedup via editorStore.addDesignerTab
- Drag-reorder hooks exist with defensive from !== to guard
- ALTER comparison reuses originalConfig baseline after save
- buildColumnType respects TYPES_WITH_LENGTH per MySQL syntax
- Tauri command pattern followed on backend
- SQLPreviewDialog has proper Escape + overlay-click dismiss
- Sub-tabs clean (Columns / Indexes / FKs / Options)
- Successful save shows green checkmark + auto-dismisses
- Test coverage: create mode, alter mode, add/remove column, sub-tab navigation
Doc drift
- ARCHITECTURE §5.3 get_foreign_keys signature unimplemented — F9, F11.
- DESIGN_REQUIREMENTS FR-5 is "Visual Schema Designer (ERD)" — wrong feature for this code (table-grid, not diagram).
- TESTING_STRATEGY has no designer_tests.rs table.
Activity
EVWorth commentedon Sep 12, 2026
Table designer is clear — and the three issues that were still open had already been fixed; this is the check rather than a change.
The P0/P1s
buildColumnDefwill not emit it either.VARCHAR(255) AUTO_INCREMENTis ERROR 1063 and was only visible at save timeget_foreign_keysexists now and alter mode loads them, so the FK tab shows what is there, the baseline holds it, and editingON DELETEemits one DROP and one ADD rather than silently dropping the originalThe backlog
Nothing from this audit is outstanding.