Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
fix(web): unify modal and loading backdrops (#1078)
Generb9784352e912
diff --git a/assets/app-store/duo-2007x2853/02-teamwork.jpg b/assets/app-store/duo-2007x2853/02-teamwork.jpgindex cda4eca4d..acfb6575d 100644Binary files a/assets/app-store/duo-2007x2853/02-teamwork.jpg and b/assets/app-store/duo-2007x2853/02-teamwork.jpg differdiff --git a/assets/app-store/duo-2007x2853/03-companion.jpg b/assets/app-store/duo-2007x2853/03-companion.jpgindex 967938c3e..e8c4a3a43 100644Binary files a/assets/app-store/duo-2007x2853/03-companion.jpg and b/assets/app-store/duo-2007x2853/03-companion.jpg differdiff --git a/assets/app-store/duo-2007x2853/04-context.jpg b/assets/app-store/duo-2007x2853/04-context.jpgindex dffb630bd..ac2509830 100644Binary files a/assets/app-store/duo-2007x2853/04-context.jpg and b/assets/app-store/duo-2007x2853/04-context.jpg differdiff --git a/assets/app-store/duo-2007x2853/06-existing-setup.jpg b/assets/app-store/duo-2007x2853/06-existing-setup.jpgindex de9198e29..15e33dcf8 100644Binary files a/assets/app-store/duo-2007x2853/06-existing-setup.jpg and b/assets/app-store/duo-2007x2853/06-existing-setup.jpg differdiff --git a/assets/app-store/manifest.json b/assets/app-store/manifest.jsonindex fecba48b3..a8a7733b8 100644--- a/assets/app-store/manifest.json+++ b/assets/app-store/manifest.json@@ -4,7 +4,7 @@"clock": "2026-10-25T00:00:00Z","locale": "en-US","timezone": "UTC",- "repositoryHead": "7e262bc94b6e7b026024cb020e410048bb607848",+ "repositoryHead": "05a157cee111881c31108cc14727b38b7276e974","inputs": {"scripts/ci/pnpm-lock.mjs": "c6ad91cbd38cc08234e2da4122079d76bfef5eb61560862018cbab9d3e29f4cc","src/shared/src/billing.ts": "53d36e6bbab90d72ae86b9748d97bef4116a7f567d8587067f469d294c562b4a",@@ -356,7 +356,8 @@"src/web/src/components/remote-image/remote-image.tsx": "bd79ae8b40c3a221660d65d7638ade098fcc552bacc72df33aff5a5080822699","src/web/src/components/remote-image/remote-markdown-image.tsx": "dee2d85081c1371c8b93b02709b03c71786482b83805c17ed8d8c7710b9c600f","src/web/src/components/remote-image/share-image-context.ts": "6ed4b4b39486a54c1cfe3cb80504efc1ba9c1c3419952e5b8a913d23cbad8d6a",- "src/web/src/components/ui/alert-dialog.tsx": "9d8433c1533ce8c49f92bfa852a692bb1b8541352edbf221dbd0247b1d084cec",+ "src/web/src/components/ui/alert-dialog.tsx": "16e1791d7fb667f59a65351ce808f45db124b740b9921c048fc8cf060782e8e3",+ "src/web/src/components/ui/app-edge-fade.tsx": "d4cd3856e0cbaecc9f71e13d6534ee8f5287533d196db3dd5f2ea1c9c1e79d53","src/web/src/components/ui/app-surface.tsx": "f00f1c4a4ae03f945165d7b56f34f5ffdc9dca82819c518478bd19a74d11e65e","src/web/src/components/ui/auto-resize-textarea.tsx": "2624050ac6d504453658dc4e0e7e71c6d03dbf5cb665b3414dec9eba3bbee927","src/web/src/components/ui/avatar.tsx": "357b2f9aac0192c071cb2ed65cb6e4c8ec01fa02fc15cf50d889b85731b75666",@@ -365,7 +366,7 @@"src/web/src/components/ui/card.tsx": "a41b4d3d618416128d0093af2575048a2de8ef25c0926bcea4f19a24a59de476","src/web/src/components/ui/confirm-dialog.tsx": "4582da921ed9794343a2e1f2273c1f7ad1b2e38a08048ad93d8ab7162d49349a","src/web/src/components/ui/context-menu.tsx": "5fcb276d77dfa1d3ad326c888d9e11a9db8630eda14cceb0827405ad1a0e3a05",- "src/web/src/components/ui/dialog.tsx": "1b234005a8c145d9bc4d705b0251140ae3e0b73c4d216a16f0aa6fe8f3267877",+ "src/web/src/components/ui/dialog.tsx": "a778c9980b0217a6c4bbc696ee1860544e6b52c92a7afdafe7c7cbad3f429049","src/web/src/components/ui/dropdown-menu.tsx": "6d539c7db8d57e662ef114190adca219c1e8ecf1fc61f80ed5afdf1ac14d4220","src/web/src/components/ui/input.tsx": "71206c174a75f762238246aa8a920aa2cf55c44f731940c62987f06c82aa02fc","src/web/src/components/ui/label.tsx": "7f19b8476658d25ff197c84030e58cd7395059d876a54630e025951e474ebdae",@@ -376,7 +377,7 @@"src/web/src/components/ui/select.tsx": "248beb21df586b3a6060e2c27bb73428688ce819dfc1675833ebcf5a71632407","src/web/src/components/ui/separator.tsx": "75085bd84ff6965e4a356c53a4689799cabf65caa93c0bba064d5a0c6fa78f13","src/web/src/components/ui/sheet-resize-handle.tsx": "b71306c261847d30dfbe9cc7e2e71dd70916b85e705a7786659e1fec00b49025",- "src/web/src/components/ui/sheet.tsx": "b3a5de52210e4f1de1035d138376132d113ff0214173505581d205565022a9c0",+ "src/web/src/components/ui/sheet.tsx": "f231b6b6c7d70823b858c3893f61e461115964d3e9da15742315114d72af6548","src/web/src/components/ui/skeleton.tsx": "c315cd9792883f3da90b41f1db7b7afc01cd8dbe8cfc7b6dd2ce7c8f34d8eb84","src/web/src/components/ui/slider.tsx": "6d6610868ad8f74a251a4a315b1551454c312747446dbed0d033674a643db7e9","src/web/src/components/ui/swipe-container.module.css": "9879a6165932eba0ff220c036e9639b0d57f36a2f8667c16c1f1f9594ec6f619",@@ -677,7 +678,7 @@"path": "phone-1206x2622/03-companion.jpg","width": 1206,"height": 2622,- "sha256": "30cfaf201183d75306177d232c23f352090c841841866ed8b02b6f11a7febb3d",+ "sha256": "052587efc5557f46915e6d673f7af1f7527b6b50614e82590caaad94e6b33a49","surfaces": [{"scene": "identity",@@ -790,7 +791,7 @@"path": "phone-1320x2868/01-share-agents.jpg","width": 1320,"height": 2868,- "sha256": "02d9a312a279e42fbbd45f0615b3cbcd9936752f0e1ca8de07213fb402c1c620",+ "sha256": "52d8cf32d86474a3ffd6950e9a5b736989f2f306bf9a4fb2326c087450c93787","surfaces": [{"scene": "workspace",@@ -816,7 +817,7 @@"path": "phone-1320x2868/02-teamwork.jpg","width": 1320,"height": 2868,- "sha256": "346908178928b218416f52fef18c0f61d0f5d4e7e5a1228332cf004593032dde",+ "sha256": "7bb9b14fdbb91bf0aee6eb645bddf2b4c038e3de4dc6660d97328d71dd7fe6dc","surfaces": [{"scene": "workspace",@@ -842,7 +843,7 @@"path": "phone-1320x2868/03-companion.jpg","width": 1320,"height": 2868,- "sha256": "93dbabe22c7e77bc0fb1c9e3b24a42c859d1700c067b3c39a811907102ed09f9",+ "sha256": "4fbf6cbffb5464768e482637e7d6d5bf838422edcd77eecfa4a364a180083608","surfaces": [{"scene": "identity",@@ -903,7 +904,7 @@"path": "phone-1320x2868/05-phone.jpg","width": 1320,"height": 2868,- "sha256": "58fc01988bce75d9239bd8b276a025b3fac75911f26a4c1098ea947fe11a93f8",+ "sha256": "270e04dedb164cbf854c5596fcb20461cfb927d616fdc0c67578a0c5af627a2d","surfaces": [{"scene": "workspace",@@ -1068,7 +1069,7 @@"path": "tablet-2752x2064/05-phone.jpg","width": 2752,"height": 2064,- "sha256": "256f29c9a111c7e04cfe646e4cc08e0e8021b0a2bc385643c08049f11f9caf9a",+ "sha256": "f5f1998a4efdbae47d10b766e60214e4729f180aa7521e76b14acc1bcb552f96","surfaces": [{"scene": "workspace",@@ -1094,7 +1095,7 @@"path": "tablet-2752x2064/06-existing-setup.jpg","width": 2752,"height": 2064,- "sha256": "272ae91e22e5f81efe6b30b697d4efffe74365343b058f28421dd78971b058d9",+ "sha256": "471ee8c0f3bf0ec38c3c174b271ba95df3e8a39cbd218870206569b675394690","surfaces": [{"scene": "workspace",@@ -1146,7 +1147,7 @@"path": "duo-2007x2853/02-teamwork.jpg","width": 2007,"height": 2853,- "sha256": "f80c716832ce414f78d4d941e685909eaac95420446690cc0cac64aad73f2bcf",+ "sha256": "04bf417c53b92af207b5e2fc3a42e45e529fa2014b16a7d0714635034870665e","surfaces": [{"scene": "workspace",@@ -1172,7 +1173,7 @@"path": "duo-2007x2853/03-companion.jpg","width": 2007,"height": 2853,- "sha256": "28539ec391fdca836b1532fe99f70085d6dafeca48e6bd7c51cda9866d891d1f",+ "sha256": "aba2c5f88993e61c952270d853a23c4c6c3c7fdfa77d7dbd3531247eac696018","surfaces": [{"scene": "identity",@@ -1198,7 +1199,7 @@"path": "duo-2007x2853/04-context.jpg","width": 2007,"height": 2853,- "sha256": "3caeb6733bc9ed4d52c2f27e8e6f07bc6a9ffcc3952cc3444c8583a0ed358cd3",+ "sha256": "ef6a3ea747bf3d90fe85dd99522be3f9c8ff80ba7b85014baf87abd4d719dc7c","surfaces": [{"scene": "continuity",@@ -1259,7 +1260,7 @@"path": "duo-2007x2853/06-existing-setup.jpg","width": 2007,"height": 2853,- "sha256": "eed125187ac9cc4d0e2a15588acf25c6b0c12b37e96e484a0c51e8d8854632b3",+ "sha256": "59728cd89412df2f095cbcf18bc25770be07c398715c251c4db52f2f46409e18","surfaces": [{"scene": "workspace",diff --git a/assets/app-store/phone-1206x2622/03-companion.jpg b/assets/app-store/phone-1206x2622/03-companion.jpgindex 0afabecd2..2acf61dde 100644Binary files a/assets/app-store/phone-1206x2622/03-companion.jpg and b/assets/app-store/phone-1206x2622/03-companion.jpg differdiff --git a/assets/app-store/phone-1320x2868/01-share-agents.jpg b/assets/app-store/phone-1320x2868/01-share-agents.jpgindex 1f0477f40..0b557dbf8 100644Binary files a/assets/app-store/phone-1320x2868/01-share-agents.jpg and b/assets/app-store/phone-1320x2868/01-share-agents.jpg differdiff --git a/assets/app-store/phone-1320x2868/02-teamwork.jpg b/assets/app-store/phone-1320x2868/02-teamwork.jpgindex 587a9ef76..031fc9551 100644Binary files a/assets/app-store/phone-1320x2868/02-teamwork.jpg and b/assets/app-store/phone-1320x2868/02-teamwork.jpg differdiff --git a/assets/app-store/phone-1320x2868/03-companion.jpg b/assets/app-store/phone-1320x2868/03-companion.jpgindex c1ed3bca9..efe986ea5 100644Binary files a/assets/app-store/phone-1320x2868/03-companion.jpg and b/assets/app-store/phone-1320x2868/03-companion.jpg differdiff --git a/assets/app-store/phone-1320x2868/05-phone.jpg b/assets/app-store/phone-1320x2868/05-phone.jpgindex 4523bd457..8c5bc4311 100644Binary files a/assets/app-store/phone-1320x2868/05-phone.jpg and b/assets/app-store/phone-1320x2868/05-phone.jpg differdiff --git a/assets/app-store/tablet-2752x2064/05-phone.jpg b/assets/app-store/tablet-2752x2064/05-phone.jpgindex d0d98518f..77b0998eb 100644Binary files a/assets/app-store/tablet-2752x2064/05-phone.jpg and b/assets/app-store/tablet-2752x2064/05-phone.jpg differdiff --git a/assets/app-store/tablet-2752x2064/06-existing-setup.jpg b/assets/app-store/tablet-2752x2064/06-existing-setup.jpgindex bd67b4fbf..43bdb99f2 100644Binary files a/assets/app-store/tablet-2752x2064/06-existing-setup.jpg and b/assets/app-store/tablet-2752x2064/06-existing-setup.jpg differdiff --git a/src/web/src/components/community/onboarding/onboarding-machine-dialog.tsx b/src/web/src/components/community/onboarding/onboarding-machine-dialog.tsxindex 64a5d130e..835fa9dd3 100644--- a/src/web/src/components/community/onboarding/onboarding-machine-dialog.tsx+++ b/src/web/src/components/community/onboarding/onboarding-machine-dialog.tsx@@ -172,7 +172,6 @@ export function OnboardingMachineDialog({<DialogContentdata-testid={tid.onboardingMachineDialog}showCloseButton={false}- overlayClassName="bg-black/20 supports-backdrop-filter:backdrop-blur-sm"className="max-h-[calc(100dvh-2rem)] gap-0 overflow-y-auto border-0 p-0 shadow-(--e2) ring-0 thin-scrollbar sm:max-w-lg"><DialogHeader className="gap-4 px-4 pt-4 pb-4 sm:px-6 sm:pt-6 sm:pb-6">diff --git a/src/web/src/components/community/onboarding/onboarding-model-dialog.tsx b/src/web/src/components/community/onboarding/onboarding-model-dialog.tsxindex cc3f87a6d..d7e9c94f3 100644--- a/src/web/src/components/community/onboarding/onboarding-model-dialog.tsx+++ b/src/web/src/components/community/onboarding/onboarding-model-dialog.tsx@@ -18,7 +18,7 @@ export function OnboardingModelDialog({ runtime, model, onModelChange, onContinuconst backendLabel = ONBOARDING_HARNESSES.find((option) => option.value === runtime.id)?.label ?? runtime.idreturn (<Dialog open>- <DialogContent showCloseButton={false} overlayClassName="bg-black/20 supports-backdrop-filter:backdrop-blur-sm" className="max-h-[calc(100dvh-2rem)] gap-0 overflow-y-auto border-0 p-0 shadow-(--e2) ring-0 thin-scrollbar sm:max-w-md">+ <DialogContent showCloseButton={false} className="max-h-[calc(100dvh-2rem)] gap-0 overflow-y-auto border-0 p-0 shadow-(--e2) ring-0 thin-scrollbar sm:max-w-md"><form onSubmit={(event) => { event.preventDefault(); if (!error) onContinue() }}><DialogHeader className="gap-4 px-4 pt-4 pb-4 sm:px-6 sm:pt-6 sm:pb-6"><div className="flex gap-1.5" aria-label="Step 3 of 4">diff --git a/src/web/src/components/community/onboarding/onboarding-preview-flow.test.ts b/src/web/src/components/community/onboarding/onboarding-preview-flow.test.tsindex 955fa2182..fb8dc662f 100644--- a/src/web/src/components/community/onboarding/onboarding-preview-flow.test.ts+++ b/src/web/src/components/community/onboarding/onboarding-preview-flow.test.ts@@ -35,15 +35,16 @@ describe("onboarding preview flow", () => {expect(previewSource).toContain('setMode("status")')})- it("keeps a blurred backdrop across every onboarding dialog", () => {+ it("inherits the shared Dialog backdrop across every onboarding dialog", () => {for (const filename of ["onboarding-select-dialog.tsx","onboarding-machine-dialog.tsx","onboarding-status-dialog.tsx",+ "onboarding-model-dialog.tsx",]) {- expect(readFileSync(resolve(directory, filename), "utf8")).toContain(- 'overlayClassName="bg-black/20 supports-backdrop-filter:backdrop-blur-sm"',- )+ const source = readFileSync(resolve(directory, filename), "utf8")+ expect(source).toContain("<DialogContent")+ expect(source).not.toContain("overlayClassName=")}})diff --git a/src/web/src/components/community/onboarding/onboarding-select-dialog.tsx b/src/web/src/components/community/onboarding/onboarding-select-dialog.tsxindex 9e2a51e9e..596bb1d28 100644--- a/src/web/src/components/community/onboarding/onboarding-select-dialog.tsx+++ b/src/web/src/components/community/onboarding/onboarding-select-dialog.tsx@@ -159,7 +159,6 @@ export function OnboardingSelectDialog({<DialogContentdata-testid={testId}showCloseButton={dismissible}- overlayClassName="bg-black/20 supports-backdrop-filter:backdrop-blur-sm"className="max-h-[calc(100dvh-2rem)] gap-0 overflow-y-auto border-0 p-0 shadow-(--e2) ring-0 thin-scrollbar sm:max-w-xl"initialFocus={false}aria-busy={busy}diff --git a/src/web/src/components/community/onboarding/onboarding-status-dialog.tsx b/src/web/src/components/community/onboarding/onboarding-status-dialog.tsxindex ea56a2ac2..e504c576b 100644--- a/src/web/src/components/community/onboarding/onboarding-status-dialog.tsx+++ b/src/web/src/components/community/onboarding/onboarding-status-dialog.tsx@@ -55,7 +55,6 @@ export function OnboardingStatusDialog({<DialogContentdata-testid={tid.onboardingInitializeStatus}showCloseButton={false}- overlayClassName="bg-black/20 supports-backdrop-filter:backdrop-blur-sm"className="gap-0 overflow-hidden border-0 p-0 shadow-(--e2) ring-0 sm:max-w-md"aria-busy={status === "loading"}>diff --git a/src/web/src/components/community/shell/unresolved-main-skeleton.test.ts b/src/web/src/components/community/shell/unresolved-main-skeleton.test.tsindex 6fa21c9f1..69ed2201d 100644--- a/src/web/src/components/community/shell/unresolved-main-skeleton.test.ts+++ b/src/web/src/components/community/shell/unresolved-main-skeleton.test.ts@@ -2,9 +2,10 @@ import { createElement } from "react"import { renderToStaticMarkup } from "react-dom/server"import { describe, expect, it } from "vitest"import { UnresolvedMainSkeleton } from "./unresolved-main-skeleton"+import { appBackdropClassName } from "@/components/ui/app-edge-fade"describe("UnresolvedMainSkeleton", () => {- it("shows only the neutral loading motion on a static app surface with inert edge fades", () => {+ it("keeps neutral loading motion on the shared translucent backdrop with four inert edges", () => {const markup = renderToStaticMarkup(createElement(UnresolvedMainSkeleton))expect(markup).not.toContain('data-slot="skeleton"')@@ -16,10 +17,14 @@ describe("UnresolvedMainSkeleton", () => {expect(markup).not.toContain('community-ws-reconnect-title')expect(markup).toContain('data-community-unresolved-main=""')expect(markup).toContain('aria-hidden="true"')- expect(markup).toContain("h-full w-full flex-1 overflow-hidden bg-(--app-bg)")+ expect(markup).toContain("h-full w-full flex-1 overflow-hidden")+ for (const token of appBackdropClassName.split(" ")) expect(markup).toContain(token)+ expect(markup).not.toMatch(/class="[^"]*\sbg-\(--app-bg\)/)expect(markup).not.toContain("animate-pulse")expect(markup.match(/data-slot="app-edge-fade"/g)).toHaveLength(1)expect(markup.match(/h-\(--app-edge-fade-size\)/g)).toHaveLength(2)+ expect(markup.match(/w-\(--app-edge-fade-size\)/g)).toHaveLength(2)+ expect(markup.match(/data-app-edge=/g)).toHaveLength(4)expect(markup).toContain("from-(--app-bg) to-transparent")expect(markup).toContain("from-transparent to-(--app-bg)")expect(markup).toContain("pointer-events-none")diff --git a/src/web/src/components/community/shell/unresolved-main-skeleton.tsx b/src/web/src/components/community/shell/unresolved-main-skeleton.tsxindex fb19decd2..6446eaa8e 100644--- a/src/web/src/components/community/shell/unresolved-main-skeleton.tsx+++ b/src/web/src/components/community/shell/unresolved-main-skeleton.tsx@@ -1,11 +1,12 @@import { CommunityConnectingIndicator } from "./community-connecting-indicator"-import { AppEdgeFade } from "@/components/ui/app-edge-fade"+import { AppEdgeFade, appBackdropClassName } from "@/components/ui/app-edge-fade"+import { cn } from "@/lib/utils"export function UnresolvedMainSkeleton() {return (<divdata-community-unresolved-main=""- className="relative grid place-items-center min-h-0 h-full w-full flex-1 overflow-hidden bg-(--app-bg)"+ className={cn("relative grid place-items-center min-h-0 h-full w-full flex-1 overflow-hidden", appBackdropClassName)}><div className="relative z-20 flex w-full max-w-xs flex-col items-center text-center text-foreground"><CommunityConnectingIndicator />diff --git a/src/web/src/components/community/social/profile-card-surface.dom.test.ts b/src/web/src/components/community/social/profile-card-surface.dom.test.tsindex 985227d8b..c0f90227a 100644--- a/src/web/src/components/community/social/profile-card-surface.dom.test.ts+++ b/src/web/src/components/community/social/profile-card-surface.dom.test.ts@@ -5,6 +5,7 @@ import { resolve } from "node:path"import { QueryClient, QueryClientProvider } from "@tanstack/react-query"import { afterEach, describe, expect, it, vi } from "vitest"import { act, render, waitFor } from "@/test/react-dom-harness"+import { appBackdropClassName } from "@/components/ui/app-edge-fade"import type { Profile } from "@/components/community/social/profile-types"const mockProps = vi.hoisted(() => new Map<string, Record<string, unknown>>())@@ -176,7 +177,7 @@ describe("ProfileCard surface contracts", () => {renderer.unmount()})- it("uses the shared modal bottom Sheet without a copied or foreground-derived overlay", () => {+ it("uses the shared modal bottom Sheet without a copied or foreground-derived overlay", async () => {const { renderer } = renderSurface("mobile")const root = mockProps.get("sheet-root")!const close = renderer.container.querySelector("sheet-close")!@@ -213,8 +214,30 @@ describe("ProfileCard surface contracts", () => {expect(profileSource).not.toContain("bg-foreground/30")expect(profileSource).not.toContain("<SheetOverlay")expect(sheetSource).toContain("data-[side=bottom]:border-t")- expect(sheetSource).toContain("bg-black/20")expect(sheetSource).not.toContain("bg-foreground")++ const sharedSheet = await vi.importActual<typeof import("@/components/ui/sheet")>("@/components/ui/sheet")+ render(React.createElement(+ sharedSheet.Sheet,+ { defaultOpen: true },+ React.createElement(+ sharedSheet.SheetContent,+ { showCloseButton: false },+ React.createElement(sharedSheet.SheetTitle, null, "Shared profile backdrop"),+ ),+ ))+ const overlay = document.querySelector('[data-slot="sheet-overlay"]')!+ expect(overlay).toHaveClass(...appBackdropClassName.split(" "))+ expect(overlay).toHaveClass("bg-black/10", "supports-backdrop-filter:backdrop-blur-xs")+ const fades = overlay.querySelector('[data-slot="app-edge-fade"]')!+ expect(fades).toHaveAttribute("aria-hidden", "true")+ expect(fades).toHaveClass("pointer-events-none")+ expect(fades.querySelectorAll("[data-app-edge]")).toHaveLength(4)+ for (const side of ["top", "bottom", "left", "right"]) {+ expect(fades.querySelector(`[data-app-edge="${side}"]`)).toHaveClass(+ side === "top" || side === "bottom" ? "h-(--app-edge-fade-size)" : "w-(--app-edge-fade-size)",+ )+ }})it.each([diff --git a/src/web/src/components/ui/alert-dialog.tsx b/src/web/src/components/ui/alert-dialog.tsxindex abf167026..cad9cb006 100644--- a/src/web/src/components/ui/alert-dialog.tsx+++ b/src/web/src/components/ui/alert-dialog.tsx@@ -5,6 +5,7 @@ import { Drawer as AlertDialogPrimitive } from "@base-ui/react/drawer"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"+import { AppEdgeFade, appBackdropClassName } from "./app-edge-fade"import { SwipeRoot, SwipeViewport, SwipePopup, SwipeBackdrop, type SwipeRootProps } from "./swipe-container"function AlertDialog({ ...props }: SwipeRootProps) {@@ -25,17 +26,22 @@ function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {function AlertDialogOverlay({className,+ children,...props}: AlertDialogPrimitive.Backdrop.Props) {return (<SwipeBackdropdata-slot="alert-dialog-overlay"className={cn(- "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ appBackdropClassName,+ "fixed inset-0 z-50 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",className)}{...props}- />+ >+ <AppEdgeFade />+ {children}+ </SwipeBackdrop>)}diff --git a/src/web/src/components/ui/app-backdrop.dom.test.tsx b/src/web/src/components/ui/app-backdrop.dom.test.tsxnew file mode 100644index 000000000..617b95b3a--- /dev/null+++ b/src/web/src/components/ui/app-backdrop.dom.test.tsx@@ -0,0 +1,88 @@+import { describe, expect, it, vi } from "vitest"+import { act, fireEvent, render, screen, setupUser, waitFor } from "@/test/react-dom-harness"+import { appBackdropClassName } from "./app-edge-fade"+import { Dialog, DialogClose, DialogContent, DialogTitle, DialogTrigger, DialogOverlay } from "./dialog"+import { AlertDialog, AlertDialogCancel, AlertDialogContent, AlertDialogTitle, AlertDialogTrigger } from "./alert-dialog"+import { Sheet, SheetClose, SheetContent, SheetTitle, SheetTrigger } from "./sheet"+import { requestNativeBack } from "./native-back-layer"++vi.mock("@/hooks/use-mobile", () => ({ useIsMobile: () => false }))++const kinds = {+ dialog: { Root: Dialog, Trigger: DialogTrigger, Content: DialogContent, Title: DialogTitle, Close: DialogClose },+ "alert-dialog": { Root: AlertDialog, Trigger: AlertDialogTrigger, Content: AlertDialogContent, Title: AlertDialogTitle, Close: AlertDialogCancel },+ sheet: { Root: Sheet, Trigger: SheetTrigger, Content: SheetContent, Title: SheetTitle, Close: SheetClose },+}++describe("shared app backdrop", () => {+ it.each(["dialog", "alert-dialog", "sheet"] as const)("preserves %s dismissal, focus and Back with inert shared edges", async (kind) => {+ const { Root, Trigger, Content, Title, Close } = kinds[kind]+ const user = setupUser()+ render(<Root>+ <Trigger>Open</Trigger>+ <Content>+ <Title>Example</Title>+ <input aria-label="Draft" />+ <Close>Finish</Close>+ </Content>+ </Root>)+ const trigger = screen.getByRole("button", { name: "Open" })+ const role = kind === "alert-dialog" ? "alertdialog" : "dialog"+ await user.click(trigger)+ await screen.findByRole(role)+ const overlay = document.querySelector<HTMLElement>(`[data-slot="${kind}-overlay"]`)!+ expect(overlay).toHaveAttribute("data-open")+ expect(overlay).toHaveClass(...appBackdropClassName.split(" "))+ const edges = overlay.querySelector<HTMLElement>('[data-slot="app-edge-fade"]')!+ expect(edges).toHaveAttribute("aria-hidden", "true")+ expect(edges).toHaveClass("pointer-events-none")+ expect(Array.from(edges.children, (edge) => edge.getAttribute("data-app-edge")).sort()).toEqual(["bottom", "left", "right", "top"])+ expect(edges.querySelector("button, input, a, [tabindex]")).toBeNull()+ if (kind === "alert-dialog") {+ await waitFor(() => expect(screen.getByRole("button", { name: "Finish" })).toHaveFocus())+ }+ await user.click(overlay)+ if (kind === "alert-dialog") {+ expect(screen.getByRole(role)).toBeInTheDocument()+ await user.click(screen.getByRole("button", { name: "Finish" }))+ }+ await waitFor(() => expect(screen.queryByRole(role)).not.toBeInTheDocument())+ if (kind === "alert-dialog") {+ await waitFor(() => expect(trigger).toHaveFocus())+ } else {+ expect(document.activeElement).toBe(document.body)+ }+ await user.click(trigger)+ await screen.findByRole(role)+ await user.keyboard("{Escape}")+ await waitFor(() => expect(screen.queryByRole(role)).not.toBeInTheDocument())+ await waitFor(() => expect(trigger).toHaveFocus())+ await user.click(trigger)+ await screen.findByRole(role)+ act(() => { expect(requestNativeBack(document)).toBe("requested") })+ await waitFor(() => expect(screen.queryByRole(role)).not.toBeInTheDocument())+ await waitFor(() => expect(trigger).toHaveFocus())+ expect(requestNativeBack(document)).toBe("none")+ })++ it("preserves overlay caller props and children alongside the decorative edges", () => {+ const clicked = vi.fn()+ render(<Dialog defaultOpen>+ <DialogOverlay data-testid="custom-overlay" onClick={clicked}>+ <span data-testid="overlay-child">Decoration</span>+ </DialogOverlay>+ </Dialog>)+ const overlay = screen.getByTestId("custom-overlay")+ expect(overlay).toContainElement(screen.getByTestId("overlay-child"))+ expect(overlay.querySelectorAll('[data-slot="app-edge-fade"]')).toHaveLength(1)+ fireEvent.click(overlay)+ expect(clicked).toHaveBeenCalledOnce()+ })++ it("keeps an explicitly overlay-free Sheet without backdrop decoration", () => {+ render(<Sheet defaultOpen><SheetContent showOverlay={false}><SheetTitle>Profile</SheetTitle></SheetContent></Sheet>)+ expect(screen.getByRole("dialog")).toBeInTheDocument()+ expect(document.querySelector('[data-slot="sheet-overlay"]')).toBeNull()+ expect(document.querySelector('[data-slot="app-edge-fade"]')).toBeNull()+ })+})diff --git a/src/web/src/components/ui/app-edge-fade.test.ts b/src/web/src/components/ui/app-edge-fade.test.tsindex c302b0ec9..8fd6d7cc8 100644--- a/src/web/src/components/ui/app-edge-fade.test.ts+++ b/src/web/src/components/ui/app-edge-fade.test.ts@@ -6,17 +6,24 @@ import { describe, expect, it } from "vitest"import { AppEdgeFade } from "./app-edge-fade"describe("AppEdgeFade", () => {- it("paints only fixed top and bottom app-background fades without interaction", () => {+ it("paints four fixed app-background edges without interaction or a center gradient", () => {const markup = renderToStaticMarkup(createElement(AppEdgeFade))expect(markup).toContain('data-slot="app-edge-fade"')expect(markup).toContain('aria-hidden="true"')expect(markup).toContain("pointer-events-none")expect(markup.match(/h-\(--app-edge-fade-size\)/g)).toHaveLength(2)+ expect(markup.match(/w-\(--app-edge-fade-size\)/g)).toHaveLength(2)+ expect(markup.match(/data-app-edge=/g)).toHaveLength(4)expect(markup).toContain("top-0")expect(markup).toContain("from-(--app-bg) to-transparent")expect(markup).toContain("bottom-0")expect(markup).toContain("from-transparent to-(--app-bg)")+ expect(markup).toContain('data-app-edge="left"')+ expect(markup).toContain('data-app-edge="right"')+ expect(markup).toContain("left-0")+ expect(markup).toContain("right-0")+ expect(markup.match(/bg-linear-to-r/g)).toHaveLength(2)expect(markup).not.toContain("safe-area")expect(markup).not.toContain("animate")expect(markup).not.toMatch(/tabindex|button|href=/)diff --git a/src/web/src/components/ui/app-edge-fade.tsx b/src/web/src/components/ui/app-edge-fade.tsxindex 4e6a72a50..b33d9af5e 100644--- a/src/web/src/components/ui/app-edge-fade.tsx+++ b/src/web/src/components/ui/app-edge-fade.tsx@@ -1,5 +1,7 @@import { cn } from "@/lib/utils"+export const appBackdropClassName = "isolate bg-black/10 supports-backdrop-filter:backdrop-blur-xs"+export function AppEdgeFade({ className, ...props }: React.ComponentProps<"div">) {return (<div@@ -16,6 +18,14 @@ export function AppEdgeFade({ className, ...props }: React.ComponentProps<"div">data-app-edge="bottom"className="absolute inset-x-0 bottom-0 h-(--app-edge-fade-size) bg-linear-to-b from-transparent to-(--app-bg)"/>+ <div+ data-app-edge="left"+ className="absolute inset-y-0 left-0 w-(--app-edge-fade-size) bg-linear-to-r from-(--app-bg) to-transparent"+ />+ <div+ data-app-edge="right"+ className="absolute inset-y-0 right-0 w-(--app-edge-fade-size) bg-linear-to-r from-transparent to-(--app-bg)"+ /></div>)}diff --git a/src/web/src/components/ui/dialog.tsx b/src/web/src/components/ui/dialog.tsxindex cb709a4b5..f52129f71 100644--- a/src/web/src/components/ui/dialog.tsx+++ b/src/web/src/components/ui/dialog.tsx@@ -5,6 +5,7 @@ import { Drawer as DialogPrimitive } from "@base-ui/react/drawer"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"+import { AppEdgeFade, appBackdropClassName } from "./app-edge-fade"import { XIcon } from "lucide-react"import { SwipeRoot, SwipeViewport, SwipePopup, SwipeBackdrop, type SwipeRootProps } from "./swipe-container"@@ -26,17 +27,22 @@ function DialogClose({ ...props }: DialogPrimitive.Close.Props) {function DialogOverlay({className,+ children,...props}: DialogPrimitive.Backdrop.Props) {return (<SwipeBackdropdata-slot="dialog-overlay"className={cn(- "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ appBackdropClassName,+ "fixed inset-0 z-50 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",className)}{...props}- />+ >+ <AppEdgeFade />+ {children}+ </SwipeBackdrop>)}diff --git a/src/web/src/components/ui/sheet.tsx b/src/web/src/components/ui/sheet.tsxindex 44ec3bfb4..59951f47c 100644--- a/src/web/src/components/ui/sheet.tsx+++ b/src/web/src/components/ui/sheet.tsx@@ -5,6 +5,7 @@ import { Drawer as SheetPrimitive } from "@base-ui/react/drawer"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"+import { AppEdgeFade, appBackdropClassName } from "./app-edge-fade"import { XIcon } from "lucide-react"import { SwipeRoot, SwipeViewport, SwipePopup, SwipeBackdrop, type SwipeRootProps } from "./swipe-container"import type { SwipeDirection } from "./swipe-gesture-policy"@@ -28,16 +29,20 @@ function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />}-function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {+function SheetOverlay({ className, children, ...props }: SheetPrimitive.Backdrop.Props) {return (<SwipeBackdropdata-slot="sheet-overlay"className={cn(- "fixed inset-0 z-50 bg-black/20 backdrop-blur-[2px] transition-[opacity,backdrop-filter] duration-200 ease-out data-ending-style:opacity-0 data-ending-style:backdrop-blur-none data-starting-style:opacity-0 data-starting-style:backdrop-blur-none",+ appBackdropClassName,+ "fixed inset-0 z-50 transition-[opacity,backdrop-filter] duration-200 ease-out data-ending-style:opacity-0 data-ending-style:backdrop-blur-none data-starting-style:opacity-0 data-starting-style:backdrop-blur-none",className)}{...props}- />+ >+ <AppEdgeFade />+ {children}+ </SwipeBackdrop>)}