From 351dc81a3085efb5b4277b4217a4dbf505f9f38a Mon Sep 17 00:00:00 2001
From: jearhe <0verme7753@gmail.com>
Date: Sun, 23 Aug 2026 18:08:17 +0800
Subject: [PATCH] fix(schema-diff): align table selection layout
---
.../components/diff/SchemaDiffConfigStep.vue | 68 ++++++++++---------
.../diff/__tests__/SchemaDiffDialog.spec.ts | 17 +++++
2 files changed, 52 insertions(+), 33 deletions(-)
diff --git a/apps/desktop/src/components/diff/SchemaDiffConfigStep.vue b/apps/desktop/src/components/diff/SchemaDiffConfigStep.vue
index 6946109c2d..129fafa971 100644
--- a/apps/desktop/src/components/diff/SchemaDiffConfigStep.vue
+++ b/apps/desktop/src/components/diff/SchemaDiffConfigStep.vue
@@ -448,28 +448,6 @@ async function fetchDbVersion(connectionId: string, database: string, schema: st
/>
-
-
-
-
-
-
-
- {{ t("diff.tableSelectionUnrestricted") }}
-
-
-
-
{{ t("diff.info") }}
@@ -555,17 +533,6 @@ async function fetchDbVersion(connectionId: string, database: string, schema: st
/>
-
-
-
{{ t("diff.autoMatchHint") }}
-
- {{ t("diff.matchedTables", { matched: matchResult.matched.length, total: localSelectedTables.length }) }}
-
-
- {{ t("diff.missingTargetTables", { tables: missingTargetTables.join(", ") }) }}
-
-
-
{{ t("diff.info") }}
@@ -585,6 +552,41 @@ async function fetchDbVersion(connectionId: string, database: string, schema: st
+
+
+
+
+
+
+
+
+ {{ t("diff.tableSelectionUnrestricted") }}
+
+
+
+
+
+
+
{{ t("diff.autoMatchHint") }}
+
+ {{ t("diff.matchedTables", { matched: matchResult.matched.length, total: localSelectedTables.length }) }}
+
+
+ {{ t("diff.missingTargetTables", { tables: missingTargetTables.join(", ") }) }}
+
+
+
+
diff --git a/apps/desktop/src/components/diff/__tests__/SchemaDiffDialog.spec.ts b/apps/desktop/src/components/diff/__tests__/SchemaDiffDialog.spec.ts
index 16ba33f997..2cd2c8753c 100644
--- a/apps/desktop/src/components/diff/__tests__/SchemaDiffDialog.spec.ts
+++ b/apps/desktop/src/components/diff/__tests__/SchemaDiffDialog.spec.ts
@@ -54,4 +54,21 @@ describe("SchemaDiffDialog fullscreen layout", () => {
expect(configStepSource).toContain('v-if="restrictTables && canConfigureTableSelection"');
expect(configStepSource).toContain("restrictTables && localSelectedTables.length && canConfigureTableSelection && isTableIdentityReady('target')");
});
+
+ it("keeps explicit table selection in a shared scope below both sides", () => {
+ const comparisonScope = configStepSource.indexOf("");
+ const targetInfo = configStepSource.indexOf("");
+ const options = configStepSource.indexOf("");
+ const tableSelectors = configStepSource.match(/
", comparisonScope);
+
+ expect(comparisonScope).toBeGreaterThan(targetInfo);
+ expect(comparisonScope).toBeLessThan(options);
+ expect(tableSelectors).toHaveLength(1);
+ expect(tableSelector).toBeGreaterThan(comparisonScope);
+ expect(tableSelector).toBeLessThan(options);
+ expect(targetMatch).toBeGreaterThan(comparisonScope);
+ expect(targetMatch).toBeLessThan(options);
+ });
});