Skip to content

Phase 5-7 complete#191

Open
jdpigeon wants to merge 9 commits intomodernizationfrom
modernization-2026
Open

Phase 5-7 complete#191
jdpigeon wants to merge 9 commits intomodernizationfrom
modernization-2026

Conversation

@jdpigeon
Copy link
Contributor

@jdpigeon jdpigeon commented Mar 8, 2026

  • Phase 1: Replaced Jest with Vitest; added build integration test and App sanity test (24 tests total)
  • Phase 2: Removed connected-react-router; upgraded to React Router v6 — HashRouter, Routes/Route element={} syntax, withRouter HOC for class components, RouteChangeTracker replaces @@router/LOCATION_CHANGE in epics
  • Phase 3: Upgraded Pyodide target to v0.27.0; rewrote plot_conditions() in utils.py replacing deprecated sns.tsplot with matplotlib mean + fill_between CI bands
  • Phase 4: Replaced all 26 semantic-ui-react imports with Tailwind CSS v4 + Shadcn/ui (Button, Card, Dialog); removed semantic-ui-css/semantic-ui-react packages entirely
  • Phase 5: TypeScript clean — proper RootState typing in all containers, canonical withRouter HOC, History → { push } interface in class component Props

Test Plan

  • npm test — 24/24 Vitest tests pass
  • npm run typecheck — TypeScript clean
  • npm run build — Electron build succeeds
  • grep -r "semantic-ui-react" src/ — zero results

Dano and others added 9 commits March 7, 2026 14:48
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Installs Vitest, @testing-library/react, jest-dom, jsdom
- Creates vitest.config.ts with jsdom environment
- Adds App.test.tsx sanity test and tests/build.test.ts integration test
- Updates package.json: vitest scripts, removes jest config block
- Updates CI workflow to run npm test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Uninstalls connected-react-router; upgrades react-router-dom to v6
- Removes router reducer from Redux store and RootState
- Replaces ConnectedRouter with HashRouter in Root.tsx
- Adds RouteChangeTracker component to replace @@router/LOCATION_CHANGE
- Adds RouteChanged action to ExperimentActions
- Creates withRouter HOC for class components needing navigate
- Updates all containers (Home, Design, Collect) with withRouter HOC
- Updates TopNavBarContainer to inject useLocation instead of router state
- Updates autoSaveEpic and navigationCleanupEpic to use RouteChanged action
- Adds store.test.ts and routing.test.tsx (7 tests passing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Updates InstallPyodide.js from v0.21.0 to v0.27.0 with correct URL format
- Rewrites plot_conditions() in utils.py: replaces sns.tsplot (removed in
  seaborn 0.10) with plt.plot + fill_between for mean ± SEM confidence bands
- Removes all seaborn dependencies from plot_conditions; uses matplotlib only
- Adds tests/pyodide.test.ts verifying setup correctness (5 tests)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Installs Tailwind CSS v4 (via @tailwindcss/vite), class-variance-authority,
  clsx, tailwind-merge, lucide-react
- Creates Shadcn/ui components: Button, Card, Dialog in src/renderer/components/ui/
- Creates cn() utility at src/renderer/utils/cn.ts
- Migrates all 26 semantic-ui-react consumers to plain HTML + Tailwind classes
- Removes semantic-ui-css @import from app.global.css
- Uninstalls semantic-ui-react and semantic-ui-css
- Removes connected-react-router overrides from package.json
- Adds tests/ui_components.test.tsx (8 tests) and tests/ui_migration.test.tsx (6 tests)
- All 24 tests pass; build succeeds with no errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- routes.tsx: cast Redux-connected containers through unknown to ComponentType
  to satisfy TypeScript without enumerating all Redux-mapped props at the route level
- All 24 Vitest tests pass
- TypeScript typecheck clean
- Build succeeds with no errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tory cleanup

- Rewrites withRouter HOC to use P extends object pattern (canonical RR v6 form)
- Types mapStateToProps with RootState in all containers (Home, Design, Collect,
  Clean, Analyze) for proper state access typing
- Provides nullable defaults (psdPlot, topoPlot, erpPlot, connectedDevice, params)
  at the container boundary so component props receive non-nullable values
- Replaces `history: History` (react-router v5) with `{ push: (path) => void }`
  in all class component Props interfaces — components only use push
- Documents connect()+withRouter inference limitation in routes.tsx comments
- All 24 tests pass; typecheck clean; build succeeds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant