Skip to content

fix(dashboard): add error boundaries for Combos and MITM Proxy pages - #5788

Merged
diegosouzapw merged 3 commits into
release/v3.8.43from
fix/port-pr-2245-error-boundaries
Jul 2, 2026
Merged

diegosouzapw merged 3 commits into
release/v3.8.43from
fix/port-pr-2245-error-boundaries

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Summary

The Combos (/dashboard/combos) and MITM Proxy (/dashboard/system/mitm-proxy) dashboard pages had no Next.js route-segment error boundary. A render crash — e.g. during hydration in production builds — showed a blank page with no way to recover.

This adds an error.tsx for each segment, so a render error now shows a recoverable fallback with a Try Again button (calls reset()) instead of a blank page.

Both files mirror OmniRoute's existing error-boundary pattern (providers/error.tsx, settings/error.tsx):

  • "use client" with typed props { error: Error & { digest?: string }, reset: () => void }
  • role="alert" / aria-live="assertive" for accessibility
  • dev-only (NODE_ENV === "development") error message display + digest (Error ID) when present
  • hardcoded English copy ("Failed to load combos" / "Failed to load MITM proxy"), consistent with the sibling boundaries (no i18n, no back-link)

Files:

  • src/app/(dashboard)/dashboard/combos/error.tsx (new)
  • src/app/(dashboard)/dashboard/system/mitm-proxy/error.tsx (new)

Attribution

Ported from an upstream idea by @wahyuzero (thanks!). Adapted to OmniRoute's existing error-boundary conventions and TypeScript, scoped to the two segments that were actually missing a boundary.

Testing

Added .test.tsx regression guards (run under vitest-ui):

  • tests/unit/ui/combos-error-boundary.test.tsx
  • tests/unit/ui/mitm-proxy-error-boundary.test.tsx

Each renders the boundary with a mock Error + a reset spy, asserts the fallback heading/message renders (not a throw), then clicks Try Again and asserts reset() is called exactly once.

npx vitest run --config vitest.config.ts \
  tests/unit/ui/combos-error-boundary.test.tsx \
  tests/unit/ui/mitm-proxy-error-boundary.test.tsx
# Test Files  2 passed (2)
#      Tests  4 passed (4)

Confirmed failing before the components existed (unresolved import) and passing after.

Both pages currently have no route-segment error boundary, so a render
crash (e.g. during hydration in production builds) shows a blank page
instead of a recoverable fallback. Add error.tsx for each, following
the existing pattern used by providers/error.tsx and settings/error.tsx:
role="alert" fallback with a dev-only error message, digest display,
and a "Try Again" button wired to reset().

Co-authored-by: wahyuzero <wahyuzero@users.noreply.github.com>
Inspired-by: decolua/9router#2245
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the changelog to document a comprehensive set of new features and bug fixes. Key features include CLI profile auto-sync, flat-rate provider cost classification, an LLM-tier compression engine, typed memory decay, and several compression pipeline enhancements. Bug fixes span compression telemetry, proxy pool synchronization, provider setup links, storage daemon OOM crashes, and dashboard UI improvements. Since no review comments were provided, I have no feedback to evaluate.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@diegosouzapw
diegosouzapw merged commit 5128447 into release/v3.8.43 Jul 2, 2026
3 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Jul 2, 2026
@diegosouzapw
diegosouzapw deleted the fix/port-pr-2245-error-boundaries branch July 3, 2026 04:58
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
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.

1 participant