From 18af2bc1535f7b7af4c5a8196d6b1cc1cd3229d1 Mon Sep 17 00:00:00 2001 From: Spencer Francisco Date: Sun, 2 Nov 2025 08:26:36 -0600 Subject: [PATCH] fix: Ensure model selection checkmark persists across navigation - Add useEffect to set modelLoadStatus to 'success' when hasModel is true - This ensures the green checkmark persists when navigating back to model selection - Fixes issue where selected model didn't show checkmark after returning to model screen Fixes #26 --- app/page.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/page.tsx b/app/page.tsx index 63df21c..b4c463e 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -150,6 +150,13 @@ export default function Home() { } }, [hasApiKey, apiKeyStatus, justDidReset]) + // Ensure model load status is set correctly when model is selected + useEffect(() => { + if (hasModel && modelLoadStatus !== 'success') { + setModelLoadStatus('success') + } + }, [hasModel, modelLoadStatus]) + const handleApiKeyValidated = (isValid: boolean, key?: string) => { if (isValid && key) { setApiKeyStatus('success')