Repository navigation
#542 AC1: remove the React tree from next/svelte-webgpu - #587
Merged
MaximumTrainer merged 2 commits intoOct 25, 2026
Merged
MaximumTrainer merged 2 commits into
MaximumTrainer merged 2 commits into
Conversation
The Svelte + WebGPU port is at parity (PRs #581–#586). Everything the React/three.js shell owned is gone: `src/App.tsx`, `src/main.tsx`, `src/components/` (bar `routeMapProjection.ts` and the pure-TS scenery config / helpers that `src/lib/scenery/` and the Svelte UI still read), `src/hooks/`, `src/context/`, all 66 `*.tsx` tests and the handful of `*.ts` tests that only measured a React-era contract. The scenery `__tests__` were parity suites pinned on each React implementation, so they go too. Pure-TS modules under `src/components/rower3d/` that Svelte, `src/lib` or the renderer still import stay: `conditions`, `constants`, `crewModel`, `ghost`, `navigableWidth`, `rowerAppearance`, `sceneQuality`, `sceneryAssets`, `sceneryClearance`, `sceneryConfig`, `sceneryCrossings`, `sceneryRegion`, `sceneryTrack`, `segmentScenery`, `themeConfig`. They move into `src/lib/` in a later slice. Config fallout: * `index.html` — repo-root entry only existed to boot React; SvelteKit owns the HTML host via `src/app.html`. * `tsconfig.app.json` — `jsx: react-jsx` is dead with no `.tsx` left. * `tsconfig.playwright.json` — drops `renderBudget`/`strokePose` includes (and the two spec files that read them, which only ran on the React engine). * `eslint.config.js` — drops the react-hooks + react-refresh plugins. * `setupTests.ts` — drops the `@testing-library/jest-dom` shim; no preserved test uses its matchers. * `playwright.config.next.ts` — removes two deleted specs from the next-branch testIgnore. What stays for the follow-up: * `package.json` dependencies on `react`, `react-dom`, `@react-three/*`, `postprocessing`, `react-chartjs-2`, `@testing-library/react`, `@react-three/test-renderer`, `@types/react`, `@types/react-dom`, `@vitejs/plugin-react`, `eslint-plugin-react-hooks`, `eslint-plugin-react-refresh` — nothing in the surviving tree imports them, but ripping them out touches `package-lock.json` and deserves its own PR. Local gates: `tsc`, `eslint`, `vitest` (213 files · 2081 pass · 8 skip), `tsc -p tsconfig.playwright.json`, `svelte-check` (clean — remaining warnings are pre-existing node_modules + tsconfig composite notes). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5D9BTXmu7SeMa3LghJD8b
Removing the React tree is a measurement change on the same shape as `#542 P0`'s Vitest 1 -> 3 upgrade: the tests that only existed to pin the three.js scene went with the production code they covered, and the parity suites under `src/lib/scenery/__tests__/` that happened to count toward preserved files' per-file 100 floors are gone too. New measurement over the surviving tree: 89.11 / 89.11 / 85.77 / 90.66 (lines / statements / branches / functions). Floors land a point under each reading, following the "set a floor clear of its measurement so the gate stops answering 'did the last digit move'" rule the comments above these numbers have followed since #340. Also drops the per-file 100 floors for files that left with React — `wakeTexture.ts`, `foliageMaterial.ts`, the rower3d `landscapeLayout.ts` and `foliagePlan.ts`, the three R3F `*.tsx` wrappers — plus the `**/foliageTexture.ts` floor whose only remaining match (the Svelte `src/lib/scenery/foliageTexture.ts`) is at 15 % because its parity test left too. The engine-side test that owns its measurement re-lands with the renderer work it belongs to. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5D9BTXmu7SeMa3LghJD8b
MaximumTrainer
deleted the
claude/project-thread-lddi4g-ac1-react-removal
branch
October 25, 2026 16:16
This was referenced Oct 25, 2026
MaximumTrainer
added a commit
that referenced
this pull request
Oct 25, 2026
AC1 (PR #587) deleted every file in the surviving tree that imported React, React DOM, @react-three/*, @testing-library/react, the React testing renderer, @vitejs/plugin-react, the two React ESLint plugins, jest-dom's matcher shim, @shaderfrog/glsl-parser (the GLSL files it parsed left with the three.js scene), and `postprocessing` (reached only through the deleted `@react-three/postprocessing`). None of these packages are reachable any more — grepping the whole tree returns zero non-package imports. `react-chartjs-2` likewise: `chart.js` is used directly from one Svelte component now. Kept: `chart.js`, `maplibre-gl`, `meshoptimizer`, `supercluster`, `three` (still used by `src/components/rower3d/rowerAppearance.ts` and `src/components/rower3d/sceneryClearance.ts` plus their tests — `src/lib` is three-free, this is the last pocket) + the Svelte + testing + build devDependencies. `npm install` removed 110 packages. The audit count is unchanged (all open advisories are transitive through `maplibre-gl` / `supercluster`, not from this change). Local gates: `lint`, `tsc`, `tsc -p tsconfig.playwright.json`, `vitest` (213 files · 2081 pass · 8 skip) all green. Claude-Session: https://claude.ai/code/session_01Q5D9BTXmu7SeMa3LghJD8b Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the last code AC on the epic before the P9/P10 cutover: deletes the React/three.js tree now that the Svelte + WebGPU port is at parity (PRs #581–#586).
Gone:
src/App.tsx,src/main.tsx,src/components/*.tsx(29 root-level),src/components/rower3d/*.tsx+ their three.js-dependent.tshelpers (71 files total),src/hooks/(19 React hooks),src/context/(Auth + Services + their consumers), 66*.tsxtests + the handful of*.tstests that only measured a React-era contract. The six parity suites undersrc/lib/scenery/__tests__/were pinned to each React implementation, so they go too. The repo-rootindex.htmlwas only there to bootsrc/main.tsx— SvelteKit owns the HTML host viasrc/app.html. Two Playwright specs that read deleted modules (route-performance-budgets,rower-stroke) leave with them; the engine-side equivalents re-land with the GPU-runner work in #548/#584 territory.Kept (Svelte/
src/lib/renderer still import them, as pure TS):routeMapProjection.ts, and undersrc/components/rower3d/—conditions,constants,crewModel,ghost,navigableWidth,rowerAppearance,sceneQuality,sceneryAssets,sceneryClearance,sceneryConfig,sceneryCrossings,sceneryRegion,sceneryTrack,segmentScenery,themeConfig. Those relocate intosrc/lib/in a later slice.Config fallout:
tsconfig.app.jsondropsjsx: react-jsx(no.tsxleft);tsconfig.playwright.jsondrops therenderBudget/strokePoseincludes (and the two spec files that read them);eslint.config.jsdrops the react-hooks + react-refresh plugins;setupTests.tsdrops the@testing-library/jest-domshim (no surviving test uses its matchers);playwright.config.next.tsdrops the two deleted specs from the next-branch testIgnore.Coverage (second commit on the branch,
#542 AC1: re-base coverage floors after the React sweep): removing the React tree is a measurement change on the same shape as#542 P0's Vitest 1 → 3 upgrade. New reading over the surviving tree is 89.11 / 89.11 / 85.77 / 90.66 (lines / statements / branches / functions); floors land a point under each, per the "clear of the measurement" rule the comments invitest.config.tshave followed since #340. The per-file 100 floors on the deleted scene helpers are dropped; the engine-side tests that take over their measurement re-land with the renderer work they belong to.Follow-up PR (not this one): package.json dep cleanup —
react,react-dom,@react-three/*,postprocessing,react-chartjs-2,@testing-library/react,@react-three/test-renderer,@types/react,@types/react-dom,@vitejs/plugin-react,eslint-plugin-react-hooks,eslint-plugin-react-refresh. Nothing in the surviving tree imports them, but ripping them out touchespackage-lock.jsonand deserves its own review.Local gates all green:
tsc,eslint,vitest(213 files · 2081 pass · 8 skip),tsc -p tsconfig.playwright.json,svelte-check(clean modulo pre-existing node_modules esrap + tsconfig composite warnings),vitest --coverageunder the re-based thresholds.Test plan
next/svelte-webgpuGPU_RUNNER_LABEL)npm run dev+npm run buildstill boot the Svelte apppackage.jsononce this landsGenerated by Claude Code