From 2668401104a3bef4b96440c1067a716da7c0b0eb Mon Sep 17 00:00:00 2001 From: Jake Date: Sun, 26 Apr 2026 19:38:31 +0100 Subject: [PATCH] =?UTF-8?q?feat(ux):=20B3.1=20+=20B3.4=20=E2=80=94=20fresh?= =?UTF-8?q?-start=20re-entry=20+=20MicroStep=20where-was-I?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit B3.1: app shell tracks lastLaunchAt; >7-day gap opens a 24h fresh-start window. While the window is active: a "Welcome back. This week starts fresh." banner offers Archive old Inbox (Inbox-only via archive_old_inbox_cmd, system-attributable copy on success), the morning-triage modal is suppressed, the momentum sparkline is hidden, and the nudge bus stays quiet. Banner is per-session dismissable. B3.4: MicroSteps shows a "Last completed: X. Next: Y." re-orientation banner when re-opening a parent task whose decomposition has been idle >=30 min OR sat across a session boundary. Speaker button reads the banner aloud via existing TTS. Per-parent last-activity timestamps are persisted to a single localStorage key. Banner self-dismisses on first interaction. Shared inFreshStartWindow gate extracted to src/lib/utils/freshStart.ts so ShutdownRitualPage (B3.14), TasksPage, MorningTriageModal, and nudgeBus all read the same source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lib/components/MicroSteps.svelte | 101 +++++++++++++++- src/lib/components/MorningTriageModal.svelte | 6 + src/lib/pages/ShutdownRitualPage.svelte | 15 +-- src/lib/pages/TasksPage.svelte | 12 +- src/lib/stores/nudgeBus.svelte.ts | 5 + src/lib/utils/freshStart.ts | 119 +++++++++++++++++++ src/lib/utils/microstepActivity.ts | 92 ++++++++++++++ src/routes/+layout.svelte | 115 +++++++++++++++++- 8 files changed, 453 insertions(+), 12 deletions(-) create mode 100644 src/lib/utils/freshStart.ts create mode 100644 src/lib/utils/microstepActivity.ts diff --git a/src/lib/components/MicroSteps.svelte b/src/lib/components/MicroSteps.svelte index 9d05fa3..f9ff7b3 100644 --- a/src/lib/components/MicroSteps.svelte +++ b/src/lib/components/MicroSteps.svelte @@ -1,10 +1,14 @@