1.6 KiB
1.6 KiB
Implementation Plan
- Add Vite, React 19, TypeScript, Tailwind/shadcn/ui dependencies and scripts; establish
tsconfig, Vite config, aliases, CSS variables, and production output location. - Define typed API/state contracts and a fetch client from the existing
/api/*payloads; add focused serialization tests. - Build the OpenLayers adapter and
useOpenLayersMaphook. Port the current layer registry, styles, source updates, selection interaction, fit behavior, and cleanup tests before moving inspector UI. - Port the import-first flow and shell/layout to React, then migrate layer controls, summaries, diagnostics, road inspector, connection editor, centerline editor, signal editor, and save/compile actions.
- Replace the server's legacy
/app.js//app.cssproduction serving with Vite build output while retaining a compatibility path only where needed for rollback. - Remove the old DOM-driven entry after parity is demonstrated; keep OpenLayers vendor serving only if legacy mode still needs it.
- Add browser/component smoke coverage for no-session import, active-session map render, a road selection/edit, and compile/export request wiring.
- Run
npm run build, frontend tests, existingnpm test, and a manual workbench smoke check at desktop/mobile widths; fix parity regressions.
Validation commands:
npm run buildnpm run format:check- frontend test command added by this task
npm testnode --check workbench/server.js
Rollback point: retain the legacy client in a separate compatibility path until the React build serves the same API workflow and OpenLayers interaction checks pass.