Skip to content

Add dashboard error boundaries#2

Open
thecosmicskye wants to merge 2 commits into
therapyneuroflex-source:mainfrom
thecosmicskye:codex/error-boundaries-dashboard
Open

Add dashboard error boundaries#2
thecosmicskye wants to merge 2 commits into
therapyneuroflex-source:mainfrom
thecosmicskye:codex/error-boundaries-dashboard

Conversation

@thecosmicskye

Copy link
Copy Markdown

Summary

Adds reusable React error boundaries around the main dashboard layout so render failures in the header, sidebar, page content, dashboard panel, or stat-card grid do not crash the entire UI.

Changes

  • Added frontend/src/components/ErrorBoundary.tsx as a reusable class-based React error boundary with a clean fallback and retry action.
  • Wrapped Header, Sidebar, and main page content in distinct layout-level error boundaries.
  • Refactored the Dashboard stat cards into a typed StatCardsGrid and wrapped the dashboard panel and stats grid in separate boundaries.
  • Removed the loose any stat access in favor of typed DashboardStats keys.

Testing

  • npm --prefix frontend install
    • PASS, 0 vulnerabilities.
  • npm --prefix frontend run build
    • PASS, TypeScript and Vite production build completed.
  • python3 build.py
    • Ran locally and committed diagnostics for 68fe2391.
    • Build summary: 10 modules, 7 passed, 3 failed.
    • Existing/unrelated local failures:
      • frailbox: existing C compile error in src/arena.c:179.
      • compliance: local machine has no Java Runtime.
      • openapi-haskell: local machine has no ghc.
    • Diagnostic files committed:
      • diagnostic/build-68fe2391.json
      • diagnostic/build-68fe2391-part001.logd through diagnostic/build-68fe2391-part008.logd
    • Diagnostic decrypt/reassemble details from build output:
      • cat diagnostic/build-68fe2391-part001.logd diagnostic/build-68fe2391-part002.logd diagnostic/build-68fe2391-part003.logd diagnostic/build-68fe2391-part004.logd diagnostic/build-68fe2391-part005.logd diagnostic/build-68fe2391-part006.logd diagnostic/build-68fe2391-part007.logd diagnostic/build-68fe2391-part008.logd > diagnostic/build-68fe2391.logd
      • encryptly unpack diagnostic/build-68fe2391.logd <outdir> --password eaa47c1b134923be76f8

Checklist

  • Relevant modules affected by these changes build locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the required diagnostic build log
  • Changes are scoped to the PR purpose and avoid unrelated cleanup
  • Security, privacy, and error-handling implications have been considered

  • I would like to request that my diagnostic build log is removed before merging

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