diff --git a/src/lib/stores/page.svelte.ts b/src/lib/stores/page.svelte.ts index aa85516..6196318 100644 --- a/src/lib/stores/page.svelte.ts +++ b/src/lib/stores/page.svelte.ts @@ -82,6 +82,7 @@ const defaults: SettingsState = { nudgesEnabled: false, nudgesMuted: false, nudgesSpeakAloud: false, + showMomentumSparkline: true, }; function canUseStorage(): boolean { diff --git a/src/lib/types/app.ts b/src/lib/types/app.ts index af160e3..655a1be 100644 --- a/src/lib/types/app.ts +++ b/src/lib/types/app.ts @@ -122,6 +122,12 @@ export interface SettingsState { * has effect when `nudgesEnabled` is true. */ nudgesSpeakAloud: boolean; + /** + * Phase 8. Controls the 7-day momentum sparkline only. The "N today" + * badge on the Tasks header is always on regardless. Default true so + * existing users see the sparkline on upgrade. + */ + showMomentumSparkline: boolean; } export interface Profile { @@ -224,6 +230,15 @@ export interface TranscriptMetaPatch { */ export type EnergyLevel = "high" | "medium" | "brain_dead"; +/** + * Phase 8: one bucket in the 7-day completion history fed to the + * momentum sparkline. `day` is "YYYY-MM-DD" local time. + */ +export interface DailyCompletionCount { + day: string; // "YYYY-MM-DD" local + count: number; +} + export interface TaskDto { id: string; text: string;