Skip to content

Add unified client error pages and preserve route shells on errors#706

Merged
SvenVw merged 12 commits into
developmentfrom
FDM705
Jul 23, 2026
Merged

Add unified client error pages and preserve route shells on errors#706
SvenVw merged 12 commits into
developmentfrom
FDM705

Conversation

@SvenVw

@SvenVw SvenVw commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added dedicated, visually distinct Dutch pages for client-side error statuses (400/403/404), with navigation and consistent UX.
    • Permission-denied access to farms now shows an unavailable page while keeping the sidebar accessible.
    • Farm, organization, support, and user sections now preserve their surrounding layout during errors.
    • Unexpected errors now provide consistent actions and optional error details, including a copy-to-clipboard option from toasts.
  • Bug Fixes
    • Improved consistent client vs. server error handling and more reliable, non-disruptive error responses across loaders and actions.

Closes #705

@SvenVw SvenVw self-assigned this Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@SvenVw, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 736a92b1-3e0c-4427-90f7-c02c5ef8f15d

📥 Commits

Reviewing files that changed from the base of the PR and between 625a51e and 3083a98.

📒 Files selected for processing (13)
  • fdm-app/app/components/blocks/helpdesk/ticket-viewer.tsx
  • fdm-app/app/components/custom/error.tsx
  • fdm-app/app/root.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.measures.$b_id.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.measures._index.tsx
  • fdm-app/app/routes/organization.$slug.settings.tsx
  • fdm-app/app/routes/organization.new.tsx
  • fdm-app/app/routes/organization.tsx
  • fdm-app/app/routes/support._ticketviewer.ticket.$ticket_id.tsx
  • fdm-app/app/routes/support.new.tsx
  • fdm-app/app/routes/support.settings.agents.tsx
  • fdm-app/app/routes/support.tsx
📝 Walkthrough

Walkthrough

Adds unified client-error pages for statuses 400, 403, and 404, centralizes error classification, preserves application shells during route failures, handles inaccessible farms without throwing, and returns standardized action error responses.

Changes

Error handling and UI

Layer / File(s) Summary
Shared error contracts and UI
fdm-app/app/components/custom/error.tsx, fdm-app/app/lib/error.ts, fdm-app/app/root.tsx, .changeset/smart-stamps-hope.md
Client and unexpected errors use separate pages, shared status extraction and permission matching, delegated root classification, analytics, and toast diagnostics actions.

Farm access and shell preservation

Layer / File(s) Summary
Farm access and shell preservation
fdm-app/app/routes/farm.tsx, fdm-app/app/components/blocks/helpdesk/ticket-viewer.tsx
Farm access denial preserves sidebar data and renders a client-error page inside the farm shell; ticket layout sizing uses full-height containment.

Nested route error boundaries

Layer / File(s) Summary
Nested route error boundaries
fdm-app/app/routes/organization.tsx, fdm-app/app/routes/support.tsx, fdm-app/app/routes/user.tsx
Reusable shells wrap normal outlets and descendant error fallbacks while retaining route navigation chrome.

Route error response propagation

Layer / File(s) Summary
Route error response propagation
fdm-app/app/routes/farm..., fdm-app/app/routes/organization..., fdm-app/app/routes/support..., fdm-app/app/routes/logout.tsx, fdm-app/app/lib/form.ts
Loaders use loader-specific error handling and route actions return standardized handleActionError results instead of throwing them.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant RouteLoader
  participant RouteShell
  participant RouteErrorFallback
  participant ErrorPage
  Browser->>RouteLoader: request route
  RouteLoader->>RouteShell: provide loader data or boundary state
  RouteShell->>RouteErrorFallback: render failed content pane
  RouteErrorFallback->>ErrorPage: classify status and render page
Loading

Possibly related PRs

  • nmi-agro/fdm#81: Both centralize error handling through ErrorBoundary and ErrorBlock.
  • nmi-agro/fdm#87: Both classify route errors by HTTP status in the error UI.
  • nmi-agro/fdm#486: Both modify shared permission-denied handling in fdm-app/app/lib/error.ts.

