From a40a9aa8f8538981f3d8ae7886c0dc18e5172876 Mon Sep 17 00:00:00 2001 From: Amed Rodriguez Date: Tue, 2 Sep 2025 15:04:54 -0700 Subject: [PATCH] Add visual indicator while recipe loads (#4447) --- ui/desktop/src/utils/appInitialization.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ui/desktop/src/utils/appInitialization.ts b/ui/desktop/src/utils/appInitialization.ts index f311d588..a179c13a 100644 --- a/ui/desktop/src/utils/appInitialization.ts +++ b/ui/desktop/src/utils/appInitialization.ts @@ -9,6 +9,7 @@ import { } from '../components/ConfigContext'; import { backupConfig, initConfig, readAllConfig, recoverConfig, validateConfig } from '../api'; import { COST_TRACKING_ENABLED } from '../updates'; +import { toastService } from '../toasts'; interface InitializationDependencies { getExtensions?: (b: boolean) => Promise; @@ -156,6 +157,13 @@ const initializeForRecipe = async ({ > & { recipeConfig: Recipe; }) => { + toastService.configure({ silent: false }); + + const loadingToastId = toastService.loading({ + title: `Loading recipe: ${recipeConfig.title}`, + msg: 'Setting up environment...', + }); + await initConfig(); await readAllConfig({ throwOnError: true }); @@ -165,6 +173,9 @@ const initializeForRecipe = async ({ setIsExtensionsLoading, }); + toastService.dismiss(loadingToastId); + toastService.success({ title: 'Recipe loaded', msg: `Recipe is ready to use` }); + setPairChat((prevChat) => ({ ...prevChat, recipeConfig: recipeConfig,