From 5bcdd59441caa17ba3710b323ef8915c8a146235 Mon Sep 17 00:00:00 2001 From: pythonlearner1025 Date: Sat, 29 Aug 2026 19:01:18 +0000 Subject: [PATCH 1/2] fix(webapp): the tile-menu backdrop is a div, never a button A fullscreen button with no global reset paints the UA's opaque button face over the whole app. Same shape as the tab-menu backdrop; the class now also pins border 0 and a transparent background, and a test asserts the element type. Co-Authored-By: Claude Fable 5 --- packages/webapp/src/shell/WorkspaceStrip.tsx | 16 +++++++--------- packages/webapp/src/webapp-workspace.css | 4 ++++ packages/webapp/test/workspace-strip.test.tsx | 13 ++++++++++--- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/packages/webapp/src/shell/WorkspaceStrip.tsx b/packages/webapp/src/shell/WorkspaceStrip.tsx index ac21e41a..401ea42b 100644 --- a/packages/webapp/src/shell/WorkspaceStrip.tsx +++ b/packages/webapp/src/shell/WorkspaceStrip.tsx @@ -3,6 +3,7 @@ import type { TenantMe } from '../api-adapter'; import type { CloudWorkspaceModel } from '../workspace-store'; import { DriveGlyph, PlusGlyph } from './StripIcons'; import { workspaceTileStyle } from './workspace-tile'; +import { squareAvatarUrl } from '../avatar-url'; /** The tile legend: initials when the name has several words, otherwise its * first two letters. `design-team` reads DT and `engineering` reads EN, as the @@ -253,11 +254,11 @@ export function WorkspaceStrip({ {tileMenu !== null && menuWorkspace !== undefined && ( <> - diff --git a/packages/webapp/src/webapp-workspace.css b/packages/webapp/src/webapp-workspace.css index 738fdd0a..ecf096be 100644 --- a/packages/webapp/src/webapp-workspace.css +++ b/packages/webapp/src/webapp-workspace.css @@ -244,6 +244,10 @@ position: fixed; z-index: 199; inset: 0; + /* Explicit: a fullscreen element with the UA's default button face would + * paint over the entire app. Keep this class safe on any element. */ + border: 0; + background: transparent; } .webapp-session-menu { diff --git a/packages/webapp/test/workspace-strip.test.tsx b/packages/webapp/test/workspace-strip.test.tsx index a7c43fa4..22693630 100644 --- a/packages/webapp/test/workspace-strip.test.tsx +++ b/packages/webapp/test/workspace-strip.test.tsx @@ -74,10 +74,13 @@ describe("workspace strip", () => { expect(tiles[1]?.getAttribute("aria-current")).toBeNull(); expect(tiles[1]?.className).toContain("shell-wtile--off"); expect(tiles[2]?.getAttribute("aria-label")).toBe("Create workspace"); - // Each workspace tile wears its own gradient; the create tile keeps the + // Each workspace tile wears its own solid pastel; the create tile keeps the // dashed outline the stylesheet gives it. - expect(tiles[0]?.style.background).toContain("linear-gradient"); - expect(tiles[1]?.style.background).toContain("linear-gradient"); + // jsdom normalizes hsl() to rgb() on read-back; assert solid + distinct. + expect(tiles[0]?.style.background).toMatch(/^rgb\(/u); + expect(tiles[1]?.style.background).toMatch(/^rgb\(/u); + expect(tiles[0]?.style.background).not.toContain("gradient"); + expect(tiles[0]?.style.background).not.toBe(tiles[1]?.style.background); expect(tiles[0]?.style.background).not.toBe(tiles[1]?.style.background); expect(tiles[2]?.style.background).toBe(""); await view.unmount(); @@ -130,6 +133,10 @@ describe("workspace strip", () => { const menu = view.container.querySelector('[role="menu"][aria-label="Workspace design-team"]'); expect(menu).not.toBeNull(); + // The backdrop must never be a