Suggested labels: fdm-app, enhancement

Suggested reviewers: copilot

Poem

I’m a rabbit, errors tucked away,
Client faults now greet the day.
Shells stay snug and farms stay near,
Actions return responses clear.
Hop, hop—an easier error page!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 61.82% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive The summaries match most issue goals, but they don't confirm the exact client-page actions and unchanged 5xx/unknown diagnostics. Review the diff to confirm ClientErrorPage actions, 5xx/unknown behavior, and privacy/typegen requirements exactly.
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changed files are all tied to error handling, route shells, or related docs; no clear unrelated feature work stands out.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: unified client error pages and preserving route shells on errors.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch FDM705

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot changed the title @coderabbitai Add unified client error pages and preserve route shells on errors Jul 20, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@fdm-app/app/routes/farm.tsx`:
- Around line 340-352: Guard useLoaderData() in ErrorBoundary implementations
across fdm-app/app/routes/farm.tsx:340-352,
fdm-app/app/routes/organization.tsx:213-221,
fdm-app/app/routes/support.tsx:165-173, and fdm-app/app/routes/user.tsx:114-122.
When route loader data is missing, return a bare ClientErrorPage before invoking
the corresponding shell or useFarmContextSync; otherwise preserve the existing
shell rendering with valid loader data.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b0aa1749-03b8-464d-8a34-42b22feafe5f

📥 Commits

Reviewing files that changed from the base of the PR and between d9ab2de and 7ff7074.

📒 Files selected for processing (8)
  • .changeset/smart-stamps-hope.md
  • fdm-app/app/components/custom/error.tsx
  • fdm-app/app/lib/error.ts
  • fdm-app/app/root.tsx
  • fdm-app/app/routes/farm.tsx
  • fdm-app/app/routes/organization.tsx
  • fdm-app/app/routes/support.tsx
  • fdm-app/app/routes/user.tsx

Comment thread fdm-app/app/routes/farm.tsx Outdated
@SvenVw
SvenVw requested review from BoraIneviNMI and removed request for BoraIneviNMI July 20, 2026 12:33

@BoraIneviNMI BoraIneviNMI left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two problems:

  • Support pages used to depend on styling on the support.tsx layout. Now the TicketViewer and AgentManager components can go out of bounds of the page.
  • If a component throws an error while rendering, "Deze pagina is niet beschikbaar" is shown. Component errors should be classified as unknown error. To try it for yourself, add throw new Error("failed") to any JSX component.

Comment thread fdm-app/app/lib/error.ts Fixed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@fdm-app/app/components/custom/error.tsx`:
- Around line 264-275: Update RouteErrorFallback so it does not throw
redirect(signInUrl) during render. Move the 401 navigation into the relevant
route loader/action, or trigger the redirect after render using the router’s
navigation mechanism, while preserving the currentPath redirect target and
sign-in behavior.

In `@fdm-app/app/lib/error.ts`:
- Around line 293-316: Add a dedicated 405 branch to the status switch in the
error handling function, mapping method-not-allowed responses to an appropriate
client-facing warning without calling reportError. Ensure other unclassified 4xx
statuses also avoid the unexpected-error/default reporting path, while
preserving the existing handling for 400, 401, 403, 404, and server-side errors.
- Around line 362-370: Update the default branch of handleActionError to pass
the error message as a data object containing the warning key, matching the
existing dataWithError/dataWithWarning contract used by the other branches.
Preserve the current error message, user-facing message, status, and errorId
values.
- Around line 293-331: The warning and error response branches currently pass
status in toast metadata instead of the response init options. Update both
dataWithWarning and dataWithError calls in the surrounding error handler to keep
the message in the second argument and move status into the third init argument.

In `@fdm-app/app/routes/organization`.$slug.members.tsx:
- Around line 371-373: Classify missing organizations as 404 responses instead
of passing unrecognized plain strings to handleActionError. Update both
organization-missing branches in
fdm-app/app/routes/organization.$slug.members.tsx at lines 371-373 and 401-403
to throw a 404 data(...) response, or extend the shared handleActionError
classifier to recognize the existing “not found:” prefix while preserving the
intended 404 behavior at both sites.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2ab275f6-579b-4794-8846-90dab23a1dee

