[PR #1683] [CLOSED] Add global client error boundary #5212

Closed
opened 2026-10-22 04:14:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1683
Author: @cha1latte
Created: 5/31/2026
Status: ❌ Closed

Base: staging ← Head: feature/global-error-boundary


📝 Commits (2)

  • 94f4e3e Add global client error boundary
  • 1b55418 Avoid duplicate root error diagnostics

📊 Changes

2 files changed (+193 additions, -2 deletions)

View changed files

➕ packages/client/src/GlobalErrorBoundary.tsx (+183 -0)
📝 packages/client/src/main.tsx (+10 -2)

📄 Description

Linked issue

No linked issue. This follows a maintainer refactor question about root-level error recovery; a tracking issue should be opened before this PR is submitted if the team wants one.

Why this change

  • Without a global React error boundary, render/lifecycle exceptions can leave the app locked with only console output. This adds a root recovery screen with copyable debug details so users and maintainers get a useful failure state.

What changed

  • Added a client-owned GlobalErrorBoundary that renders a full-screen crash state with reload and copy-debug-details actions.
  • Wrapped <App /> in the boundary at the React root.
  • Added React 19 root error callbacks plus window error / unhandledrejection diagnostic logging.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex ran pnpm check in a clean worktree based on upstream/staging; it passed.
  • Codex did not run a browser crash-screen visual probe in this staging worktree.
  • Staging currently has no client test runner configured, so no component test was added.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

N/A. No screenshot captured; fallback UI is covered by code review and local pnpm check.

Summary by CodeRabbit

  • New Features
    • Improved global error handling and diagnostics installed at app startup.
    • App now shows a user-facing crash/fallback UI for render-time errors with formatted error details, expandable debug info, copy-to-clipboard, and a reload action.
    • Enhanced root-level error reporting to better surface caught, uncaught, and recoverable errors for improved stability.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1683 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/31/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `feature/global-error-boundary` --- ### 📝 Commits (2) - [`94f4e3e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/94f4e3eb6312f7192bc455e27b9715a2b34992ad) Add global client error boundary - [`1b55418`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1b55418e963c579e9023b89dbc451865a783ffeb) Avoid duplicate root error diagnostics ### 📊 Changes **2 files changed** (+193 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `packages/client/src/GlobalErrorBoundary.tsx` (+183 -0) 📝 `packages/client/src/main.tsx` (+10 -2) </details> ### 📄 Description ## Linked issue No linked issue. This follows a maintainer refactor question about root-level error recovery; a tracking issue should be opened before this PR is submitted if the team wants one. ## Why this change - Without a global React error boundary, render/lifecycle exceptions can leave the app locked with only console output. This adds a root recovery screen with copyable debug details so users and maintainers get a useful failure state. ## What changed - Added a client-owned `GlobalErrorBoundary` that renders a full-screen crash state with reload and copy-debug-details actions. - Wrapped `<App />` in the boundary at the React root. - Added React 19 root error callbacks plus window `error` / `unhandledrejection` diagnostic logging. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Codex ran `pnpm check` in a clean worktree based on `upstream/staging`; it passed. - Codex did not run a browser crash-screen visual probe in this staging worktree. - Staging currently has no client test runner configured, so no component test was added. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) N/A. No screenshot captured; fallback UI is covered by code review and local `pnpm check`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved global error handling and diagnostics installed at app startup. * App now shows a user-facing crash/fallback UI for render-time errors with formatted error details, expandable debug info, copy-to-clipboard, and a reload action. * Enhanced root-level error reporting to better surface caught, uncaught, and recoverable errors for improved stability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:14:16 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5212
No description provided.