fix(settings): keep MCP client tabs scrollable without overlap

This commit is contained in:
Imzl-zl authored and GitHub committed 2026-07-24 21:11:17 +08:00
1 parent 7cbbd4eff6
commit 3035800658
2 files changed
+26 -9

No files matched your search

@@ -109,6 +109,23 @@ describe("MCP policy settings state", () => {
expect(settingsDialogSource).toContain(":aria-checked=\"mcpExecutionMode === 'safe_write'\"");
expect(settingsDialogSource).toContain("onMcpExecutionModeKeydown($event, 'safe_write')");
});
it("keeps MCP client config tabs on a single scrollable row", () => {
const tabsStart = settingsDialogSource.indexOf('<Tabs v-model="mcpConfigTab"');
const tabsEnd = settingsDialogSource.indexOf("</TabsList>", tabsStart);
const tabsSource = settingsDialogSource.slice(tabsStart, tabsEnd);
expect(tabsStart).toBeGreaterThan(-1);
expect(tabsEnd).toBeGreaterThan(tabsStart);
expect(tabsSource).toContain("overflow-x-auto");
expect(tabsSource).toContain("min-w-0");
expect(tabsSource).toContain("max-w-full");
expect(tabsSource).toContain("overscroll-x-contain");
expect(tabsSource).not.toContain("flex-wrap");
expect(tabsSource).not.toContain("grid-cols-");
expect(tabsSource.match(/flex-none shrink-0/g)).toHaveLength(8);
expect(tabsSource).not.toContain("min-w-0 px-");
});
});
describe("MCP connection search", () => {