📥 Commits

Reviewing files that changed from the base of the PR and between 7ff7074 and 225f3b9.

📒 Files selected for processing (54)
  • fdm-app/app/components/blocks/helpdesk/ticket-viewer.tsx
  • fdm-app/app/components/custom/error.tsx
  • fdm-app/app/lib/error.ts
  • fdm-app/app/lib/form.ts
  • fdm-app/app/root.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.bcs.$a_id.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.bcs._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.bcs.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.cultivation.$b_lu.harvest.$b_id_harvesting.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.cultivation.$b_lu.harvest.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.cultivation.$b_lu.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.cultivation.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.fertilizer._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.soil._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.soil.analysis.$a_id.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.soil.analysis.new.$analysis_type.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.soil.analysis.new.upload.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.fertilizer._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.measures.$b_id.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.measures._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation.modify_fertilizer.$p_id.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation.modify_harvest.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation_.fertilizer._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation_.harvest._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.fertilizers.$p_id.tsx
  • fdm-app/app/routes/farm.$b_id_farm.fertilizers.new.custom.tsx
  • fdm-app/app/routes/farm.$b_id_farm.settings.derogation.tsx
  • fdm-app/app/routes/farm.$b_id_farm.settings.grazing-intention.tsx
  • fdm-app/app/routes/farm.$b_id_farm.settings.properties.tsx
  • fdm-app/app/routes/farm.$b_id_farm.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id.soil.analysis.$analysis_type.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id.soil.analysis.upload.tsx
  • fdm-app/app/routes/farm.create._index.tsx
  • fdm-app/app/routes/farm.tsx
  • fdm-app/app/routes/logout.tsx
  • fdm-app/app/routes/organization.$slug.members.tsx
  • fdm-app/app/routes/organization.$slug.settings.tsx
  • fdm-app/app/routes/organization._index.tsx
  • fdm-app/app/routes/organization.new.tsx
  • fdm-app/app/routes/organization.tsx
  • fdm-app/app/routes/support._ticketviewer.ticket.$ticket_id.tsx
  • fdm-app/app/routes/support.new.tsx
  • fdm-app/app/routes/support.settings.agents.tsx
  • fdm-app/app/routes/support.settings.blocked-emails.tsx
  • fdm-app/app/routes/support.settings.tags.tsx
  • fdm-app/app/routes/support.tsx
  • fdm-app/app/routes/user.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • fdm-app/app/routes/organization.tsx
  • fdm-app/app/routes/user.tsx
  • fdm-app/app/routes/support.tsx
  • fdm-app/app/routes/farm.tsx

Comment thread fdm-app/app/components/custom/error.tsx
Comment thread fdm-app/app/lib/error.ts
Comment thread fdm-app/app/lib/error.ts
Comment thread fdm-app/app/lib/error.ts Outdated
Comment thread fdm-app/app/routes/organization.$slug.members.tsx
Copilot AI review requested due to automatic review settings July 21, 2026 11:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves fdm-app’s error UX by introducing unified client-error pages (400/403/404), keeping route shells (sidebar/header) visible when nested routes error, and aligning loader/action error handling so expected failures show friendly UI/toasts instead of collapsing the whole app view.

Changes:

  • Added unified client-error vs unexpected-error pages and a shared RouteErrorFallback classifier used by route ErrorBoundaries.
  • Added layout-route shells + ErrorBoundary exports for /farm, /organization, /support, /user to preserve the app chrome on nested errors.
  • Updated many route actions to return handleActionError(...) (toast-driven) instead of throwing, plus improved status extraction in handleLoaderError / handleActionError.

Reviewed changes

