fix: stabilize account tab dimensions

Keep Account Overview and Usage Rules inside the same fixed grid row. Move rules scrolling into a dedicated inner panel so switching tabs no longer changes the outer sizing and overflow model. Add a regression test for the shared layout contract.
This commit is contained in:
Sucukdeluxe
2026-08-09 21:56:25 +02:00
parent 9f0140dd3c
commit 7046df09e3
6 changed files with 49 additions and 21 deletions
+15
View File
@@ -0,0 +1,15 @@
import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
const appSource = readFileSync(new URL("../src/renderer/App.tsx", import.meta.url), "utf8");
const styles = readFileSync(new URL("../src/renderer/styles.css", import.meta.url), "utf8");
describe("account management layout", () => {
it("keeps both account tabs inside the same fixed content row", () => {
expect(appSource).toContain('<div className="account-settings-layout">');
expect(appSource).not.toContain("account-settings-layout ${accountManagementTab}");
expect(appSource).toContain('<div className="account-rules-panel" hidden={accountManagementTab !== "rules"}>');
expect(styles).not.toMatch(/\.account-settings-layout\.rules\s*{/);
expect(styles).toMatch(/\.account-rules-panel\s*{[^}]*min-width:\s*0;[^}]*min-height:\s*0;[^}]*overflow-y:\s*auto;/s);
});
});