diff --git a/packages/stage-ui/src/stores/modules/speech.ts b/packages/stage-ui/src/stores/modules/speech.ts index 404db8799..6d82bb6df 100644 --- a/packages/stage-ui/src/stores/modules/speech.ts +++ b/packages/stage-ui/src/stores/modules/speech.ts @@ -136,6 +136,10 @@ export const useSpeechStore = defineStore('speech', () => { // NOTICE: clear stale selection when the currently selected speech provider // is no longer configured to avoid implicit fallback behavior from persisted state. + // NOTE: Do NOT use { immediate: true } here — providers.ts validates credentials + // asynchronously on startup, so firing immediately would see an empty + // configuredSpeechProvidersMetadata and incorrectly reset activeSpeechProvider + // to 'speech-noop', permanently wiping the persisted selection from localStorage. if (!configuredProviderIds.includes(activeSpeechProvider.value)) { activeSpeechProvider.value = 'speech-noop' activeSpeechModel.value = '' @@ -143,8 +147,6 @@ export const useSpeechStore = defineStore('speech', () => { activeSpeechVoice.value = undefined } }, - - { immediate: true }, ) onMounted(() => {