diff --git a/ui/src/pages/CompanyImport.tsx b/ui/src/pages/CompanyImport.tsx index 2e5d3ddd7b9..352fa6d46b2 100644 --- a/ui/src/pages/CompanyImport.tsx +++ b/ui/src/pages/CompanyImport.tsx @@ -29,6 +29,7 @@ import { ChevronRight, Download, Github, + Loader2, Package, Upload, } from "lucide-react"; @@ -1442,7 +1443,38 @@ export function CompanyImport() { > {previewMutation.isPending ? "Previewing..." : "Preview import"} + {!hasSource && !previewMutation.isPending && ( + + Choose a package above to enable the preview. + + )} + {inlineImportBlocked && ( + + Package too large for browser import — see the notice above. + + )} + {previewMutation.isPending && ( +
+ Uploading and analyzing your package + {inlinePreflight ? ` (about ${formatMegabytes(inlinePreflight.estimatedBytes)})` : ""} — large + packages can take a few minutes. Keep this page open. +
++ Preview failed:{" "} + {previewMutation.error instanceof Error + ? previewMutation.error.message + : "the request did not complete."}{" "} + Retry, or use the CLI folder import for very large packages. +
++ Uploading and importing — large packages can take several minutes. Keep this page open. +
++ Import failed:{" "} + {importMutation.error instanceof Error + ? importMutation.error.message + : "the request did not complete."}{" "} + Nothing may have been created, or the import stopped partway — check the target company + before retrying. +
+