Surface post-import verification results in the Studio
CI / check (push) Successful in 45s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m17s

After a batch import the progress panel now shows a verification
summary (offer_id fixed, furnidata ids fixed / missing / conflicts,
nitros and icons synced, folders chowned). Single imports include the
key counts in the success toast.
This commit is contained in:
openhands committed 2026-08-18 20:54:16 +02:00
1 parent b4968a9967
commit 635abfbc9f
3 files changed
+105 -3

No files matched your search

+69 -2
View File
@@ -1,10 +1,36 @@
"use client";
import { Ban, Check, Loader2, X } from "lucide-react";
import { Ban, Check, Loader2, ShieldCheck, X } from "lucide-react";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import type { BatchItemStatus } from "./studio-types";
import type { BatchItemStatus, VerificationSummary } from "./studio-types";
function SummaryRow({
label,
value,
tone,
}: {
label: string;
value: string | number;
tone?: "ok" | "warn";
}) {
return (
<div className="flex items-center justify-between gap-2 text-xs">
<span className="text-[var(--admin-text-muted)]">{label}</span>
<span
className={cn(
"font-mono font-semibold",
tone === "warn"
? "text-[var(--admin-warning)]"
: "text-[var(--admin-success)]",
)}
>
{value}
</span>
</div>
);
}
export function BatchProgress({
progress,
@@ -12,6 +38,7 @@ export function BatchProgress({
succeeded,
failed,
cancelling,
verification,
onCancel,
onDismiss,
}: {
@@ -20,6 +47,7 @@ export function BatchProgress({
succeeded: number;
failed: number;
cancelling?: boolean;
verification?: VerificationSummary | null;
onCancel?: () => void;
onDismiss?: () => void;
}) {
@@ -96,6 +124,45 @@ export function BatchProgress({
))}
</div>
{done && verification && (
<div className="mt-2 space-y-1.5 rounded-lg border border-[var(--admin-border)] bg-[var(--admin-canvas)] p-2.5">
<div className="flex items-center gap-1.5 text-xs font-bold uppercase tracking-wider text-[var(--admin-text-muted)]">
<ShieldCheck size={13} className="text-[var(--admin-success)]" />
Post-import verification
</div>
<SummaryRow
label="Catalog offer_id fixed"
value={verification.offerIdsFixed}
/>
<SummaryRow
label="Furnidata ids fixed"
value={verification.furniDataFixedIds}
/>
<SummaryRow
label="Furnidata entries missing"
value={verification.furniDataMissing}
tone={verification.furniDataMissing > 0 ? "warn" : "ok"}
/>
<SummaryRow
label="Furnidata id conflicts"
value={verification.furniDataConflicts}
tone={verification.furniDataConflicts > 0 ? "warn" : "ok"}
/>
<SummaryRow
label="Nitros synced"
value={verification.nitrosSynced.length}
/>
<SummaryRow
label="Icons synced"
value={verification.iconsSynced.length}
/>
<SummaryRow
label="Folders chowned"
value={verification.ownershipFixed.length}
/>
</div>
)}
<div className="mt-2 flex justify-end gap-2">
{done ? (
<Button size="sm" variant="secondary" onClick={onDismiss}>