refactor(feedback): Focus 토스트를 상단 중앙 단일 채널로 통합

맥락:
- Focus 화면에서 토스트 위치가 Notes 저장/Goal 완료 상황마다 달라져 가독성과 일관성이 떨어졌습니다.

변경사항:
- HUD 내부 status line 렌더를 제거하고 상단 중앙 고정 토스트 컴포넌트를 추가했습니다.
- /space 루트에서 activeStatus를 상단 중앙 토스트로만 표시하도록 피드백 채널을 단일화했습니다.
- Undo 액션은 상단 중앙 토스트 내부 링크로 동일하게 노출되도록 유지했습니다.

검증:
- npx tsc --noEmit

세션-상태: Focus 피드백 채널이 상단 중앙 1곳으로 통일됨
세션-다음: work.md 작업 1부터 Pro/플랜 잠금 정책 재구성 진행
세션-리스크: 기존 lint 규칙의 set-state-in-effect 오류는 별도 축으로 남아 있음
This commit is contained in:
2026-03-05 17:03:00 +09:00
parent f3f0518588
commit a056fc841e
4 changed files with 53 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import type { HudStatusLineItem, HudStatusLinePayload } from '@/shared/lib/useHudStatusLine';
import type { HudStatusLinePayload } from '@/shared/lib/useHudStatusLine';
import { useReducedMotion } from '@/shared/lib/useReducedMotion';
import { SpaceTimerHudWidget } from '@/widgets/space-timer-hud';
import { GoalCompleteSheet } from './GoalCompleteSheet';
@@ -10,8 +10,6 @@ interface SpaceFocusHudWidgetProps {
timerLabel: string;
visible: boolean;
onGoalUpdate: (nextGoal: string) => void;
statusLine: HudStatusLineItem | null;
onStatusAction: () => void;
onStatusMessage: (payload: HudStatusLinePayload) => void;
}
@@ -20,8 +18,6 @@ export const SpaceFocusHudWidget = ({
timerLabel,
visible,
onGoalUpdate,
statusLine,
onStatusAction,
onStatusMessage,
}: SpaceFocusHudWidgetProps) => {
const reducedMotion = useReducedMotion();
@@ -100,18 +96,9 @@ export const SpaceFocusHudWidget = ({
<SpaceTimerHudWidget
timerLabel={timerLabel}
goal={goal}
statusLine={
statusLine
? {
message: statusLine.message,
actionLabel: statusLine.action?.label,
}
: null
}
isImmersionMode
className="pr-[4.2rem]"
onGoalCompleteRequest={handleOpenCompleteSheet}
onStatusAction={onStatusAction}
onPlaybackStateChange={(state) => {
if (reducedMotion) {
playbackStateRef.current = state;