feat(routing): add client-side SPA routing with React Router v8 - #133
Open
b-cedrick wants to merge 1 commit into
Open
feat(routing): add client-side SPA routing with React Router v8#133b-cedrick wants to merge 1 commit into
b-cedrick wants to merge 1 commit into
Conversation
b-cedrick
force-pushed
the
feat/spa-routing
branch
from
July 24, 2026 16:22
e8daa52 to
66d0c3f
Compare
Replace Dashboard conditional rendering with React Router v8 (Data mode). Every page and every selectable resource gets its own URL — /projects/:id, /discussions/:id, /planning/:taskId, /plugins/:configId, /workflows/:id/runs/:runId, /workflows/qp/:qpId, /workflows/qa/:qaId, /config — enabling deep-links, browser back/forward, and refresh that keeps the open view. - router.tsx is a pure route table; route components live in routes/lazyRoutes.tsx (fast-refresh boundary, per-route code splitting: Dashboard chunk 949 KB → ~430 KB) and routes/* wrappers bridge outlet context + URL params to page props. - Navigation goes through the typed useKronnNavigate() hook; one-shot intents (auto-run, batch focus, workflow presets) travel as location state so a refresh never re-triggers them. - Planning task selection is URL-driven (/planning/:taskId is the single source of truth for the open detail). - Every discussion selection path syncs the URL (sidebar, batch triage, contact chat, join-by-code, plan panel). - The CLI's legacy #project-<id> hash deep-link redirects to the canonical /projects/:id route; the kronn CLI now emits the canonical URL directly. - ESLint warning budget restored (161/162, exit 0). - Docs, glossary, AGENTS §9, repo-map, testing notes and CHANGELOG aligned with the routing model; stale comments fixed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Cédrick BARO <baro.cedrick@gmail.com>
b-cedrick
force-pushed
the
feat/spa-routing
branch
from
July 27, 2026 21:31
66d0c3f to
cf4e421
Compare
b-cedrick
marked this pull request as ready for review
July 27, 2026 22:07
Collaborator
🔍 Review — SPA routing (React Router v8)Migration propre et cohérente : Rien de bloquant. Quelques points mineurs :
ℹ️ CI : les 2 checks non-« passed » sont skipped (label-gated), pas des échecs. |
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
Add client-side SPA routing with React Router v8 (Data mode), replacing Dashboard's conditional rendering. Every page and every selectable resource gets its own URL — deep-links, browser back/forward, and refresh keep the open view.
/projects/:projectId?/discussions/:discussionId?/planning/:taskId?/plugins/:configId?/workflows,/workflows/:id/runs/:runId,/workflows/qp/:qpId?,/workflows/qa/:qaId?/configChanges
react-routerv8;createBrowserRouter+RouterProviderinmain.tsx;router.tsxstays a **pure routlive inroutes/lazyRoutes.tsx(valid fast-refresh boundary, per-route code splitting: Dashboard chunk 949 KB → ~430 KB- Route wrappers (src/routes/,Route) bridge outlet context +URL params to page props; Dashboard becomes a layout shell rendering`useKronnNavigate()hooncy; one-shot intents (auto-run,batch focus, workflow presets) travel as location state so refresh never re-triggersmainmid-branch):/planning/:taskIdis the single source of truth for the open task — selection navigateduplicated state#project-<id>redirects to the canonical/projects/:id(validated + scrolled); thekronnCLI now elypnpm lint --max-warnings 162exits 0[src:]citation repointed,CHANGELOG [Unreleased]entry addedTest plan
npx tsc --noEmit— 0 errorspnpm test --run— **2772harness rewrites, URL assertionsviarouter.state.location.pathname, hash-redirect pins, Planning URL-driven selection)pnpm build— per-route cRoute`frontend/nginx.conftry_files(Docker) + Vite default (dev)pnpm test:e2e) — specs unchanged, URL assertions to add in a follow-upChecklist