fix: retain session failures across recovery surfaces (#3669)

This commit is contained in:
Carlos Florêncio
2026-09-15 09:36:47 +01:00
committed by GitHub
parent 54e2e21f32
commit eeeb6f5586
101 changed files with 4057 additions and 1704 deletions
@@ -0,0 +1,37 @@
"use client";
import type { ReactNode } from "react";
import { useSessionResumption } from "@/hooks/domains/session/use-session-resumption";
import { useTaskStatusSummary } from "@/hooks/domains/task/use-task-status-summary";
import { TaskLaunchErrorProvider } from "./task-launch-error-context";
import { TaskSharedError } from "./task-shared-error";
export function PreviewTaskErrorShell({
taskId,
workspaceId,
statusSummary,
resumption,
children,
}: {
taskId: string;
workspaceId?: string | null;
statusSummary?: ReturnType<typeof useTaskStatusSummary>;
resumption: ReturnType<typeof useSessionResumption>;
children: ReactNode;
}) {
return (
<TaskLaunchErrorProvider
value={{
taskId,
workspaceId: workspaceId ?? "",
statusSummary,
automaticRecovery: resumption,
}}
>
<div className="flex h-full min-h-0 flex-col">
<TaskSharedError />
{children}
</div>
</TaskLaunchErrorProvider>
);
}