Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(schema-diff): keep compare action reachable

jearhee9ca697c3b4b
diff --git a/apps/desktop/src/components/diff/SchemaDiffDialog.vue b/apps/desktop/src/components/diff/SchemaDiffDialog.vue
index c95ae7e4d1..dbdf8fd75a 100644
--- a/apps/desktop/src/components/diff/SchemaDiffDialog.vue
+++ b/apps/desktop/src/components/diff/SchemaDiffDialog.vue
@@ -870,10 +870,16 @@ const targetConnectionInfo = computed(() => {
</DialogTitle>
</DialogHeader>
- <div class="flex-1 min-h-0 overflow-hidden flex flex-col">
+ <!-- Result step relies on splitpanes to manage its own scroll/heights, so it keeps
+ `overflow-hidden`; the config step's tall content (e.g. the table multi-select
+ added in the "compare specific tables" feature) can overflow a fixed-height
+ dialog, so it must be allowed to scroll vertically instead of being clipped --
+ otherwise the Compare button at the bottom becomes unreachable. -->
+ <div :class="[step === 'result' ? 'overflow-hidden' : 'overflow-y-auto', 'flex-1 min-h-0 flex flex-col']">
<!-- Config Step -->
<SchemaDiffConfigStep
v-if="step === 'config'"
+ class="shrink-0"
v-model:source-connection-id="sourceConnectionId"
v-model:source-database="sourceDatabase"
v-model:source-schema="sourceSchema"
diff --git a/apps/desktop/src/components/diff/__tests__/SchemaDiffDialog.spec.ts b/apps/desktop/src/components/diff/__tests__/SchemaDiffDialog.spec.ts
index 5246200afb..d3e9b3d9c3 100644
--- a/apps/desktop/src/components/diff/__tests__/SchemaDiffDialog.spec.ts
+++ b/apps/desktop/src/components/diff/__tests__/SchemaDiffDialog.spec.ts
@@ -26,4 +26,17 @@ describe("SchemaDiffDialog fullscreen layout", () => {
it("lets the deploy confirm dialog body shrink so a long destructive statement can't push the footer buttons off-screen", () => {
expect(dialogSource).toContain('<div class="py-2 space-y-3 min-w-0">');
});
+
+ it("lets the config step scroll vertically so the Compare button stays reachable when 'compare specific tables' is enabled", () => {
+ // Regression for #6627: the "compare specific tables" feature (#6533/#6540) grows the
+ // config step (table multi-select + same-name match). Under a fixed-height dialog that
+ // step used to be clipped (`overflow-hidden`), pushing the Compare button below the
+ // visible area with no way to scroll to it. The container must scroll on all steps
+ // except the result step, which relies on splitpanes to manage its own height.
+ expect(dialogSource).toContain("step === 'result' ? 'overflow-hidden' : 'overflow-y-auto'");
+ // The config step must not be flex-shrunk (which would swallow its height and suppress
+ // the scrollbar); only then does the taller-than-dialog content actually overflow and
+ // become reachable via scrolling.
+ expect(dialogSource).toMatch(/<SchemaDiffConfigStep\n[\s\S]*?class="shrink-0"/);
+ });
});