+ );
+}
\ No newline at end of file
diff --git a/frontend/src/utils/lazyWithRetry.ts b/frontend/src/utils/lazyWithRetry.ts
new file mode 100644
index 00000000..3cbed57e
--- /dev/null
+++ b/frontend/src/utils/lazyWithRetry.ts
@@ -0,0 +1,36 @@
+import { lazy, type ComponentType, type LazyExoticComponent } from 'react';
+
+type ModuleFactory = () => Promise<{ default: ComponentType }>;
+
+/**
+ * React.lazy wrapper that keeps a cache of the load promise so a momentary
+ * chunk-load failure can be retried on a later render (e.g. after an
+ * ErrorBoundary reset) instead of permanently poisoning the lazy component.
+ *
+ * When the underlying `import()` rejects, the cached promise is cleared and the
+ * error re-thrown so the nearest ErrorBoundary can render its fallback with a
+ * working retry action.
+ */
+export function lazyWithRetry>(
+ factory: ModuleFactory,
+ name?: string,
+): LazyExoticComponent> {
+ let cached: Promise<{ default: ComponentType }> | undefined;
+
+ const load = (): Promise<{ default: ComponentType }> => {
+ if (!cached) {
+ cached = factory().catch((error: unknown) => {
+ // Clear the cache so a later reset/remount can attempt the load again.
+ cached = undefined;
+ console.error(
+ `Failed to lazily load chunk${name ? ` for ${name}` : ''}:`,
+ error,
+ );
+ throw error;
+ });
+ }
+ return cached;
+ };
+
+ return lazy(load);
+}
\ No newline at end of file