fix(space): break와 recovery 상태의 완료 경로 복구
This commit is contained in:
@@ -22,6 +22,7 @@ interface NextMicroStepPromptProps {
|
||||
error: string | null;
|
||||
onKeepGoalOnly: () => void;
|
||||
onDefineNext: () => void;
|
||||
onFinish: () => void;
|
||||
}
|
||||
|
||||
export const NextMicroStepPrompt = ({
|
||||
@@ -31,6 +32,7 @@ export const NextMicroStepPrompt = ({
|
||||
error,
|
||||
onKeepGoalOnly,
|
||||
onDefineNext,
|
||||
onFinish,
|
||||
}: NextMicroStepPromptProps) => {
|
||||
const trimmedGoal = goal.trim();
|
||||
|
||||
@@ -106,6 +108,20 @@ export const NextMicroStepPrompt = ({
|
||||
<span aria-hidden className={cn(HUD_OPTION_CHEVRON, 'mt-[2px]')}>→</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="mt-4 border-t border-white/8 pt-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onFinish}
|
||||
disabled={isSubmitting}
|
||||
className="text-[12px] font-medium tracking-[0.08em] text-white/58 underline decoration-white/12 underline-offset-4 transition-colors hover:text-white/82 hover:decoration-white/24 disabled:cursor-default disabled:text-white/26 disabled:no-underline"
|
||||
>
|
||||
{copy.space.focusHud.microStepPromptFinish}
|
||||
</button>
|
||||
<p className="mt-1.5 max-w-[20.5rem] text-[12px] leading-[1.55] text-white/42">
|
||||
{copy.space.focusHud.microStepPromptFinishHint}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,7 @@ interface PauseRefocusPromptProps {
|
||||
isBusy: boolean;
|
||||
onRefocus: () => void;
|
||||
onKeepCurrent: () => void;
|
||||
onFinish: () => void;
|
||||
}
|
||||
|
||||
export const PauseRefocusPrompt = ({
|
||||
@@ -30,6 +31,7 @@ export const PauseRefocusPrompt = ({
|
||||
isBusy,
|
||||
onRefocus,
|
||||
onKeepCurrent,
|
||||
onFinish,
|
||||
}: PauseRefocusPromptProps) => {
|
||||
return (
|
||||
<div
|
||||
@@ -88,6 +90,20 @@ export const PauseRefocusPrompt = ({
|
||||
<span aria-hidden className={cn(HUD_OPTION_CHEVRON, 'mt-[2px]')}>→</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="mt-4 border-t border-white/8 pt-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onFinish}
|
||||
disabled={isBusy}
|
||||
className="text-[12px] font-medium tracking-[0.08em] text-white/58 underline decoration-white/12 underline-offset-4 transition-colors hover:text-white/82 hover:decoration-white/24 disabled:cursor-default disabled:text-white/26 disabled:no-underline"
|
||||
>
|
||||
{copy.space.focusHud.pausePromptFinish}
|
||||
</button>
|
||||
<p className="mt-1.5 max-w-[20.5rem] text-[12px] leading-[1.55] text-white/42">
|
||||
{copy.space.focusHud.pausePromptFinishHint}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@ interface ReturnPromptProps {
|
||||
onRefocus: () => void;
|
||||
onRest?: () => void;
|
||||
onNextGoal?: () => void;
|
||||
onFinish: () => void;
|
||||
}
|
||||
|
||||
export const ReturnPrompt = ({
|
||||
@@ -40,6 +41,7 @@ export const ReturnPrompt = ({
|
||||
onRefocus,
|
||||
onRest,
|
||||
onNextGoal,
|
||||
onFinish,
|
||||
}: ReturnPromptProps) => {
|
||||
const isBreakReturn = mode === 'break';
|
||||
|
||||
@@ -166,6 +168,30 @@ export const ReturnPrompt = ({
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-4 border-t border-white/8 pt-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onFinish}
|
||||
disabled={isBusy}
|
||||
className={cn(
|
||||
'text-[12px] font-medium tracking-[0.08em] underline underline-offset-4 transition-colors disabled:cursor-default disabled:no-underline',
|
||||
isBreakReturn
|
||||
? 'text-emerald-50/68 decoration-emerald-100/18 hover:text-emerald-50/92 hover:decoration-emerald-100/32 disabled:text-emerald-50/28'
|
||||
: 'text-white/58 decoration-white/12 hover:text-white/82 hover:decoration-white/24 disabled:text-white/26',
|
||||
)}
|
||||
>
|
||||
{copy.space.focusHud.returnPromptFinish}
|
||||
</button>
|
||||
<p
|
||||
className={cn(
|
||||
'mt-1.5 max-w-[20.5rem] text-[12px] leading-[1.55]',
|
||||
isBreakReturn ? 'text-emerald-50/46' : 'text-white/42',
|
||||
)}
|
||||
>
|
||||
{copy.space.focusHud.returnPromptFinishHint}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -285,7 +285,7 @@ export const SpaceFocusHudWidget = ({
|
||||
goal={normalizedGoal}
|
||||
microStep={microStep}
|
||||
canRefocus={Boolean(hasActiveSession)}
|
||||
canComplete={hasActiveSession && sessionPhase === 'focus'}
|
||||
canComplete={hasActiveSession && (sessionPhase === 'focus' || sessionPhase === 'break')}
|
||||
showActions={!isIntentOverlayOpen}
|
||||
onOpenRefocus={() => openRefocus('goal', 'manual')}
|
||||
onMicroStepDone={() => {
|
||||
@@ -317,6 +317,10 @@ export const SpaceFocusHudWidget = ({
|
||||
handleDismissReturnPrompt();
|
||||
handleOpenCompleteSheet('next');
|
||||
}}
|
||||
onFinish={() => {
|
||||
handleDismissReturnPrompt();
|
||||
handleOpenCompleteSheet('choice');
|
||||
}}
|
||||
/>
|
||||
<PauseRefocusPrompt
|
||||
open={isPausedPromptOpen}
|
||||
@@ -326,6 +330,10 @@ export const SpaceFocusHudWidget = ({
|
||||
setOverlay('none');
|
||||
onStartRequested?.();
|
||||
}}
|
||||
onFinish={() => {
|
||||
setOverlay('none');
|
||||
handleOpenCompleteSheet('choice');
|
||||
}}
|
||||
/>
|
||||
<RefocusSheet
|
||||
open={isRefocusOpen}
|
||||
@@ -362,6 +370,10 @@ export const SpaceFocusHudWidget = ({
|
||||
void handleKeepGoalOnly();
|
||||
}}
|
||||
onDefineNext={handleDefineNextMicroStep}
|
||||
onFinish={() => {
|
||||
setIntentError(null);
|
||||
handleOpenCompleteSheet('choice');
|
||||
}}
|
||||
/>
|
||||
<GoalCompleteSheet
|
||||
open={isCompleteOpen}
|
||||
|
||||
Reference in New Issue
Block a user