Copilot reviewed 55 out of 55 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
fdm-app/app/routes/user.tsx Introduces UserShell + route-level ErrorBoundary to keep sidebar visible on nested errors.
fdm-app/app/routes/support.tsx Introduces SupportShell + ErrorBoundary, and adjusts content pane sizing for nested layouts.
fdm-app/app/routes/support.settings.tags.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/support.settings.blocked-emails.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/support.settings.agents.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/support.new.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/support._ticketviewer.ticket.$ticket_id.tsx Aligns action error returns; contains special-case logic for extractFormValuesFromRequest-thrown responses.
fdm-app/app/routes/organization.tsx Introduces OrganizationShell + ErrorBoundary to preserve sidebar/header on nested errors.
fdm-app/app/routes/organization.new.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/organization.$slug.settings.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/organization.$slug.members.tsx Uses explicit data(..., {status: 404}) for not-found org cases; returns handleActionError in catch.
fdm-app/app/routes/organization._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/logout.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.tsx Adds farm-shell preservation on errors, handles permission-denied farm access without blowing away shell, and adds farm route ErrorBoundary.
fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id.soil.analysis.upload.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id.soil.analysis.$analysis_type.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.create._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.tsx Fixes loader error handling to use handleLoaderError (not action error handler).
fdm-app/app/routes/farm.$b_id_farm.settings.properties.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.settings.grazing-intention.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.settings.derogation.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.fertilizers.new.custom.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.fertilizers.$p_id.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation.modify_harvest.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation.modify_fertilizer.$p_id.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation_.harvest._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation_.fertilizer._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.measures.$b_id.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.measures._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.fields.$b_id._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.fertilizer._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.soil.analysis.new.upload.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.soil.analysis.new.$analysis_type.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.soil.analysis.$a_id.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.soil._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.fertilizer._index.tsx Reorders an import and returns handleActionError from action (toast flow).
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.cultivation.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.cultivation.$b_lu.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.cultivation.$b_lu.harvest.new.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.cultivation.$b_lu.harvest.$b_id_harvesting.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.bcs.new.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.bcs.$a_id.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.bcs._index.tsx Returns handleActionError from action (toast flow) instead of throwing.
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx Fixes loader to use handleLoaderError; returns handleActionError from action.
fdm-app/app/root.tsx Switches to RouteErrorFallback and augments toast UX (analytics + copy-to-clipboard).
fdm-app/app/lib/form.ts Ensures thrown handleActionError is awaited (so the thrown value is a response, not a promise).
fdm-app/app/lib/error.ts Adds thrown-status extraction, exports containsErrorMessage, and documents/standardizes action vs loader error handling.
fdm-app/app/components/custom/error.tsx Adds ClientErrorPage, UnexpectedErrorPage, and RouteErrorFallback for unified error rendering + analytics hooks.
fdm-app/app/components/blocks/helpdesk/ticket-viewer.tsx Adjusts sizing to work with the new min-h-0 / h-full shell layout.
.changeset/smart-stamps-hope.md Minor version bump note for fdm-app describing the new client-error page behavior.

Comment thread fdm-app/app/components/custom/error.tsx
Comment thread fdm-app/app/root.tsx
Comment thread fdm-app/app/routes/support._ticketviewer.ticket.$ticket_id.tsx Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 12:12
@SvenVw
SvenVw requested review from BoraIneviNMI and removed request for Copilot July 21, 2026 12:13

@BoraIneviNMI BoraIneviNMI left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you for fixing the stuff I mentioned.

Comment thread fdm-app/app/routes/support.tsx Outdated
SvenVw and others added 3 commits July 23, 2026 14:10
Co-authored-by: BoraIneviNMI <bora.inevi@nmi-agro.nl>
Signed-off-by: Sven Verweij <37927107+SvenVw@users.noreply.github.com>
Signed-off-by: Sven Verweij <37927107+SvenVw@users.noreply.github.com>
Signed-off-by: Sven Verweij <37927107+SvenVw@users.noreply.github.com>
@SvenVw
SvenVw merged commit 9c68484 into development Jul 23, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show one friendly, generic "page unavailable" message instead of the current disguised error page

3 participants