fix(app): restore tabs without layout flicker

This commit is contained in:
Mohamed Boudra
2026-08-18 00:21:51 +02:00
parent ed8371d083
commit 2538dd1e7b
18 changed files with 86 additions and 59 deletions
@@ -156,13 +156,13 @@ test("a rebound shortcut lists its new keys in the shortcuts cheat sheet", async
await page.keyboard.press("Alt+Shift+K");
await page.getByText("Done", { exact: true }).click();
const reboundKeys = page.getByText("⌥+Shift+K", { exact: true });
const reboundKeys = page.getByText("⌥⇧K", { exact: true });
await expect(reboundKeys).toBeVisible();
await expect(defaultKeys).toHaveCount(0);
const dialog = await openCheatSheet(page);
const row = dialog.getByTestId(`shortcut-help-row-${SHORTCUTS_ROW}`);
await expect(row.getByText("⌥+Shift+K", { exact: true })).toBeVisible();
await expect(row.getByText("⌥⇧K", { exact: true })).toBeVisible();
// The whole point: the cheat sheet stops advertising the shipped default.
await expect(row.getByText("?", { exact: true })).toHaveCount(0);
});
@@ -25,19 +25,17 @@ test.describe("Settings sidebar scrolling", () => {
await openSettings(page);
const sidebar = page.getByTestId("settings-sidebar");
const scrollBody = page.getByTestId("settings-sidebar-scroll-body");
await expect(sidebar).toBeVisible();
await expect(scrollBody).toBeVisible();
const geometry = await sidebar.evaluate((node) => {
let scroller: HTMLElement | null = null;
for (const element of node.querySelectorAll<HTMLElement>("*")) {
if (element.scrollHeight > element.clientHeight) {
scroller = element;
break;
}
}
if (!scroller) return null;
const scrollBodyElement = node.querySelector<HTMLElement>(
'[data-testid="settings-sidebar-scroll-body"]',
);
if (!scrollBodyElement) return null;
const scrollerRect = scroller.getBoundingClientRect();
const scrollerRect = scrollBodyElement.getBoundingClientRect();
const dragRegions = [];
for (const element of node.querySelectorAll<HTMLElement>("*")) {
if (getComputedStyle(element).getPropertyValue("-webkit-app-region") === "drag") {