feat(web): add React error boundaries and Next.js error.tsx fallbacks

Runtime errors in components now show a friendly "Something went wrong"
screen instead of a white page. Timeline and staffing panel are
individually wrapped. Route-level error.tsx handles server component errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-09 19:16:26 +02:00
parent d3bfa8ca98
commit d7a35b2d7a
5 changed files with 193 additions and 2 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
import dynamic from "next/dynamic";
import { ErrorBoundary } from "~/components/ui/ErrorBoundary.js";
const TimelineView = dynamic(
() => import("~/components/timeline/TimelineView.js").then((m) => m.TimelineView),
@@ -22,7 +23,9 @@ export default function TimelinePage() {
<p className="app-page-subtitle mt-1">Interactive resource planning timeline</p>
</div>
</div>
<TimelineView />
<ErrorBoundary>
<TimelineView />
</ErrorBoundary>
</div>
);
}