Repository navigation
feat(template): add a not-found page for unknown routes - #698
Open
pffigueiredo wants to merge 2 commits into
Open
pffigueiredo wants to merge 2 commits into
pffigueiredo wants to merge 2 commits into
Conversation
The template's router has no catch-all route, so any path outside the plugin pages renders React Router's built-in "Unexpected Application Error! 404 Not Found" page, which in development also asks for an ErrorBoundary. A catch-all route inside the layout now renders a "Page not found" page that keeps the header and nav and links back home. Signed-off-by: Pedro Figueiredo <[email protected]>
pffigueiredo
requested review from
MarioCadenas,
atilafassina and
calvarjorge
October 29, 2026 11:32
Signed-off-by: Pedro Figueiredo <[email protected]>
Contributor
🤖 AppKit PR bot🔬 Run evalsStart an eval for this PR from the evals-monitor app: Go to Evals Monitor → 📦 Try this PR's app templateScaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh run download 40867517677 -R databricks/appkit -n appkit-template-0.89.0-pr.2e1c3b9-template-not-found-page-698 -D appkit-pr-698 \
&& unzip -o "appkit-pr-698/appkit-template-0.89.0-pr.2e1c3b9-template-not-found-page-698.zip" -d "appkit-pr-698" \
&& databricks apps init --template "appkit-pr-698"The template pins |
This branch has not been deployed
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.
Why
The template's router lists
/and one route per enabled plugin, with no catch-all. Any other path, such as a mistyped URL or a link to a page the app doesn't have, renders React Router's built-in error page: "Unexpected Application Error! 404 Not Found". In development it also adds a "Hey developer" note asking for anErrorBoundaryorerrorElement. App Builder runs the app in development mode in its preview, so builders have hit that page there.What
A
*route insideLayout, after the plugin routes, renders a newNotFoundPage. The page is built from appkit-ui'sEmptystate components, keeps the header and nav, shows the path that didn't match, and links back to/with the template'sButton.Notes:
App.tsx.ErrorBoundary. Fixing that needs anerrorElement, which is a separate change.tools/generate-app-templates.tscarries the change to them.Screenshots
Testing
pnpm exec tsx tools/smoke-test-template.ts --package-manager pnpm --runpassed: scaffold, lint, build, and serve./does-not-existin Chrome. The page renders inside the layout, and "Back to home" navigates to/.pnpm check: formatting clean.