fix: gate dev-error routes centrally and exclude from breadcrumbs#662
Merged
robertocarlous merged 1 commit intoJul 26, 2026
Merged
Conversation
- Add dev-errors/layout.tsx as single NODE_ENV gate (replaces 3 per-page notFound() guards) - Filter devOnly routes from buildBreadcrumbsFromPath() so /dashboard/dev-errors/... no longer shows in breadcrumb navigation - Add breadcrumb test verifying devOnly segments are skipped - Command palette and sidebar nav already excluded devOnly routes - Playwright smoke tests unchanged (URLs preserved)
|
@sammajayi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
4 tasks
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.
Closes #331
Summary
Dev error-boundary test pages under
/dashboard/dev-errorswere individually guarded but still appeared in breadcrumbs. This PR centralizes the gate and excludes them from breadcrumb navigation.Changes
New:
src/app/dashboard/dev-errors/layout.tsxNODE_ENV !== "production"gate vianotFound()— replaces 3 per-page guardsRemoved per-page guards
dev-errors/page.tsx— removedDEV_ERRORS_ENABLEDcheck +notFound()dev-errors/boundary-error/page.tsx— samedev-errors/route-error/page.tsx— samesrc/lib/routeMetadata.tsxbuildBreadcrumbsFromPath()now skipsdevOnlyroute segments/dashboard/dev-errors/boundary-errorrenders asHome > Dashboard(notHome > Dashboard > Dev Errors > Boundary Error)src/lib/routeMetadata.test.tsbreadcrumbs skip devOnly routes— verifies dev-errors segments are excludedWhat was already working (no changes needed)
devOnlyroutes via.filter(!devOnly)!definition.devOnlyinisCommandPaletteRoute()developmentmode solayout.tsxgate passesAcceptance criteria
Suggested labels
cleanup, routing, testing