feat: harden runtime readiness and session workflow

This commit is contained in:
User
2026-07-14 10:27:25 +02:00
parent 6d7738d538
commit 6dbf93fff9
52 changed files with 1464 additions and 169 deletions
+9 -3
View File
@@ -3,18 +3,24 @@ import { Button } from "../components/ui/button";
interface Props {
open: boolean;
label: string;
labels?: string[];
/** Backward-compatible single-session label. */
label?: string;
onOpenChange: (open: boolean) => void;
onConfirm: () => void;
}
export function DeleteConfirmDialog({ open, label, onOpenChange, onConfirm }: Props) {
export function DeleteConfirmDialog({ open, labels, label, onOpenChange, onConfirm }: Props) {
const targets = labels ?? (label ? [label] : []);
const description = targets.length > 1
? `${targets.length} sessions will be permanently deleted, including all of their documents. This action cannot be undone.`
: `"${targets[0]}" will be permanently deleted, including all of its documents. This action cannot be undone.`;
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent>
<DialogHeader><DialogTitle>Delete permanently</DialogTitle></DialogHeader>
<DialogDescription>
"{label}" will be permanently deleted, including all of its documents. This action cannot be undone.
{description}
</DialogDescription>
<DialogFooter>
<Button type="button" variant="outline" size="sm" onClick={() => onOpenChange(false)}>Cancel</Button>