Skip to content

feat(gui): cut over to Svelte 5, remove React (#221) - #229

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/svelte-cutover
Jun 27, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/svelte-cutover

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Closes #221. The cutover — flips the shipped app to Svelte and removes React. This is the final slice of epic #214; with it merged, the React→Svelte 5 migration is complete.

What changed

  • Entry flipped to Svelte: index.html now mounts src/main.svelte.ts (#svelte-root); the dev-only index.svelte.html and src/main.tsx are gone.
  • React deleted: every .tsx/.test.tsx (67 files), src/hooks/, src/stores/ (Zustand), src/contexts/, src/layouts/, the RTL integration tests, and the orphaned lib/fileOperations.ts.
  • 10 packages removed: react, react-dom, zustand, lucide-react, react-zoom-pan-pinch, @hello-pangea/dnd, @testing-library/react, @types/react, @types/react-dom, @vitejs/plugin-react.
  • Toolchain: vite.config.ts / vitest.config.ts drop the react() plugin (keep svelte() + svelteTesting()); tsconfig.json drops the dead jsx setting. Three framework-agnostic files were decoupled from deleted modules (tests/setup.ts, lib/numericFields.ts, lib/streamFeedback.ts).
  • Docs + ADR: a new migration ADR, an updated overview.md + 9 secondary architecture/guide docs (React→Svelte), a CHANGELOG entry, and the bundle baseline reset to the new reality.

Final metrics (vs the React baseline)

Metric React Svelte Δ
Production code 8,712 TS/TSX 6,031 (2,709 Svelte + 3,322 TS) −31%
Tests 7,695 4,572 −41%
Frontend deps 28 22 −10 React pkgs
Production JS bundle 599 KB 308 KB −48%

Verification

  • Local gate green: tsc (clean), svelte-check (0/0), 362 vitest tests, coverage 80.5/70.3/81.1/85.7 (> 60/50/65/60), stylelint, lint:css:vars, vite build (→ 308 KB), bundle budget (vs the new 308 KB baseline).
  • Zero React remains in src/ or package.json.
  • Verified in-browser: the production entry (/ → index.html) renders the full Svelte app (Prepare/Machine workspaces, forms, viewport, layers, dialogs, CLI banner, status bar).
  • Adversarially reviewed (final-cutover deep pass: leftover-React grep, broken-import check, entry/dist/index.html correctness, docs).

Notes for reviewers

  • No change to the Python backend, the OpenAPI contract, or the Rust/Tauri shell.
  • The shipped app moves from React to Svelte in this single reviewable, reversible commit.
  • Known minor follow-ups (adversarially flagged, harmless, left for a cleanup pass): a few dead React-era exports remain — types/converters.ts windDefinitionToProject (superseded by windDefinitionToDocument) and the unused prop-type aliases in types/components.ts.

Closes #221. Completes #214.

Closes #221. Completes the React->Svelte 5 migration (epic #214). Flips the
shipped app to Svelte and removes React entirely.

- Entry: index.html now mounts src/main.svelte.ts (#svelte-root); the dev-only
  index.svelte.html and src/main.tsx are gone.
- Deleted all React source: every .tsx/.test.tsx (67 files), src/hooks/,
  src/stores/ (Zustand), src/contexts/, src/layouts/, the RTL integration tests,
  and the orphaned lib/fileOperations.ts.
- Removed 10 packages: react, react-dom, zustand, lucide-react,
  react-zoom-pan-pinch, @hello-pangea/dnd, @testing-library/react, @types/react,
  @types/react-dom, @vitejs/plugin-react (and the unused @testing-library/user-event).
- Toolchain: vite/vitest drop the react() plugin (keep svelte() + svelteTesting());
  tsconfig drops the dead jsx setting. Decoupled tests/setup.ts, lib/numericFields.ts
  and lib/streamFeedback.ts from the deleted modules.
- Docs: new migration ADR (+ nav + overview link), updated overview + 9 secondary
  docs (React->Svelte), a CHANGELOG entry, and the bundle baseline reset to ~308 KB.

Final metrics vs the React baseline: production code 8,712 -> 6,031 LoC (-31%),
tests 7,695 -> 4,572 (-41%), frontend deps -10 packages, production JS bundle
599 KB -> 308 KB (-48%). Fixes #147 (shipped earlier in the viewport rewrite).

362 tests; tsc + svelte-check clean; coverage 80.5/70.3/81.1/85.7. dist/index.html
mounts Svelte. Adversarially reviewed (zero surviving React; final-cutover pass).

Closes #221. Completes #214.
@CameronBrooks11 CameronBrooks11 added the gui Pull requests that update GUI components label Jun 27, 2026
@CameronBrooks11
CameronBrooks11 merged commit 6501403 into main Jun 27, 2026
18 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/svelte-cutover branch June 27, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gui Pull requests that update GUI components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cutover: remove React, swap toolchain, docs/ADR, merge to main

1 participant