diff --git a/frontend/src/components/WatchPage.dom.test.tsx b/frontend/src/components/WatchPage.dom.test.tsx index 74ef5eff..15951517 100644 --- a/frontend/src/components/WatchPage.dom.test.tsx +++ b/frontend/src/components/WatchPage.dom.test.tsx @@ -84,6 +84,27 @@ describe("WatchPage action row", () => { expect(repeat.className).toContain("h-7"); expect(download.className).toContain("h-7"); }); + + // E28 S3d4 (B6): the page the stranger sees wears the app's surfaces — the scheme's ambient + // backdrop (no page fill over the body's), the title and actions on a glass panel, a glass Download. + it("sits on the app's surfaces: backdrop, a glass panel, a glass Download", async () => { + window.history.replaceState({}, "", "/watch/tok-b6"); + mockMeta({ + needs_password: false, + audio: false, + allow_download: true, + file_url: "/f.mp4", + title: "A clip", + }); + const view = render(); + const title = await view.findByRole("heading", { name: "A clip" }); + expect((view.container.firstElementChild as HTMLElement).className).not.toMatch( + /(^|\s)bg-bg(\s|$)/, + ); + expect(title.closest(".glass")).toBeTruthy(); + const download = view.container.querySelector('a[href="/f.mp4"]')!; + expect(download.className).toContain("glass-card"); + }); }); describe("WatchPage media element (S3 · 5a)", () => { diff --git a/frontend/src/components/WatchPage.tsx b/frontend/src/components/WatchPage.tsx index 20f9171c..3173d002 100644 --- a/frontend/src/components/WatchPage.tsx +++ b/frontend/src/components/WatchPage.tsx @@ -230,7 +230,8 @@ export default function WatchPage() { }; return ( -
+ // No page fill of its own (B6): the body's ambient scheme backdrop shows through, as in the app. +
@@ -364,13 +365,13 @@ export default function WatchPage() { loop={repeat} src={meta.file_url} poster={meta.poster_url || undefined} - className="max-h-[80vh] max-w-full mx-auto block" + className="max-h-[80dvh] max-w-full mx-auto block" />
)} {/* The actions wrap under the title when the row is too narrow for both (a phone), rather than squeezing the title into a column a word wide. */} -
+

{meta.title || "Video"} @@ -403,7 +404,7 @@ export default function WatchPage() { {/* The toolbar rung, level with the Repeat chip beside it (one row, one height). */} {meta.allow_download && ( - } size="sm"> + } size="sm" variant="glass"> {T.download} )}