mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
simplify pass. `v2/router/routes.ts` hand-maintained 34 route-name string literals and a comment saying ROUTES could not be imported without a cycle. `routeNames.ts` is a leaf, so that constraint is gone: key the registry off ROUTES and type it with the new `RouteName`, which turns a mistyped key into a compile error instead of a silent fall-through to the 404 view. Drop the unreachable chunk-load guard in the 401 interceptor: `main.ts` imports the router statically, so it is in the entry chunk and the dynamic import resolves from memory. Restate why that import is lazy. Take `SimpleRom` instead of re-narrowing it, reuse the import specifier already in `router.ts`, drop `circular: true` (already the default), and inline the test roms so the factory is not duplicated across two files. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>