Skip to content

#542 AC2: fix the six Svelte-port gaps surfaced by e2e-shards - #583

Merged
MaximumTrainer merged 1 commit into
next/svelte-webgpufrom
claude/project-thread-lddi4g-ac2-fixes
Oct 25, 2026
Merged

MaximumTrainer merged 1 commit into
next/svelte-webgpufrom
claude/project-thread-lddi4g-ac2-fixes

Conversation

@MaximumTrainer

Copy link
Copy Markdown
Owner

Summary

Six Playwright spec files were in the next-branch e2e-shards ignore list
(added by #582) because the Svelte port had regressed from the React
originals. All six are fixed here, and the ignore list shrinks back to
the WebGL-era + engine-only exclusions.

Root causes & fixes

  1. No telemetry boot in the Svelte app. main.tsx called
    startTelemetry() before any render and checkBootCrash() right
    after, plus wired the __VIRTUALROW_SIMULATE_BOUNDARY__ test seam.
    The Svelte +layout.svelte skipped all three — so sessionStorage
    never carried a run-start event, and crashBoot never reported a
    prior crash. The layout now runs the same boot sequence in its
    top-level script.

  2. .rower3d-canvas-container disappeared under the "needs WebGPU"
    screen.
    The AC11 "unavailable" branch replaced the entire stage, so
    specs that assert on .rower3d-canvas-container after
    .btn-try-demo (crash-detection, crash-telemetry) raced a 30 s wait
    against a container the engine's decline had already removed. The
    stage is now always mounted when a session is active, and
    <WebGpuUnsupported> sits on top as an overlay — same UX, container
    still queryable.

  3. window.__SELECTED_ROUTE declared but never assigned. App.tsx
    published it from a useEffect([selectedRoute]) under
    __PLAYWRIGHT_TESTING; the Svelte RoutesStore now does the same
    from its one #select assignment point, covered by two new tests.

  4. VITE_INTERVALS_CLIENT_ID missing from next-branch-ci.yml. The
    main workflow sets VITE_INTERVALS_CLIENT_ID: playwright-e2e-client;
    without it, getClientId() throws and exchangeCode's catch tags
    every failure as the network class — so every auth alert-copy /
    data-auth-error-class test fails identically. The e2e-shards job
    env block now matches the main workflow, and LIBGL_ALWAYS_SOFTWARE=1
    lets the leaflet / MapLibre WebGL layer still render through
    SwiftShader.

Specs re-enabled (17 tests, 6 files)

  • auth.spec.ts
  • intervals-login-failure.spec.ts
  • rownative-track-attach.spec.ts
  • crash-detection.spec.ts
  • crash-telemetry.spec.ts
  • login-integration.spec.ts

Test plan

  • Full unit suite green (3634 / 3634 passing locally).
  • tsc -p tsconfig.app.json --noEmit clean.
  • npm run lint clean.
  • Two new tests in routesStore.svelte.test.ts cover the
    __SELECTED_ROUTE publish under / without __PLAYWRIGHT_TESTING.
  • e2e-shards 1/2 and (2/2) on this PR run the six re-enabled
    spec files and go green.

Generated by Claude Code

Six Playwright spec files were in the next-branch e2e-shards ignore list
because the Svelte port had regressed from the React originals. All six
are fixed here, and the ignore list shrinks back to the WebGL/engine-only
exclusions.

Root causes

  * No telemetry boot in the Svelte app. `main.tsx` called `startTelemetry()`
    before anything rendered and `checkBootCrash()` right after, plus wired
    the `__VIRTUALROW_SIMULATE_BOUNDARY__` test seam. The Svelte layout
    skipped all three, so `sessionStorage` never carried a `run-start`
    event, and `crashBoot` never reported a prior crash. +layout.svelte now
    performs the same boot sequence in its top-level script (same order as
    `main.tsx`), guarded by `typeof window !== 'undefined'` since the
    layout script runs on module evaluation.

  * `.rower3d-canvas-container` disappeared under the "needs WebGPU"
    screen. The AC11 "unavailable" branch replaced the entire stage, so
    specs that assert on `.rower3d-canvas-container` after
    `.btn-try-demo` (crash-detection, crash-telemetry) raced a 30 s wait
    against a container the engine's decline had already removed from the
    DOM. The stage is now always mounted when a session is active, and
    the WebGpuUnsupported screen sits on top as an overlay — same user
    experience, container still queryable.

  * `window.__SELECTED_ROUTE` was declared in the shared types but never
    assigned. App.tsx published it from a `useEffect([selectedRoute])`
    under `__PLAYWRIGHT_TESTING`; the Svelte RoutesStore now does the
    same from `#select`, which is the one assignment point. Covered by
    two new tests on RoutesStore.

  * No `VITE_INTERVALS_CLIENT_ID` in next-branch-ci.yml. The main
    workflow sets `VITE_INTERVALS_CLIENT_ID: playwright-e2e-client`;
    without it, `getClientId()` throws at build time's first dereference
    and `exchangeCode`'s catch block tags every failure as the `network`
    class, so every alert copy / `data-auth-error-class` test fails. The
    `e2e-shards` job env block now matches the main workflow, and
    `LIBGL_ALWAYS_SOFTWARE=1` lets the leaflet map's WebGL layer still
    render through SwiftShader.

Specs re-enabled

Six spec files (17 tests) come back out of the testIgnore list:

  * auth.spec.ts
  * intervals-login-failure.spec.ts
  * rownative-track-attach.spec.ts
  * crash-detection.spec.ts
  * crash-telemetry.spec.ts
  * login-integration.spec.ts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5D9BTXmu7SeMa3LghJD8b
@MaximumTrainer
MaximumTrainer merged commit b32f746 into next/svelte-webgpu Oct 25, 2026
6 checks passed
@MaximumTrainer
MaximumTrainer deleted the claude/project-thread-lddi4g-ac2-fixes branch October 25, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants