From f03f8a01b04177c222298d2bcac5bb8a4742a0ed Mon Sep 17 00:00:00 2001 From: Jake Date: Fri, 15 May 2026 09:07:10 +0100 Subject: [PATCH] =?UTF-8?q?v0.2=20Phase=208:=20full=20release=20gate=20?= =?UTF-8?q?=E2=80=94=20all=20checks=20green?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cargo fmt --check ✓ cargo clippy --workspace --all-targets -- -D warnings ✓ cargo test --workspace ✓ cargo nextest run --workspace ✓ 435/435 npm run check ✓ 0/0/5704 files npm test ✓ 13/13 (2 files) npm run test:browser ✓ 3/3 in Chromium npm run test:e2e ✓ 16/16 × 2 viewports npm run analyze ✓ reports/bundle-stats.html (1.7 MB) scripts/dogfood-rebrand-drill.sh ✓ 8/8 (sandbox) npm run guard:no-skeleton ✓ clean Two small Phase 8 corrections landed alongside the gate: vite.config.js: the jsdom suite was picking up `src/lib/ui/*.browser.test.ts`, which only works under the @vitest/browser-playwright provider. Added the browser-suffix glob to the jsdom suite's exclude list so the two runners stop double-running the same files. playwright.config.ts: bumped the global `expect.timeout` to 15 s. The cold first-compile of the Vite SPA tree was exceeding Playwright's default 5 s `toBeVisible` timeout on the 900x700 project on dogfood runs. The 1440x900 project (which runs second after a warm cache) never hit it. Phase 8 closes Phase-7 page migrations. Branch is ready for the finishing-a-development-branch handoff. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/release/v0.2-frontend-overhaul.md | 2 +- playwright.config.ts | 5 +++++ vite.config.js | 13 +++++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/release/v0.2-frontend-overhaul.md b/docs/release/v0.2-frontend-overhaul.md index 40c6b4d..5787060 100644 --- a/docs/release/v0.2-frontend-overhaul.md +++ b/docs/release/v0.2-frontend-overhaul.md @@ -214,7 +214,7 @@ Filled during execution. Each entry: phase #, date, what landed, what's next. | 7.8 /float | ✅ complete | +layout@.svelte already migrated in Phase 3 (KI-05 sync $effect retired). +page.svelte is a bespoke task panel (list pills, drag-and-drop, context menus); no high-value wrapper opportunities. | | 7.9 /viewer | ✅ complete | +layout@.svelte already migrated in Phase 3. +page.svelte is a bespoke transcript viewer with audio player — explicitly bespoke per §6.3. | | 7.10 /preview | ✅ complete | +layout@.svelte already migrated in Phase 3. +page.svelte is the Wayland-hardened transcription preview overlay — uses zero portaled primitives per the plan's hard rule. | -| 8 | in progress | Full release gate. | +| 8 | ✅ complete | Full release gate green: `cargo fmt --check`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace`, `cargo nextest run --workspace` (435/435), `npm run check` (0/0/5704), `npm test` (13/13 across 2 files), `npm run test:browser` (3/3 in Chromium), `npm run test:e2e` (16/16 across two viewports), `npm run analyze` → `reports/bundle-stats.html` (1.7 MB), `scripts/dogfood-rebrand-drill.sh` 8/8, `npm run guard:no-skeleton` clean. Browser-mode tests excluded from the jsdom suite via `vite.config.js` so the two runners don't double-run. Playwright `expect: { timeout }` lifted to 15 s for cold first-compile resilience. | ## 12. Bundle-size delta diff --git a/playwright.config.ts b/playwright.config.ts index cb68b8b..5819a80 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -15,6 +15,11 @@ export default defineConfig({ retries: process.env.CI ? 2 : 0, reporter: [["list"], ["html", { open: "never", outputFolder: "playwright-report" }]], outputDir: "test-results", + // Vite's first compile of the SPA tree can blow past the default 5s + // expect timeout on cold runs (especially on the 900x700 project, + // which fires before any module cache is warm). Bumping the global + // expect timeout avoids per-test {timeout: …} sprinkles. + expect: { timeout: 15_000 }, use: { baseURL: "http://localhost:1420", trace: "on-first-retry", diff --git a/vite.config.js b/vite.config.js index 171be5e..95d2758 100644 --- a/vite.config.js +++ b/vite.config.js @@ -53,8 +53,17 @@ export default defineConfig(async () => ({ // #[cfg(test)] sibling convention; no separate tests/ tree. include: ["src/**/*.{test,spec}.{ts,js}"], // Frontend tests must never reach into the Tauri backend; that surface - // is owned by `cargo test` in src-tauri/ and crates/. - exclude: ["src-tauri/**", "node_modules/**", "build/**", ".svelte-kit/**"], + // is owned by `cargo test` in src-tauri/ and crates/. v0.2 browser-mode + // component tests live under *.browser.{test,spec}.{ts,js,svelte} and + // are run by `npm run test:browser` against vitest.browser.config.js — + // exclude them from this jsdom suite so they don't double-run. + exclude: [ + "src-tauri/**", + "node_modules/**", + "build/**", + ".svelte-kit/**", + "src/**/*.browser.{test,spec}.{ts,js,svelte}", + ], // Restore a clean global state between tests — vitest's restoreMocks // unwinds vi.spyOn / vi.fn, clearMocks resets call history, and // unstubAllGlobals undoes vi.stubGlobal. Prevents accidental leakage