Statistics
{#each [["today", "Today"], ["weekly", "Weekly"], ["monthly", "Monthly"]] as [tab, label]}
activeTab = tab as any} > {label}
{/each}
{#if activeTab === "today"}
Today
{stats?.todayCompleted ?? 0}
Breaks taken
{compliancePercent}%
Compliance
{breakTimeFormatted()}
Break time
{stats?.todaySkipped ?? 0}
Skipped
{#if $config.daily_goal_enabled}
Daily Goal
{goalPercent}%
{stats?.dailyGoalProgress ?? 0} / {$config.daily_goal_breaks} breaks
{stats?.dailyGoalMet ? "Goal reached!" : `${$config.daily_goal_breaks - (stats?.dailyGoalProgress ?? 0)} more to go`}
{/if}
Streak
Current streak
Consecutive days with breaks
{stats?.currentStreak ?? 0}
Best streak
All-time record
{stats?.bestStreak ?? 0}
{#if nextMilestone()}
Next milestone
{nextMilestone()} day streak
{nextMilestone()! - (stats?.currentStreak ?? 0)} days away
{/if}
Last 7 Days
{#if history.length > 0}
Break history for the last {history.length} days
Date
Completed
Skipped
{#each history as day}
{day.date}
{day.breaksCompleted}
{day.breaksSkipped}
{/each}
{/if}
Completed
Skipped
{:else if activeTab === "weekly"}
{#each weeklySummaries as week, i} {@const prevWeek = weeklySummaries[i + 1]} {@const trend = prevWeek ? week.complianceRate - prevWeek.complianceRate : 0}
Week of {week.weekStart}
{week.totalCompleted}
Completed
{week.totalSkipped}
Skipped
{Math.round(week.complianceRate * 100)}%
Compliance
Avg {week.avgDailyCompleted.toFixed(1)} breaks/day
{#if prevWeek}
{#if trend > 0}
{:else if trend < 0}
{:else}
{/if} {Math.abs(Math.round(trend * 100))}%
{/if}
{/each}
{:else}
Last 30 Days
{#if monthHistory.length > 0}
Break history for the last {monthHistory.length} days
Date
Completed
Skipped
{#each monthHistory as day}
{day.date}
{day.breaksCompleted}
{day.breaksSkipped}
{/each}
{/if}
Completed
Skipped
Activity Heatmap
{#if monthHistory.length > 0}
Activity heatmap for the last {monthHistory.length} days
Date
Breaks completed
{#each monthHistory as day}
{day.date}
{day.breaksCompleted}
{/each}
{/if}
Less
More
Monthly Summary
{monthTotalCompleted}
Total breaks
{monthAvgCompliance()}%
Avg compliance
{Math.floor(monthTotalTime / 60)} min
Total break time
{(monthTotalCompleted / 30).toFixed(1)}
Avg daily breaks
{/if}