Skip to content

Add dashboard error boundaries#7

Open
Florcitaq wants to merge 2 commits into
therapyneuroflex-source:mainfrom
Florcitaq:codex/error-boundaries-bounty-1
Open

Add dashboard error boundaries#7
Florcitaq wants to merge 2 commits into
therapyneuroflex-source:mainfrom
Florcitaq:codex/error-boundaries-bounty-1

Conversation

@Florcitaq

Copy link
Copy Markdown

Closes #1

Summary

Adds reusable React error boundaries around the dashboard and major layout sections so render-time failures in one section do not take down the whole UI.

Changes

  • Added ErrorBoundary as a reusable class component using getDerivedStateFromError and componentDidCatch.
  • Added clean fallback UI styles that match the existing dark design tokens.
  • Wrapped Header, Sidebar, and main route content in separate layout-level boundaries.
  • Wrapped the dashboard route in its own boundary.
  • Split dashboard stat rendering into a StatCard component and wrapped the stat grid in a distinct boundary.

Testing

  • npm install
  • npm run build
  • PYTHONUTF8=1 python -u build.py -m frontend --verbose

Validation passed for the affected frontend module.

Diagnostic artifacts generated by build.py for commit 0dde0a5:

  • diagnostic/build-0dde0a52.json
  • diagnostic/build-0dde0a52-part001.logd
  • diagnostic/build-0dde0a52-part002.logd
  • diagnostic/build-0dde0a52-part003.logd
  • diagnostic/build-0dde0a52-part004.logd
  • diagnostic/build-0dde0a52-part005.logd
  • diagnostic/build-0dde0a52-part006.logd

Diagnostic password:

994378c16a1a357d6bdf

Note: on this Windows environment, Python subprocess could not launch npm unless the build command used npm.cmd. I used that as a local validation workaround and did not include it in the frontend patch.

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.

[$50 BOUNTY] [TypeScript/React] Implement Robust Error Boundaries and Component Fallbacks for Dashboard Layout

1 participant