- Create ErrorBoundary and ModalErrorBoundary components with recovery actions (retry, reload) - Add error boundary CSS styles with fallback UI styling - Wrap main dashboard pages (Board, List, Settings, Agents) with PageErrorBoundary in App.tsx - Wrap all key modals (task detail, planning, subtask breakdown, mission) with ModalErrorBoundary in AppModals.tsx - Wrap entire App with RootErrorBoundary in main.tsx as final safety net - Add 11 comprehensive ErrorBoundary tests covering all rendering and error scenarios
25 lines
643 B
TypeScript
25 lines
643 B
TypeScript
import { StrictMode } from "react";
|
|
import { createRoot } from "react-dom/client";
|
|
import { RootErrorBoundary } from "./components/ErrorBoundary";
|
|
import { App } from "./App";
|
|
import "./styles.css";
|
|
|
|
createRoot(document.getElementById("root")!).render(
|
|
<StrictMode>
|
|
<RootErrorBoundary>
|
|
<App />
|
|
</RootErrorBoundary>
|
|
</StrictMode>,
|
|
);
|
|
|
|
if (import.meta.env.PROD && "serviceWorker" in navigator) {
|
|
navigator.serviceWorker
|
|
.register("/sw.js")
|
|
.then((registration) => {
|
|
console.log("SW registered:", registration.scope);
|
|
})
|
|
.catch((error) => {
|
|
console.log("SW registration failed:", error);
|
|
});
|
|
}
|