docs: document how routing errors surface to the user (Closes #1426) - #1622
Open
waterWang wants to merge 3 commits into
Open
docs: document how routing errors surface to the user (Closes #1426)#1622waterWang wants to merge 3 commits into
waterWang wants to merge 3 commits into
Conversation
Closes Remitwise-Org#1421) Collapse the three identical Tailwind classnames helpers into a single canonical implementation in lib/utils/cn.ts. lib/utils.ts and lib/utils/index.ts now re-export from it instead of duplicating the same twMerge(clsx(...)) logic. Runtime behavior is unchanged; all cn-related tests pass.
…e-Org#1433) Add 17 tests covering: - Rendering with children (text and complex) - Default visual classes (layout, brand, sizing, transition) - Hover classes (hover:bg-brand.redHover) - Focus classes (focus:ring-2, focus:ring-brand.red) - Disabled state (disabled attribute, ARIA, click prevention) - Custom className merging with defaults - forwardRef support - HTML button attributes (type, aria-label, data-*) - Interaction parity: hover + focus coexistence
…se-Org#1426) Add docs/ROUTING_ERRORS.md covering the four routing-error surfaces: 1. Unknown URL → app/not-found.tsx (branded 404 page) 2. Dynamic route notFound() calls → app/not-found.tsx 3. Client render failure → app/error.tsx → RootErrorFallback 4. API route 404 → typed JSON → useFormAction Cross-link from README.md and docs/error-handling.md.
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.
Summary
Adds
docs/ROUTING_ERRORS.mddocumenting how routing errors surface to the user in the RemitWise UI.What changed
docs/ROUTING_ERRORS.md(new) — a contributor-facing guide covering the four distinct routing-error surfaces:app/not-found.tsx(branded 404 page)notFound()calls (e.g./receipt/[txHash],/debug) → routed toapp/not-found.tsxapp/error.tsx→RootErrorFallbackwith per-route messaging fromlib/config/route-errors.tsuseFormActionREADME.md— cross-linked the new doc from the contributors doc list.docs/error-handling.md— cross-referenced the new routing-specific doc so the two aren't orphaned.Design decisions
Closes #1426