From abb818fecce7ee91c9490ee98f4690cbffaa976b Mon Sep 17 00:00:00 2001 From: AI Bot Date: Wed, 2 Sep 2026 12:05:47 +0530 Subject: [PATCH] feat: add descriptive loading overlays to Spark Plug wizard --- src/pages/SparkPlug.tsx | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/pages/SparkPlug.tsx b/src/pages/SparkPlug.tsx index 900f73a..fb0ea86 100644 --- a/src/pages/SparkPlug.tsx +++ b/src/pages/SparkPlug.tsx @@ -14,6 +14,7 @@ export default function SparkPlug() { const navigate = useNavigate(); const [currentStep, setCurrentStep] = useState(1); const [isLoading, setIsLoading] = useState(false); + const [loadingMessage, setLoadingMessage] = useState(''); // Step 1: PDF File const [pdfFile, setPdfFile] = useState(null); @@ -35,6 +36,7 @@ export default function SparkPlug() { const processStep1 = async () => { if (!pdfFile) return; + setLoadingMessage('Extracting details with Gemini AI...'); setIsLoading(true); try { @@ -63,6 +65,7 @@ export default function SparkPlug() { const processStep2 = async () => { if (!extractedPrompt) return; + setLoadingMessage('Generating multi-view concepts with Nano Banana...'); setIsLoading(true); try { @@ -95,6 +98,7 @@ export default function SparkPlug() { const processStep3 = async () => { if (generatedImages.length === 0) return; + setLoadingMessage('Constructing 3D Model with Meshy API...'); setIsLoading(true); try { @@ -121,6 +125,7 @@ export default function SparkPlug() { }; const processStep4 = async () => { + setLoadingMessage('Saving project to your workspace...'); setIsLoading(true); try { // Mock generated GLB URL from Meshy @@ -200,8 +205,18 @@ export default function SparkPlug() { {/* Content Area */} -
+
+ {isLoading && ( +
+
+ +
+

{loadingMessage}

+

This might take a few moments...

+
+ )} + {currentStep === 1 && (
@@ -258,7 +273,8 @@ export default function SparkPlug() {
@@ -303,7 +319,8 @@ export default function SparkPlug() {