Skip to content

Add layout error boundaries for dashboard#4

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

Add layout error boundaries for dashboard#4
Soengkit wants to merge 2 commits into
therapyneuroflex-source:mainfrom
Soengkit:codex/error-boundary-dashboard

Conversation

@Soengkit

@Soengkit Soengkit commented Jun 19, 2026

Copy link
Copy Markdown

Summary

Adds reusable React error boundaries around the dashboard and key layout sections so render failures in dynamic UI areas do not blank the whole app.

Addresses #1.

Changes

  • Adds frontend/src/components/ErrorBoundary.tsx with typed React error-boundary state and an accessible design-token-aligned fallback UI.
  • Wraps Header, Sidebar, and routed page content in layout-level boundaries.
  • Splits dashboard stat rendering into StatCard and StatCardsGrid, then wraps the dashboard panel and stat grid in distinct boundaries.
  • Removes the dashboard stat any cast by typing stat-card keys against DashboardStats.

Testing

  • npm run build from frontend/ - passed (tsc -b && vite build).
  • git diff --check - passed.
  • python3 build.py - ran and committed diagnostic/build-1702a6da.json plus diagnostic/build-1702a6da.logd. The script returned non-zero because 3 unrelated non-frontend modules failed while diagnostics were still produced:
    • frailbox: existing C compile warning/error in src/arena.c.
    • compliance: local runner could not locate a Java Runtime.
    • openapi-haskell: local GHC environment is missing Data.Yaml.
  • Diagnostic log password: 4b7a5a8ab0315b237719.

Checklist

  • Affected frontend module builds locally.
  • Required diagnostic .json and .logd artifacts are committed.
  • No generated build artifacts are committed, except the required diagnostic build log.
  • No documentation, configuration, or schema changes are required for this frontend-only change.
  • Changes are scoped to the PR purpose and avoid unrelated cleanup.
  • Security, privacy, and error-handling implications have been considered.

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