Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/frontend/src/styles/app/desktop-title-bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,20 @@

.desktop-task-title-bar .app-sidebar-frame-overlay-header {
height: 45px;
/* The real Task header owns center controls and native drag handling. */
pointer-events: none;
}

.app-sidebar-frame-overlay-header .desktop-title-bar-integrated {
height: 45px;
}

.desktop-title-bar-integrated .desktop-title-bar-content {
.desktop-title-bar-integrated {
pointer-events: none;
}

.desktop-title-bar-integrated .desktop-title-bar-sidebar,
.desktop-title-bar-integrated .desktop-title-bar-native-end,
.desktop-title-bar-integrated .desktop-caption-buttons {
pointer-events: auto;
}
Expand Down
12 changes: 12 additions & 0 deletions tests/smoke/desktop-new-task.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ test("merges an active Task header into Windows chrome", async ({ page }) => {
await expect(page.locator(".desktop-title-bar-label")).toHaveCount(0);
await expect(page.getByLabel("Window controls", { exact: true })).toBeVisible();

const taskTitle = page.locator(".task-header-title > strong");
expect(await taskTitle.evaluate((element) => {
const bounds = element.getBoundingClientRect();
const hit = document.elementFromPoint(bounds.left + bounds.width / 2, bounds.top + bounds.height / 2);
return Boolean(hit?.closest(".task-header"));
})).toBe(true);

const permissionPolicy = page.getByRole("button", { name: /Permission handling:/ });
await permissionPolicy.click();
await expect(page.getByRole("menu", { name: "Permission handling" })).toBeVisible();
await page.keyboard.press("Escape");

const layout = await page.evaluate(() => {
const chrome = document.querySelector(".desktop-title-bar-integrated");
const taskHeader = document.querySelector(".task-work-stack-header");
Expand Down