fix(catalog): make source preflight advisory
CI / check (push) Successful in 1m38s
CI / deploy (push) Successful in 1m37s
CI / e2e (push) Successful in 21s

This commit is contained in:
Simo committed 2026-09-05 15:32:44 +02:00
1 parent 2d14e02a68
commit 775d14f861
1 file changed
+5 -15
+5 -15
View File
@@ -37,9 +37,6 @@ export function ImportReview({
items.map((item) => item.classname),
);
const assets = useSourceAssetChecks(items, sourceId, inspection);
const assetsByName = new Map(
assets.items.map((item) => [item.classname, item]),
);
const unavailable = assets.items.filter((item) => item.state === "missing");
const [expanded, setExpanded] = useState(items[0]?.classname ?? "");
const [step, setStep] = useState<"review" | "confirm">("review");
@@ -50,11 +47,7 @@ export function ImportReview({
const complete = items.every((item) => localByName.has(item.classname));
const ready = items.filter((item) => {
const local = localByName.get(item.classname);
return (
local &&
assetsByName.get(item.classname)?.state !== "missing" &&
compareFurniture(item, local).state !== "conflict"
);
return local && compareFurniture(item, local).state !== "conflict";
});
const blocked = items.filter((item) => {
const local = localByName.get(item.classname);
@@ -135,12 +128,11 @@ export function ImportReview({
className="rounded-lg border border-[var(--admin-border)] p-3 space-y-2"
>
<p className="text-sm font-medium">
Source files unavailable: {check.classname}
Source files not found by preliminary check: {check.classname}
</p>
<p className="text-xs text-[var(--admin-text-muted)]">
The source has no downloadable files for this furniture. It
cannot be imported until its original .nitro or source files are
available.
You can continue. The importer will try the original furniture
files and verify them before creating its SQL entry.
</p>
</section>
))}
@@ -162,7 +154,7 @@ export function ImportReview({
<p role="status" className="text-sm">
{ready.length} ready to import · {existing} already in SQL
(complete missing data) · {blocked} conflicts ·{" "}
{unavailable.length} unavailable (skipped)
{unavailable.length} source file warnings
</p>
{inspection.items.some(
(item) =>
@@ -304,8 +296,6 @@ export function ImportReview({
}}
disabled={
inspection.loading ||
assets.loading ||
!!assets.error ||
!!inspection.error ||
!complete ||
ready.length === 0