No catchall route for unknown URLs — visiting /garbage or /workspace/foo renders a blank main area (Navbar still shows, main is empty) #154
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
The app has 5 React routes (
/,/workspace,/editor,/gallery,/help) defined insrc/App.tsx. There is no catchall route. Visiting a path that doesn't match any defined route (e.g./garbage,/workspace/foo,/editor/123) renders nothing — theRoutescomponent returnsnullfor unmatched locations.Verified:
grep -rn 'Route.*\*\|NotFound\|404\|catchall\|catchAll' src/returns no matches outside of test fixtures.A user who mistypes a URL, follows a stale bookmark, or clicks a misconfigured link gets a blank page with no nav, no error, and no recovery. The Navbar still renders, so they can click "Workspace" or "Gallery" to get back, but the page area is empty.
Where
src/App.tsx:9-17Suggested fix shape
Add a catchall
<Route path="*">tosrc/App.tsxthat renders aNotFoundpage (or inlines a simple component):The
NotFoundpage should:/This is a small new component, ~50 lines, plus one route line in App.tsx. The catchall should render inside the existing
Layoutso the Navbar/Footer are present, giving the user a way to recover without using the browser back button.Severity
Medium. The navbar still renders so the user can navigate, but a blank main area is bad UX. The fix is small.
Discovered by
Gap analysis (2026-10-02) of app routing.
Related
Fixed in
004adae0a9— added catchall route + NotFound page.What changed:
src/pages/NotFound.tsx(135 lines): 404 page with bad-path echo, "Back to Home" button, quick-nav to Workspace/Gallery/Help, and a "Go back" link to the previous same-origin page when one exists. Lives inside the existing Layout so the Navbar/Footer stay visible for recovery without the browser back button. Mirrors the dark hero / gold-accent design language of Help.tsx.src/App.tsx:<Route path="*">appended after the five named routes, also wrapped in its own<RouteBoundary scope="NotFound">for consistency with the error-boundary structure added in #153.src/pages/NotFound.test.tsx: 6 tests covering catchall rendering, bad-path echo (path + query + hash), Back-to-Home link target, ordering guard so the named routes still win, sub-paths like/editor/123hitting the catchall, and keyboard focus.Verification:
vitest run→ 648/648 passed (was 630 before the rebased #153 + the 6 new tests for this fix).eslint .clean.tsc -b --noEmitclean. Rebased onto origin/main (which picked up #153), pushed:85d342f..004adae.Closing this issue — the catchall is live on main.