From 399e3a6b53ceb2ae8459d8bbf6fb283390d45368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 3 Oct 2026 23:53:30 -0400 Subject: [PATCH] =?UTF-8?q?Rendering=20=C2=B7=20web:=20the=20RenderSurface?= =?UTF-8?q?=20story=20runs=20live;=20an=20e2e=20test=20holds=20that=20the?= =?UTF-8?q?=20slider=20redraws=20its=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TASKS.md | 2 +- frontend/e2e/live.spec.ts | 16 ++++++++++++++++ tasks/reviews.md | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/TASKS.md b/TASKS.md index ffcac9d..f717ebf 100644 --- a/TASKS.md +++ b/TASKS.md @@ -181,7 +181,7 @@ Per-component lines live in `tasks/`. Tags there: - [x] T50a Rendering · Plan: chapter 44 in the PRD, `tasks/ch44.md`, these lines - [x] T50b Rendering · Surface: `rendering::RenderSurface`, tested — `tasks/ch44.md` - [x] T50c Rendering · Gallery: a Rendering page, its story, `stories.json`; the gallery runs on Linux -- [ ] T50d Rendering · Web: the story runs live on the site from the wasm gallery, checked in a browser +- [x] T50d Rendering · Web: the story runs live on the site from the wasm gallery, checked in a browser - [ ] T50e Rendering · Platforms: CI builds and tests the crate on Linux, macOS and Windows, arm64 and x86_64 - [ ] T50f Rendering · Docs: a guide with an example `scripts/check.sh` compiles; AGENTS.md - [ ] T50g Rendering · Acceptance: the checklist, item by item diff --git a/frontend/e2e/live.spec.ts b/frontend/e2e/live.spec.ts index eb480b2..60905c8 100644 --- a/frontend/e2e/live.spec.ts +++ b/frontend/e2e/live.spec.ts @@ -90,6 +90,22 @@ test("typing reaches a live field after a press", async ({ page, isMobile }) => await expect.poll(() => ink(page, text)).toBeGreaterThan(30); }); +test("a render surface draws again when its slider moves", async ({ page, isMobile }) => { + test.skip(isMobile, "no hardware keyboard"); + await page.emulateMedia({ colorScheme: "light" }); + await live(page, "/components/rendering/rendersurface/"); + const box = (await page.locator(".live iframe").boundingBox())!; + // Inside the field, below the note and above the slider, as the gallery lays them. + const field = { x: box.x + 24, y: box.y + 100, width: 720, height: 330 }; + // Ready can come a frame before the field paints. + await expect.poll(() => ink(page, field)).toBeGreaterThan(2000); + const before = await ink(page, field); + await page.mouse.click(box.x + 2, box.y + 2); + await page.keyboard.press("Tab"); + await page.keyboard.press("End"); + await expect.poll(() => ink(page, field)).not.toBe(before); +}); + test("full screen covers the page and Escape leaves it", async ({ page }) => { await live(page, "/components/buttons/button/"); await page.locator(".live").hover(); diff --git a/tasks/reviews.md b/tasks/reviews.md index 4013b76..f810aca 100644 --- a/tasks/reviews.md +++ b/tasks/reviews.md @@ -354,3 +354,4 @@ | T50a | 1 | PASS | codex gpt-6.1-sol max | | T50b | 1 | PASS | | | T50c | 1 | PASS | the gallery's missing non-macOS post_scroll stub added | +| T50d | 1 | PASS | the e2e test failed against a gallery whose surface never redraws |