Skip to content

[P1][ux] SchemaCompare different routines/triggers show only a name badge — no DDL delta #375

Closed

Description

@EVWorth

Context

Schema Compare visual diff between source/target routines, views, triggers.

Problem

For tables, DiffTableItem (src/components/compare/SchemaCompare.tsx:423-470) shows column/index diffs inline. For routines/triggers, the different array is string[] (names) — the UI shows a yellow "DIFFERENT" badge but never surfaces the DDL delta. To investigate a "different" routine the user must fetch the DDL separately for both sides via RoutineViewer tabs. Since snapshot.routines[i].ddl and snapshot.triggers[i].ddl are already in memory (fetched at fetchSnapshot time), the data is right there — just not rendered.

Files

  • src/components/compare/SchemaCompare.tsx:480-510 (ObjectDiffSection)

Repro

  1. Schema Compare source/target with one routine differing
  2. Click the "DIFFERENT" badge — nothing happens

Expected

Clicking a "DIFFERENT" routine expands a side-by-side DDL diff; identical lines greyed, differing lines highlighted.

Proposed fix

Either (a) lazy-render a side-by-side diff in a popover when "DIFFERENT" is clicked (data is already in state, no IPC), or (b) inline a Diff component using a simple LCS algorithm. Format with red/green inline colour-coding matching the ResultsGrid style. Scope: M.

Acceptance

Clicking a "DIFFERENT" routine expands a side-by-side DDL diff; identical lines greyed, differing lines highlighted.

Needs human verify

no

Activity

  1. added
    audit
    severity/p1
    kind/ux
    area/compare
    on Jul 31, 2026
  2. EVWorth commented on Sep 9, 2026

    @EVWorth
    OwnerAuthor

    Closed by removing the feature.

    Schema compare could not back the claim it made — foreign keys were absent from the snapshot entirely, DDL was compared after lowercasing and collapsing whitespace, and column order was ignored — while the sync half could leave a target half-migrated. A compare tool that is quietly wrong is worse than none, because people act on its answer.

    Fixing that properly is a real piece of work, most of it a genuine DDL comparison rather than string normalisation, and the feature is not part of how this project is used. Removed rather than carried: the history has it if someone wants it back.

    Removed in the PR closing this issue: SchemaCompare, SyncPreview, schema-diff, sync-sql-generator, their tests, the compare editor tab type, and the menu, title-bar and toolbar entry points.

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/compareauditkind/uxseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions