* studio/frontend: friendlier 404 fallback for unknown routes TanStack Router defaults to a bare "Not Found" string when no route matches. With Studio's root layout that string sits alone in the main content area while the sidebar still renders, which looks broken when the user hits a typo'd path, a stale share link, or a chat URL with an extra path segment. Provide a small DefaultNotFound component to createRouter: sloth mascot, "Page not found" heading, the offending pathname, and a Back to chat button. Studio chrome continues to render around it, so the user gets the same sidebar nav for free. Resolves #5663. * studio/frontend: 404 fallback uses useRouterState + URL-encoded sloth path Address review feedback on #5664: - Read pathname via useRouterState({ select: s => s.location.pathname }) instead of window.location.pathname. Matches the pattern already used in __root.tsx, drops the window-typeof guard, and stays consistent with the router store on subsequent client navigations. - URL-encode the sloth mascot src so the space-containing path resolves cleanly without relying on the browser to encode it. - Add break-all on the pathname paragraph so long offending URLs wrap instead of pushing the card wider than the viewport. --------- Co-authored-by: danielhanchen <michaelhan2050@gmail.com> |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| package-lock.json | ||
| package.json | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||