Tomato.C v1.0.3
Patch release fixing session duration calculations to include short and long
breaks, deduplicating history log records for accurate statistics, and adding
comprehensive unit tests for edge-case handling of the history subsystem.
What's fixed/changed
- Accurate session duration —
HistSessionsForDayandGetPomodoroHistoryDay
now compute duration via the pomodoro formula (cycles × work + (cycles−1) × short + long) instead of relying oncurrent_step_timeortotal_elapsed.
This gives the correct planned session length including all breaks,
regardless of how the session ended - History overview matching per-day display —
createPomodoroHistoryStats
(used bytomato -h) now counts total session time including pauses instead
of work-only minutes, making the overview consistent with the per-day
breakdown - TUI history statistics no longer overcounts — the statistics dialog
(CreateHistoryStatsDialog) deduplicates log records bysession_indexand
uses the formula for focus time instead of summingcurrent_step_time / 60
across every per-minute record, which was inflating session count and focus
minutes by 145× per session - Day history dialog shows real end time — end times are now read from
session_start_time + total_elapsed(the actual wall-clock end of the
session), not derived fromstart_time + formula_duration. Skipped sessions
correctly display their real (instantaneous) end time - Session row numbering is now per-day sequential — history dialogs and
tomato -h todaynumber sessions 1, 2, 3… per day instead of showing the global
session_index, which could start at arbitrary numbers like#8 - Thread-safe time functions —
localtime_rreplaces non-reentrantlocaltime
in all history display functions - Session count in
-h today— fixed a bug where sessions existed but the
output incorrectly showed "No pomodoro history found." - 8 new unit tests for
HistSessionsForDay— covering skipped sessions
(endTime == startTime), multi-record deduplication, formula-based duration,
end-time fromtotal_elapsed, uncompleted sessions (duration 0), same-day
multiple sessions, and day filtering
Full changelog: CHANGELOG.md
To update, rebuild from source with ./build.sh --install. See the
README for details.