diff --git a/src/app/hooks/useTauriCallPower.ts b/src/app/hooks/useTauriCallPower.ts index 9d3f4e860..479769045 100644 --- a/src/app/hooks/useTauriCallPower.ts +++ b/src/app/hooks/useTauriCallPower.ts @@ -14,5 +14,11 @@ export function useTauriCallPower(): void { const callEmbed = useAtomValue(callEmbedAtom); useEffect(() => { invokeTauri('set_call_active', { active: callEmbed !== undefined }); + // #76 — if the shell unmounts while a call is still active (forced + // reload/HMR, or a future teardown path that doesn't end the call first), + // release the native keep-awake state instead of leaving it held forever. + return () => { + invokeTauri('set_call_active', { active: false }); + }; }, [callEmbed]); }