refactor(FR-3279): make the router own 404 via scoped catch-alls and a route error boundary#8208
Conversation
…a route error boundary Resolves #8207 (FR-3279) Route existence was decided OUTSIDE the router: extractRoutePaths re-scanned the route tree into ROUTER_STATIC_PATHS / ROUTER_DYNAMIC_PATTERNS, useWebUIMenuItems.isCurrentPageNotFound re-parsed the pathname against that registry (+ menu keys + plugin pages), and MainLayout overrode the rendered Outlet with Page404. Three sources of truth that can drift — the FR-3057 cross-scope 404 bug was exactly such a drift. Now react-router matching IS the existence check: - each scope subtree (project / project-admin / admin) and the root carry a 'path: *' catch-all rendering the plugin-aware UnknownRoutePage: wait for the plugin list, stay empty for Lit plugin pages (they have no React routes), otherwise render the 404 page - delete the parallel registry (extractRoutePaths, populateRouterPaths, ROUTER_STATIC_PATHS, ROUTER_DYNAMIC_PATTERNS), isCurrentPageNotFound (incl. the FR-3057 cross-scope special case — router matching now handles it naturally), and the now-dead scopeFeatureToMenuKey inverse lookup - add RouteErrorBoundary on a pathless route inside MainLayout: thrown Response errors (404 / 401 / 403) from pages or future loaders render the shared route-error language INSIDE the shell; unexpected errors get a minimal notice - 401/blocked guards in MainLayout are untouched — access-control restructuring (route-handle-declared access + throwing guards) is a separate follow-up Net -204 lines. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
🟢 Dev server up — box
📝 열린 비주얼 코멘트 **0건**
|
| Tunnel | et -t "1356:1356" jongeun-calude-2 |
| Dev URL | https://routing-review.localhost:1356 |
| Backend | http://10.82.0.130:8090 |
| Login | not shown on a public repo — run registry.sh query 8208 |
| CA cert | registry/ca/jongeun-calude-2.pem |
Last updated: 2026-07-10T15:16:05Z · registry.sh query 8208 for details · via fw dev-server-registry

resolves #NNN (FR-MMM)
Checklist: (if applicable)