Skip to content

audit: table designer #376

Closed
Closed

Description

@EVWorth

Status: filed
Drives: docs/audits/designer.md

Findings

Critical (P0/P1)

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

  1. added
    audit
    area/designer
    on Jul 31, 2026
  2. EVWorth commented on Sep 12, 2026

    @EVWorth
    OwnerAuthor

    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

    #377–#382, #385 closed earlier
    #383 AUTO_INCREMENT offered on every column type fixed: the checkbox is disabled unless the type can carry one, with a tooltip saying why, and buildColumnDef will not emit it either. VARCHAR(255) AUTO_INCREMENT is ERROR 1063 and was only visible at save time
    #384 multiple PRIMARY KEYs and duplicate index names fixed: a second primary key, a duplicate index name, and an index naming a column that is not on the table each raise an inline amber problem on the row. Your third case — "no validation that the columns named actually exist" — is covered too, which matters most after a rename
    #386 existing FKs invisible in alter mode fixed: get_foreign_keys exists now and alter mode loads them, so the FK tab shows what is there, the baseline holds it, and editing ON DELETE emits one DROP and one ADD rather than silently dropping the original

    The backlog

    • F-items on inference — the audit's "CSV column-type inference silently picks TEXT" belongs to the import area and does not apply: the CSV import maps onto an existing table's columns, so nothing is inferred.
    • FR-8.4 cited by that item does not exist in DESIGN_REQUIREMENTS; the numbering appears to predate a renumber.

    Nothing from this audit is outstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/designeraudit

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions