feat(flow): paused resume gate와 auto-resume 연결

This commit is contained in:
2026-03-15 18:52:19 +09:00
parent 6b70d07e3c
commit 1b01ceaa8b
7 changed files with 94 additions and 21 deletions

View File

@@ -20,7 +20,9 @@ interface SpaceFocusHudWidgetProps {
canStartSession?: boolean;
canPauseSession?: boolean;
canRestartSession?: boolean;
entryOverlayIntent?: 'resume-refocus' | null;
returnPromptMode?: 'focus' | 'break' | null;
onEntryOverlayIntentHandled?: () => void;
onStartRequested?: () => void;
onPauseRequested?: () => void;
onRestartRequested?: () => void;
@@ -42,7 +44,9 @@ export const SpaceFocusHudWidget = ({
canStartSession = false,
canPauseSession = false,
canRestartSession = false,
entryOverlayIntent = null,
returnPromptMode = null,
onEntryOverlayIntentHandled,
onStartRequested,
onPauseRequested,
onRestartRequested,
@@ -176,6 +180,15 @@ export const SpaceFocusHudWidget = ({
}
}, [normalizedMicroStep, overlay]);
useEffect(() => {
if (entryOverlayIntent !== 'resume-refocus' || !hasActiveSession || overlay !== 'none') {
return;
}
openRefocus('microStep', 'manual');
onEntryOverlayIntentHandled?.();
}, [entryOverlayIntent, hasActiveSession, onEntryOverlayIntentHandled, openRefocus, overlay]);
const handleOpenCompleteSheet = (preferredView: 'choice' | 'next' = 'choice') => {
setIntentError(null);
setCompletePreferredView(preferredView);