feat(flow): paused resume gate와 auto-resume 연결
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user