feat(resume): 지난 한 조각 이어서 시작하는 진입 플로우 추가

맥락:
- /space 재진입 시 마지막 목표를 다시 쓰게 되어 시작 마찰이 컸다.
- work.md 작업 2 요구사항에 맞춰 목표 기반 Resume CTA를 진입 의식 안에 추가했다.

변경사항:
- workspace localStorage 스키마에 goal 필드를 추가하고 저장/복원에 반영했다.
- Setup Ritual에 지난 한 조각 이어서 블록을 추가했다.
- 이어서 시작은 저장 목표로 즉시 Focus 전환, 새로 시작은 목표 초기화 후 새 세션 입력으로 전환하도록 연결했다.
- session 문서 docs/session_brief.md, docs/90_current_state.md를 최신 상태로 갱신했다.

검증:
- npx tsc --noEmit

세션-상태: Resume CTA와 목표 복원 흐름이 /space 진입에 반영됨
세션-다음: Goal Complete 루프와 Recover(Notes→Inbox) 플로우 마감
세션-리스크: localStorage 기반 복원이라 다중 탭/스토리지 초기화 시 세션 연속성이 약할 수 있음
This commit is contained in:
2026-03-05 18:18:13 +09:00
parent 8917cd8e77
commit 5f7ca99f44
4 changed files with 88 additions and 14 deletions

View File

@@ -28,6 +28,11 @@ interface SpaceSetupDrawerWidgetProps {
onGoalChange: (value: string) => void;
onGoalChipSelect: (chip: GoalChip) => void;
onStart: () => void;
resumeHint?: {
goal: string;
onResume: () => void;
onStartFresh: () => void;
};
}
interface SummaryChipProps {
@@ -74,6 +79,7 @@ export const SpaceSetupDrawerWidget = ({
onGoalChange,
onGoalChipSelect,
onStart,
resumeHint,
}: SpaceSetupDrawerWidgetProps) => {
const [openPopover, setOpenPopover] = useState<RitualPopover | null>(null);
const panelRef = useRef<HTMLDivElement | null>(null);
@@ -151,6 +157,29 @@ export const SpaceSetupDrawerWidget = ({
<p className="text-xs text-white/60"> Focus .</p>
</header>
{resumeHint ? (
<div className="mb-3 rounded-2xl border border-white/14 bg-black/22 px-3 py-2.5">
<p className="text-[11px] text-white/62"> </p>
<p className="mt-1 truncate text-sm text-white/88">{resumeHint.goal}</p>
<div className="mt-2 flex items-center justify-end gap-1.5">
<button
type="button"
onClick={resumeHint.onStartFresh}
className="rounded-full border border-white/16 bg-white/[0.04] px-2.5 py-1 text-[11px] text-white/72 transition-colors hover:bg-white/[0.1]"
>
</button>
<button
type="button"
onClick={resumeHint.onResume}
className="rounded-full border border-sky-200/34 bg-sky-200/14 px-2.5 py-1 text-[11px] text-white/90 transition-colors hover:bg-sky-200/22"
>
</button>
</div>
</div>
) : null}
<div className="relative mb-3">
<div className="flex flex-wrap gap-1.5">
<SummaryChip