68fed087-9049-446f-bfc5-3f8.../Sources/engine
徐翔宇 2aa68c2427 feat(pomodoro): focus quality score (idle gap tracking)
New cross-cutting metric: each focus phase accumulates SystemIdle
seconds > 30s, then on phase end computes quality = 10 × (1 -
idle/total). Today's average is published as pomodoroQualityTodayAvg
and rendered as a third stat card in PomodoroView.

Rationale: pomodoro phases counted but not graded conflate "actually
focused 25min" with "started the timer, opened YouTube, came back."
The idle accumulator catches Slack/IDE-switch/AFK distractions.

Threshold > 30s drops "I'm thinking about the algorithm" false
positives (most code-think pauses last <30s, the user still moves
the mouse / scrolls / glances).

Score color: ≥8 lime, ≥5 tomato, <5 alertRed. Em-dash when n=0.

Persisted as [String: [Double]] (date → list of quality scores) so
day rollover preserves history for future trend chart.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 09:52:27 +08:00
..
NotificationCenter.swift fix: pomodoro paused-in-break fraction + notif status wired to store 2026-05-19 17:54:28 +08:00
SoundPlayer.swift feat(clockout): celebration on boundary cross 2026-05-20 09:48:21 +08:00
SystemIdle.swift feat: v0.2.0 — sleep-aware timers + auto-loop pomodoro 2026-04-30 11:23:09 +08:00
WorkerDebugLog.swift v0.1.0: initial 摸鱼侠 — Worker Toolkit plugin for MioIsland 2026-04-27 20:21:12 +08:00
WorkerStore.swift feat(pomodoro): focus quality score (idle gap tracking) 2026-05-20 09:52:27 +08:00