Skip to content

v1.0.3

Latest

Choose a tag to compare

@gabrielzschmitz gabrielzschmitz released this 19 Jul 14:37

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 — HistSessionsForDay and GetPomodoroHistoryDay
    now compute duration via the pomodoro formula (cycles × work + (cycles−1) × short + long) instead of relying on current_step_time or total_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 by tomato -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 by session_index and
    uses the formula for focus time instead of summing current_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 from start_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 today number 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_r replaces non-reentrant localtime
    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 from total_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.