Skip to content

Add React Error Boundary #8

Description

@satsdisco

Summary

Currently there is no error boundary — any unhandled React error crashes the entire app with a white screen. For a publishing tool where people draft long-form content, this is unacceptable. A crash during writing could mean lost work.

Implementation

  • Add a top-level ErrorBoundary component wrapping the app
  • Show a friendly "Something went wrong" screen with:
    • Error message (dev only)
    • "Reload" button
    • "Your draft has been auto-saved" reassurance (if draft exists in localStorage)
  • Add route-level error boundaries for isolated failures (reader crash shouldn't kill editor)
  • Consider react-error-boundary package or a simple class component

Acceptance Criteria

  • App never shows white screen on error
  • Draft content is never lost due to a crash
  • Errors are logged to console for debugging
  • Route-level boundaries isolate failures

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions