From f21129fc5dc4a57ef1e3302c994a740e0cbefe86 Mon Sep 17 00:00:00 2001 From: corpi Date: Tue, 17 Mar 2026 14:42:56 +0900 Subject: [PATCH] fix(space): remove stale setup drawer flow --- .../focus-session/api/focusSessionApi.ts | 2 +- src/shared/i18n/messages/space.en.ts | 22 -- src/shared/i18n/messages/space.ts | 21 -- src/widgets/space-setup-drawer/index.ts | 1 - .../ui/SpaceSetupDrawerWidget.tsx | 355 ------------------ src/widgets/space-workspace/model/types.ts | 3 +- .../model/useSpaceWorkspaceSelection.ts | 22 +- .../model/useSpaceWorkspaceSessionControls.ts | 15 +- .../model/useWorkspacePersistence.ts | 13 - .../model/workspaceSelection.ts | 1 - .../ui/SpaceWorkspaceWidget.tsx | 87 +---- 11 files changed, 6 insertions(+), 536 deletions(-) delete mode 100644 src/widgets/space-setup-drawer/index.ts delete mode 100644 src/widgets/space-setup-drawer/ui/SpaceSetupDrawerWidget.tsx diff --git a/src/features/focus-session/api/focusSessionApi.ts b/src/features/focus-session/api/focusSessionApi.ts index 7ce6959..8b209fa 100644 --- a/src/features/focus-session/api/focusSessionApi.ts +++ b/src/features/focus-session/api/focusSessionApi.ts @@ -92,7 +92,7 @@ export interface StartFocusSessionRequest { soundPresetId?: string | null; focusPlanItemId?: string; microStep?: string | null; - entryPoint?: 'space-setup' | 'goal-complete' | 'resume-restore'; + entryPoint?: 'space-setup' | 'goal-complete'; } export interface CompleteFocusSessionRequest { diff --git a/src/shared/i18n/messages/space.en.ts b/src/shared/i18n/messages/space.en.ts index f1128d8..2cddad3 100644 --- a/src/shared/i18n/messages/space.en.ts +++ b/src/shared/i18n/messages/space.en.ts @@ -9,28 +9,6 @@ export const spaceEn = { placeholder: 'e.g. Draft the first page of the contract', hint: 'Keep it small. Just the next concrete piece.', }, - setup: { - ...koSpace.setup, - panelAriaLabel: 'Focus entry panel', - eyebrow: 'Execution Setup', - title: 'Set the goal, time, and atmosphere. Then step in.', - description: 'Pick a goal, background, timer, and sound. Then move straight into the focus stage.', - resumeTitle: 'Pick up the last block', - startFresh: 'Start fresh', - resumePrepare: 'Prepare to resume', - sceneLabel: 'Background', - timerLabel: 'Time', - soundLabel: 'Sound', - reviewTeaserEyebrow: 'Weekly Review', - reviewTeaserTitle: 'Take another look at this week?', - reviewTeaserTitlePro: 'Review this week and reopen the rhythm that worked best?', - reviewTeaserHelper: 'You can jump right back in, or pause for a quick weekly review first.', - reviewTeaserHelperPro: 'You can jump right back in, or check this week’s flow and recommended atmosphere first.', - reviewTeaserCta: 'Open weekly review', - reviewTeaserDismiss: 'Later', - readyHint: 'Add a goal to unlock the start flow.', - openFocusScreen: 'Open focus stage', - }, timerHud: { ...koSpace.timerHud, actions: [ diff --git a/src/shared/i18n/messages/space.ts b/src/shared/i18n/messages/space.ts index 0d29dd1..ffdb5da 100644 --- a/src/shared/i18n/messages/space.ts +++ b/src/shared/i18n/messages/space.ts @@ -5,27 +5,6 @@ export const space = { placeholder: '예: 계약서 1페이지 정리', hint: '크게 말고, 바로 다음 한 조각.', }, - setup: { - panelAriaLabel: '집중 시작 패널', - eyebrow: 'Execution Setup', - title: '이번 세션만 가볍게 맞추고 들어가요.', - description: '목표, 배경, 타이머, 사운드만 정하고 바로 실행 화면으로 들어갑니다.', - resumeTitle: '지난 한 조각 이어서', - startFresh: '새로 시작', - resumePrepare: '이어서 준비', - sceneLabel: '배경', - timerLabel: '타이머', - soundLabel: '사운드', - reviewTeaserEyebrow: 'Weekly Review', - reviewTeaserTitle: '이번 주 review를 다시 볼까요?', - reviewTeaserTitlePro: '이번 주 흐름과 잘 맞았던 ritual을 다시 볼까요?', - reviewTeaserHelper: '지금은 바로 다시 시작해도 괜찮고, 원하면 주간 review를 잠깐 보고 갈 수 있어요.', - reviewTeaserHelperPro: '원하면 이번 주 흐름과 추천 ritual을 다시 보고 다음 세션으로 이어갈 수 있어요.', - reviewTeaserCta: '주간 review 보기', - reviewTeaserDismiss: '나중에', - readyHint: '목표를 적으면 시작할 수 있어요.', - openFocusScreen: '실행 화면 열기', - }, timerHud: { actions: [ { id: 'start', label: '시작', icon: '▶' }, diff --git a/src/widgets/space-setup-drawer/index.ts b/src/widgets/space-setup-drawer/index.ts deleted file mode 100644 index d9c66a3..0000000 --- a/src/widgets/space-setup-drawer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ui/SpaceSetupDrawerWidget'; diff --git a/src/widgets/space-setup-drawer/ui/SpaceSetupDrawerWidget.tsx b/src/widgets/space-setup-drawer/ui/SpaceSetupDrawerWidget.tsx deleted file mode 100644 index 77604b5..0000000 --- a/src/widgets/space-setup-drawer/ui/SpaceSetupDrawerWidget.tsx +++ /dev/null @@ -1,355 +0,0 @@ -'use client'; - -import Link from 'next/link'; -import { useEffect, useMemo, useRef, useState, type FormEvent } from 'react'; -import type { SceneAssetMap } from '@/entities/media'; -import type { SceneTheme } from '@/entities/scene'; -import type { - GoalChip, - SoundPreset, -} from '@/entities/session'; -import { copy } from '@/shared/i18n'; -import { SceneSelectCarousel } from '@/features/scene-select'; -import { SessionGoalField } from '@/features/session-goal'; -import { Button } from '@/shared/ui'; -import { cn } from '@/shared/lib/cn'; - -type SelectionPopover = 'space' | 'timer' | 'sound'; - -interface SpaceSetupDrawerWidgetProps { - open: boolean; - scenes: SceneTheme[]; - sceneAssetMap?: SceneAssetMap; - selectedSceneId: string; - selectedDurationLabel: string; - selectedSoundPresetId: string; - goalInput: string; - selectedGoalId: string | null; - goalChips: GoalChip[]; - soundPresets: SoundPreset[]; - durationOptions: readonly number[]; - canStart: boolean; - onSceneSelect: (sceneId: string) => void; - onDurationSelect: (durationMinutes: number) => void; - onSoundSelect: (soundPresetId: string) => void; - onGoalChange: (value: string) => void; - onGoalChipSelect: (chip: GoalChip) => void; - onStart: () => void; - resumeHint?: { - goal: string; - onResume: () => void; - onStartFresh: () => void; - }; - reviewTeaser?: { - title: string; - summary: string; - ctaHref: string; - ctaLabel: string; - onDismiss: () => void; - }; -} - -interface SummaryChipProps { - label: string; - value: string; - open: boolean; - onClick: () => void; -} - -const SummaryChip = ({ label, value, open, onClick }: SummaryChipProps) => { - return ( - - ); -}; - -export const SpaceSetupDrawerWidget = ({ - open, - scenes, - sceneAssetMap, - selectedSceneId, - selectedDurationLabel, - selectedSoundPresetId, - goalInput, - selectedGoalId, - goalChips, - soundPresets, - durationOptions, - canStart, - onSceneSelect, - onDurationSelect, - onSoundSelect, - onGoalChange, - onGoalChipSelect, - onStart, - resumeHint, - reviewTeaser, -}: SpaceSetupDrawerWidgetProps) => { - const { setup } = copy.space; - const [openPopover, setOpenPopover] = useState(null); - const panelRef = useRef(null); - - const selectedScene = useMemo(() => { - return scenes.find((scene) => scene.id === selectedSceneId) ?? scenes[0]; - }, [scenes, selectedSceneId]); - - const selectedSoundLabel = useMemo(() => { - return ( - soundPresets.find((preset) => preset.id === selectedSoundPresetId)?.label ?? - soundPresets[0]?.label ?? - copy.common.default - ); - }, [selectedSoundPresetId, soundPresets]); - - useEffect(() => { - if (!openPopover) { - return; - } - - const handleEscape = (event: KeyboardEvent) => { - if (event.key === 'Escape') { - setOpenPopover(null); - } - }; - - const handlePointerDown = (event: MouseEvent) => { - const target = event.target as Node; - - if (!panelRef.current?.contains(target)) { - setOpenPopover(null); - } - }; - - document.addEventListener('keydown', handleEscape); - document.addEventListener('mousedown', handlePointerDown); - - return () => { - document.removeEventListener('keydown', handleEscape); - document.removeEventListener('mousedown', handlePointerDown); - }; - }, [openPopover]); - - if (!open) { - return null; - } - - const togglePopover = (popover: SelectionPopover) => { - setOpenPopover((current) => (current === popover ? null : popover)); - }; - - const handleSubmit = (event: FormEvent) => { - event.preventDefault(); - - if (!canStart) { - return; - } - - onStart(); - }; - - return ( -
-
-
-

{setup.eyebrow}

-

{setup.title}

-

{setup.description}

-
- - {resumeHint ? ( -
-

{setup.resumeTitle}

-

{resumeHint.goal}

-
- - -
-
- ) : null} - -
-
- togglePopover('space')} - /> - togglePopover('timer')} - /> - togglePopover('sound')} - /> -
- - {openPopover === 'space' ? ( -
- { - onSceneSelect(sceneId); - setOpenPopover(null); - }} - /> -
- ) : null} - - {openPopover === 'timer' ? ( -
-
- {durationOptions.map((minutes) => { - const selected = `${minutes}m` === selectedDurationLabel; - - return ( - - ); - })} -
-
- ) : null} - - {openPopover === 'sound' ? ( -
-
- {soundPresets.slice(0, 6).map((preset) => { - const selected = preset.id === selectedSoundPresetId; - - return ( - - ); - })} -
-
- ) : null} -
- -
- - -
- {!canStart ?

{setup.readyHint}

: null} - -
- - - {reviewTeaser ? ( -
-
-
-

- {setup.reviewTeaserEyebrow} -

-

- {reviewTeaser.title} -

-

- {reviewTeaser.summary} -

-
- -
- - - {reviewTeaser.ctaLabel} - -
- ) : null} -
-
- ); -}; diff --git a/src/widgets/space-workspace/model/types.ts b/src/widgets/space-workspace/model/types.ts index 65cac52..7ec007c 100644 --- a/src/widgets/space-workspace/model/types.ts +++ b/src/widgets/space-workspace/model/types.ts @@ -1,5 +1,5 @@ export type WorkspaceMode = 'setup' | 'focus'; -export type SessionEntryPoint = 'space-setup' | 'goal-complete' | 'resume-restore'; +export type SessionEntryPoint = 'space-setup' | 'goal-complete'; export type SelectionOverride = { sound: boolean; @@ -10,6 +10,5 @@ export interface StoredWorkspaceSelection { sceneId?: string; durationMinutes?: number; soundPresetId?: string; - goal?: string; override?: Partial; } diff --git a/src/widgets/space-workspace/model/useSpaceWorkspaceSelection.ts b/src/widgets/space-workspace/model/useSpaceWorkspaceSelection.ts index 23864f4..95fa4d0 100644 --- a/src/widgets/space-workspace/model/useSpaceWorkspaceSelection.ts +++ b/src/widgets/space-workspace/model/useSpaceWorkspaceSelection.ts @@ -86,8 +86,6 @@ export const useSpaceWorkspaceSelection = ({ const [goalInput, setGoalInput] = useState(initialGoal); const [linkedFocusPlanItemId, setLinkedFocusPlanItemId] = useState(initialFocusPlanItemId); const [selectedGoalId, setSelectedGoalId] = useState(null); - const [resumeGoal, setResumeGoal] = useState(''); - const [showResumePrompt, setShowResumePrompt] = useState(false); const [hasHydratedSelection, setHasHydratedSelection] = useState(false); const [selectionOverride, setSelectionOverride] = useState({ sound: false, @@ -290,24 +288,19 @@ export const useSpaceWorkspaceSelection = ({ ]); const handleGoalChipSelect = useCallback((chip: GoalChip) => { - setShowResumePrompt(false); setLinkedFocusPlanItemId(null); setSelectedGoalId(chip.id); setGoalInput(chip.label); }, []); const handleGoalChange = useCallback((value: string) => { - if (showResumePrompt) { - setShowResumePrompt(false); - } - setLinkedFocusPlanItemId(null); setGoalInput(value); if (value.trim().length === 0) { setSelectedGoalId(null); } - }, [showResumePrompt]); + }, []); useEffect(() => { const storedSelection = readStoredWorkspaceSelection(); @@ -325,7 +318,6 @@ export const useSpaceWorkspaceSelection = ({ storedSelection.soundPresetId && SOUND_PRESETS.some((preset) => preset.id === storedSelection.soundPresetId) ? storedSelection.soundPresetId : null; - const restoredGoal = storedSelection.goal?.trim() ?? ''; const rafId = window.requestAnimationFrame(() => { setSelectionOverride(restoredSelectionOverride); @@ -341,11 +333,6 @@ export const useSpaceWorkspaceSelection = ({ setSelectedPresetId(restoredSoundPresetId); } - if (restoredGoal.length > 0) { - setResumeGoal(restoredGoal); - setShowResumePrompt(true); - } - setHasHydratedSelection(true); }); @@ -428,7 +415,6 @@ export const useSpaceWorkspaceSelection = ({ setGoalInput(currentSession.goal); setLinkedFocusPlanItemId(currentSession.focusPlanItemId ?? null); setSelectedGoalId(null); - setShowResumePrompt(false); }); return () => { @@ -442,8 +428,6 @@ export const useSpaceWorkspaceSelection = ({ selectedDurationMinutes, selectedPresetId, goalInput, - showResumePrompt, - resumeGoal, selectionOverride, }); @@ -463,8 +447,6 @@ export const useSpaceWorkspaceSelection = ({ goalInput, linkedFocusPlanItemId, selectedGoalId, - resumeGoal, - showResumePrompt, hasHydratedSelection, selectionOverride, selectedScene, @@ -474,8 +456,6 @@ export const useSpaceWorkspaceSelection = ({ setGoalInput, setLinkedFocusPlanItemId, setSelectedGoalId, - setShowResumePrompt, - setResumeGoal, handleSelectScene, handleSelectDuration, handleSelectSound, diff --git a/src/widgets/space-workspace/model/useSpaceWorkspaceSessionControls.ts b/src/widgets/space-workspace/model/useSpaceWorkspaceSessionControls.ts index 2f50e00..88a2010 100644 --- a/src/widgets/space-workspace/model/useSpaceWorkspaceSessionControls.ts +++ b/src/widgets/space-workspace/model/useSpaceWorkspaceSessionControls.ts @@ -61,7 +61,6 @@ interface UseSpaceWorkspaceSessionControlsParams { setGoalInput: (value: string) => void; setLinkedFocusPlanItemId: (value: string | null) => void; setSelectedGoalId: (value: string | null) => void; - setShowResumePrompt: (value: boolean) => void; } export const useSpaceWorkspaceSessionControls = ({ @@ -94,7 +93,6 @@ export const useSpaceWorkspaceSessionControls = ({ setGoalInput, setLinkedFocusPlanItemId, setSelectedGoalId, - setShowResumePrompt, }: UseSpaceWorkspaceSessionControlsParams) => { const queuedFocusStatusMessageRef = useRef(null); const lastSoundPlaybackErrorRef = useRef(null); @@ -115,12 +113,11 @@ export const useSpaceWorkspaceSessionControls = ({ return; } - setShowResumePrompt(false); setPendingSessionEntryPoint(entryPoint); setPreviewPlaybackState('paused'); setWorkspaceMode('focus'); queuedFocusStatusMessageRef.current = copy.space.workspace.readyToStart; - }, [setPendingSessionEntryPoint, setPreviewPlaybackState, setShowResumePrompt, setWorkspaceMode]); + }, [setPendingSessionEntryPoint, setPreviewPlaybackState, setWorkspaceMode]); const startFocusFlow = useCallback(async () => { const trimmedGoal = goalInput.trim(); @@ -266,7 +263,6 @@ export const useSpaceWorkspaceSessionControls = ({ setGoalInput(trimmedNextGoal); setLinkedFocusPlanItemId(nextState.nextSession.focusPlanItemId ?? null); setSelectedGoalId(null); - setShowResumePrompt(false); setPendingSessionEntryPoint('goal-complete'); setPreviewPlaybackState('running'); setWorkspaceMode('focus'); @@ -289,7 +285,6 @@ export const useSpaceWorkspaceSessionControls = ({ setPendingSessionEntryPoint, setPreviewPlaybackState, setSelectedGoalId, - setShowResumePrompt, setWorkspaceMode, unlockPlayback, ]); @@ -313,7 +308,6 @@ export const useSpaceWorkspaceSessionControls = ({ return null; } - setShowResumePrompt(false); setPendingSessionEntryPoint('space-setup'); setPreviewPlaybackState('paused'); setWorkspaceMode('setup'); @@ -325,7 +319,6 @@ export const useSpaceWorkspaceSessionControls = ({ pushStatusLine, setPendingSessionEntryPoint, setPreviewPlaybackState, - setShowResumePrompt, setWorkspaceMode, ]); @@ -348,7 +341,6 @@ export const useSpaceWorkspaceSessionControls = ({ return null; } - setShowResumePrompt(false); setPendingSessionEntryPoint('space-setup'); setPreviewPlaybackState('paused'); setWorkspaceMode('setup'); @@ -360,7 +352,6 @@ export const useSpaceWorkspaceSessionControls = ({ pushStatusLine, setPendingSessionEntryPoint, setPreviewPlaybackState, - setShowResumePrompt, setWorkspaceMode, ]); @@ -383,7 +374,6 @@ export const useSpaceWorkspaceSessionControls = ({ return null; } - setShowResumePrompt(false); setPendingSessionEntryPoint('space-setup'); setPreviewPlaybackState('paused'); setWorkspaceMode('setup'); @@ -395,7 +385,6 @@ export const useSpaceWorkspaceSessionControls = ({ pushStatusLine, setPendingSessionEntryPoint, setPreviewPlaybackState, - setShowResumePrompt, setWorkspaceMode, ]); @@ -477,7 +466,6 @@ export const useSpaceWorkspaceSessionControls = ({ setGoalInput(updatedSession.goal); setLinkedFocusPlanItemId(updatedSession.focusPlanItemId ?? null); setSelectedGoalId(null); - setShowResumePrompt(false); return true; }, [ currentSession, @@ -485,7 +473,6 @@ export const useSpaceWorkspaceSessionControls = ({ setGoalInput, setLinkedFocusPlanItemId, setSelectedGoalId, - setShowResumePrompt, updateCurrentIntent, ]); diff --git a/src/widgets/space-workspace/model/useWorkspacePersistence.ts b/src/widgets/space-workspace/model/useWorkspacePersistence.ts index d298cc5..98869fd 100644 --- a/src/widgets/space-workspace/model/useWorkspacePersistence.ts +++ b/src/widgets/space-workspace/model/useWorkspacePersistence.ts @@ -11,8 +11,6 @@ interface UseWorkspacePersistenceParams { selectedDurationMinutes: number; selectedPresetId: string; goalInput: string; - showResumePrompt: boolean; - resumeGoal: string; selectionOverride: SelectionOverride; } @@ -22,8 +20,6 @@ export const useWorkspacePersistence = ({ selectedDurationMinutes, selectedPresetId, goalInput, - showResumePrompt, - resumeGoal, selectionOverride, }: UseWorkspacePersistenceParams) => { useEffect(() => { @@ -31,30 +27,21 @@ export const useWorkspacePersistence = ({ return; } - const normalizedGoal = goalInput.trim().length > 0 - ? goalInput.trim() - : showResumePrompt - ? resumeGoal - : ''; - window.localStorage.setItem( WORKSPACE_SELECTION_STORAGE_KEY, JSON.stringify({ sceneId: selectedScene.id, durationMinutes: selectedDurationMinutes, soundPresetId: selectedPresetId, - goal: normalizedGoal, override: selectionOverride, }), ); }, [ goalInput, hasHydratedSelection, - resumeGoal, selectedPresetId, selectedScene.id, selectedDurationMinutes, selectionOverride, - showResumePrompt, ]); }; diff --git a/src/widgets/space-workspace/model/workspaceSelection.ts b/src/widgets/space-workspace/model/workspaceSelection.ts index 232167e..70c5264 100644 --- a/src/widgets/space-workspace/model/workspaceSelection.ts +++ b/src/widgets/space-workspace/model/workspaceSelection.ts @@ -14,7 +14,6 @@ export interface StoredWorkspaceSelection { sceneId?: string; durationMinutes?: number; soundPresetId?: string; - goal?: string; override?: Partial; } diff --git a/src/widgets/space-workspace/ui/SpaceWorkspaceWidget.tsx b/src/widgets/space-workspace/ui/SpaceWorkspaceWidget.tsx index 6f93318..9b15d1b 100644 --- a/src/widgets/space-workspace/ui/SpaceWorkspaceWidget.tsx +++ b/src/widgets/space-workspace/ui/SpaceWorkspaceWidget.tsx @@ -6,24 +6,20 @@ import { preloadAssetImage, useMediaCatalog, } from "@/entities/media"; -import { usePlanTier } from "@/entities/plan"; import { getSceneById, SCENE_THEMES } from "@/entities/scene"; -import { GOAL_CHIPS, SOUND_PRESETS, useThoughtInbox } from "@/entities/session"; +import { useThoughtInbox } from "@/entities/session"; import { focusSessionApi, type CompletionResult, type CurrentSessionThought, useFocusSessionEngine, } from "@/features/focus-session"; -import { useFocusStats } from "@/features/stats"; import { useSoundPlayback, useSoundPresetSelection, } from "@/features/sound-preset"; import { useHudStatusLine } from "@/shared/lib/useHudStatusLine"; -import { copy } from "@/shared/i18n"; import { SpaceFocusHudWidget } from "@/widgets/space-focus-hud"; -import { SpaceSetupDrawerWidget } from "@/widgets/space-setup-drawer"; import { CompletionResultModal } from "@/widgets/space-focus-hud/ui/CompletionResultModal"; import { findAtmosphereOptionForSelection, @@ -35,7 +31,6 @@ import type { SessionEntryPoint, WorkspaceMode } from "../model/types"; import { useSpaceWorkspaceSelection } from "../model/useSpaceWorkspaceSelection"; import { useSpaceWorkspaceSessionControls } from "../model/useSpaceWorkspaceSessionControls"; import { - DURATION_SELECTION_OPTIONS, resolveFocusTimeDisplayFromDurationMinutes, resolveInitialDurationMinutes, } from "../model/workspaceSelection"; @@ -55,8 +50,6 @@ export const SpaceWorkspaceWidget = () => { usedFallbackManifest, hasResolvedManifest, } = useMediaCatalog(); - const { isPro } = usePlanTier(); - const { review, summary: weeklySummary } = useFocusStats(); const initialSceneId = useMemo(() => SCENE_THEMES[0].id, []); const initialScene = useMemo( @@ -88,7 +81,6 @@ export const SpaceWorkspaceWidget = () => { >("paused"); const [pendingSessionEntryPoint, setPendingSessionEntryPoint] = useState("space-setup"); - const [showReviewTeaserAfterComplete, setShowReviewTeaserAfterComplete] = useState(false); const [, setCurrentSessionThoughts] = useState([]); const [pendingCompletionResult, setPendingCompletionResult] = useState(null); @@ -190,31 +182,8 @@ export const SpaceWorkspaceWidget = () => { setGoalInput: selection.setGoalInput, setLinkedFocusPlanItemId: selection.setLinkedFocusPlanItemId, setSelectedGoalId: selection.setSelectedGoalId, - setShowResumePrompt: selection.setShowResumePrompt, }); - - const hasEnoughWeeklyData = - weeklySummary.last7Days.startedSessions >= 3 && - (weeklySummary.last7Days.completedSessions >= 2 || - weeklySummary.recovery.pausedSessions > 0); - const shouldShowSecondaryReviewTeaser = - workspaceMode === "setup" && - showReviewTeaserAfterComplete && - hasEnoughWeeklyData; const didResolveEntryRouteRef = useRef(false); - const secondaryReviewTeaser = shouldShowSecondaryReviewTeaser - ? { - title: isPro - ? copy.space.setup.reviewTeaserTitlePro - : copy.space.setup.reviewTeaserTitle, - summary: isPro - ? review.carryForward.keepDoing - : copy.space.setup.reviewTeaserHelper, - ctaHref: "/stats", - ctaLabel: copy.space.setup.reviewTeaserCta, - onDismiss: () => setShowReviewTeaserAfterComplete(false), - } - : undefined; useEffect(() => { if (!isBootstrapping && !currentSession && !pendingCompletionResult) { @@ -302,58 +271,6 @@ export const SpaceWorkspaceWidget = () => {
- - selection.handleSelectDuration(durationMinutes, true) - } - onSoundSelect={(presetId) => - selection.handleSelectSound(presetId, true) - } - onGoalChange={selection.handleGoalChange} - onGoalChipSelect={selection.handleGoalChipSelect} - onStart={() => { - setShowReviewTeaserAfterComplete(false); - controls.handleSetupFocusOpen(); - }} - reviewTeaser={secondaryReviewTeaser} - resumeHint={ - selection.showResumePrompt && selection.resumeGoal - ? { - goal: selection.resumeGoal, - onResume: () => { - setShowReviewTeaserAfterComplete(false); - selection.setGoalInput(selection.resumeGoal); - selection.setSelectedGoalId(null); - selection.setShowResumePrompt(false); - controls.openFocusMode( - selection.resumeGoal, - "resume-restore", - ); - }, - onStartFresh: () => { - setShowReviewTeaserAfterComplete(false); - selection.setGoalInput(""); - selection.setSelectedGoalId(null); - selection.setShowResumePrompt(false); - }, - } - : undefined - } - /> - {isFocusMode ? ( { onClose={() => { setPendingCompletionResult(null); setCurrentSessionThoughts([]); - router.replace('/app'); + void router.replace('/app'); }} />