Skip to content

Releases: umpire274/rTimelogger

v0.8.6

11 Feb 15:03

Choose a tag to compare

Changelog

[0.8.6] - 2026-02-10

Added

  • New Sick Leave position (--pos s)
  • Optional range support via --to (start date is the command DATE)
  • Automatic skipping of:
    • Weekends (Saturday/Sunday)
    • National holidays
    • Dates already containing events

Changed

  • Sick Leave is now stored as a non-working marker day (sentinel event at 00:00, similar to Holiday)
  • list rendering updated:
    • IN/OUT/TGT displayed as --:--
    • Sick Leave days do not contribute to ΔWORK totals
  • CLI validation improved:
    • --to is only allowed with --pos s
    • If --to is omitted, Sick Leave applies only to the specified DATE
  • recalc_pairs_for_date updated to accept &Connection
  • Refactored add flow to cleanly separate:
    • marker days
    • working days
    • range handling

Fixed

  • Prevented 00:00 IN time from being displayed for Sick Leave
  • Prevented incorrect surplus/deficit calculations for Sick Leave days
  • Improved argument validation consistency in add

v0.8.5 — 2026-01-13

Added

  • Enhanced add command to display the calculated target exit time (TGT)
    immediately after adding an IN event.

Changed

  • Unified IN and OUT event creation through a shared CLI helper.
  • Removed duplicated upsert logic in edit and insert modes.
  • Reused existing time formatting utilities for target time rendering.

Internal

  • Refactored add command logic to improve readability and maintainability
    without changing existing behavior.

v0.8.4 — 2026-01-09

Changed

  • Improved list command output for National Holiday days:
    • time placeholders (--:--) are no longer shown
    • the meta field is displayed instead, providing a meaningful holiday description
  • Made National Holiday row layout adaptive to table width:
    • meta column now expands dynamically based on the current table layout
    • works consistently across weekday display modes and --compact
  • Unified and hardened meta rendering:
    • meta values are filtered, concatenated, and truncated in a single helper
    • truncation is Unicode-safe (char-based, UTF-8 safe)
    • optional ellipsis () is applied when truncation occurs
  • Added focused unit tests for get_meta_string to validate:
    • filtering of empty metadata
    • correct concatenation
    • Unicode-safe truncation behavior

Internal

  • Refactored list rendering logic to reduce hardcoded column widths
  • Improved robustness of table layout against future column size changes

[0.8.3] – 2026-01-08

✨ New features

  • Import data from JSON and CSV files

    • New import command to insert events into the database from external sources.
    • Supported formats:
      • JSON (flexible structures: root array, { days: [...] }, { holidays: [...] })
      • CSV (with header row).
    • Supported options:
      • --file <path>: input file
      • --format <json|csv> (default: json)
      • --dry-run: simulate the import without modifying the database
      • --replace: overwrite existing conflicting data
      • --source: logical label describing the data origin
  • National holidays support

    • Added new position NationalHoliday.
    • National holidays:
      • do not affect the user vacation balance
      • are compatible with automatic/preventive imports (e.g. yearly calendars).
  • Preventive holiday import

    • Allows preparing JSON/CSV files with annual holidays and importing them in advance.
    • Reduces manual errors and forgotten entries.

🔧 Improvements

  • Enhanced data source tracking

    • The source field of imported events now automatically includes the input format
      (e.g. import (from json), import (from csv)).
  • meta field support for imported events

    • Descriptive data (e.g. holiday name) is stored in the meta field as JSON.
    • Example:
      { "name": "New Year" }
  • Refactor of Event::new() constructor

    • The constructor now explicitly supports:
      • meta
      • source
    • Clear separation between CLI-created events and imported events.
  • Database query refactor

    • Split db::queries into topic-based submodules.
    • Fixed module conflict between queries.rs and queries/mod.rs.
  • Shared utilities

    • Added helper functions in utils::formatting to standardize source generation.

🛠 Fixes

  • Improved validation of imported records:
    • invalid dates
    • unsupported positions
    • malformed rows
  • Improved import reporting:
    • total rows
    • imported rows
    • skipped rows
    • conflicts
    • invalid rows

🧪 Developer notes

  • All import logic is isolated in the src/import module.
  • Full dry-run support for safe testing on real databases.
  • Solid foundation for future integrations (ICS calendars, APIs, external sync).

[0.8.2] — 2026-01-08

✨ Added

  • Added a new day position National holiday (N) to represent public holidays that do not affect personal holiday
    allowance.
  • Introduced support for --pos n / --pos national in the add command to mark national holidays.
  • Added idempotent database migration to extend the events.position CHECK constraint with the new N value.

🧠 Changed

  • Updated daily and compact list views to properly display National holiday days with neutral time and ΔWORK values.
  • Improved semantic distinction between Holiday (personal leave) and National holiday (public holiday) in
    reports and summaries.

🐞 Fixes

  • Ensured database migrations safely no-op when the schema is already aligned.
  • Fixed SQL escaping issues in migration logging statements.

🧹 Internal

  • Extended Location enum and related parsing/formatting utilities.
  • Refined migration logging for better traceability and robustness.

[0.8.1] - 2026-01-07

✨ New

  • Added list --compact output mode for a concise, single-line daily overview.
  • Introduced unified date column format YYYY-MM-DD (WD) with configurable weekday length.
  • Improved visual hierarchy for list --details with highlighted DETAILS section header.
  • Added dynamic table width handling based on weekday display mode (None, Short, Medium, Long).

🔧 Improvements

  • Refactored list command rendering logic for better layout consistency and maintainability.
  • Harmonized table headers and footers across standard and compact list views.
  • Improved footer alignment using dynamic table width calculation.
  • Clarified labels:
    • Expected → Target end
    • Surplus → ΔWORK
  • Enhanced compact delta formatting (e.g. +02h04m).
  • Automatic re-print of table headers when switching month during period listing.
  • Improved holiday visualization:
    • All time fields shown as --:--
    • Greyed output
    • Neutral contribution to totals.

🐞 Fixes

  • Fixed incorrect handling of --pos h (Holiday) requiring --in/--out.
  • Fixed misleading error classification (InvalidTime → InvalidArgs) for invalid CLI combinations.
  • Fixed surplus calculation edge cases when work gaps are present.
  • Fixed weekday width/layout inconsistencies across different display modes.
  • Removed unused variables and eliminated compiler warnings in list.rs.

🧹 Internal

  • Introduced WeekdayMode enum for explicit weekday rendering control.
  • Centralized table width logic via utils::table constants.
  • Simplified footer formatting and alignment logic.
  • Improved separation between presentation logic and data computation.

[v0.8.0] - 2025-12-18

🚀 Stable release — Timeline & Work Gap engine

This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.


✨ Highlights

  • Stable multi-pair daily model

    • Unlimited IN/OUT pairs per day
    • Persistent pair numbering
    • Fully deterministic timeline reconstruction
  • Working gap support (final)

    • Explicit --work-gap / --no-work-gap flags on OUT events
    • Gaps can be added, removed, or edited retroactively
    • Correct impact on worked time, expected exit, and surplus
    • Clear visual indicators (🔗 / ✂️)
  • Accurate time calculations

    • Worked time now correctly:
      • sums all pairs
      • subtracts non-working gaps
      • includes working gaps only when explicitly marked
    • Expected exit is consistently based on:
      • first IN of the day
      • configured minimum working time
      • lunch rules and windows
    • Surplus calculation is now fully reliable in all scenarios

🧠 Changed

  • OUT events without --pos now inherit the position of the corresponding IN
  • Day details view shows pair-level positions, not aggregated day position
  • Timeline, pairing, and gap logic fully unified across:
    • list
    • list --events
    • list --details
    • exports

🗄️ Database & Migration

  • New stable column events.work_gap
  • Safe, idempotent migrations with:
    • automatic schema alignment
    • backup before destructive changes
  • Automatic recalculation of pairs and daily summaries after edits

🖥️ CLI & UX

  • Unified message system across all commands:
    • ℹ️ info · ⚠️ warning · ❌ error · ✅ success
  • Clear, explicit confirmation messages for gap edits
  • Cleaner event listings:
    • no duplicated dates for multiple pairs
    • improved visual alignment

📦 Export system (stable)

  • Fully refactored export architecture
  • Supported formats:
    • CSV
    • JSON
    • XLSX
    • PDF (multipage, styled, dynamic titles)
  • Shared helpers and consistent overwrite handling

⚠️ Breaking changes

  • Legacy work_sessions table is no longer used
  • Timeline-based model is now the single source of truth
  • CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x

✅ Final not...

Read more

v0.8.5

13 Jan 09:55

Choose a tag to compare

Changelog

v0.8.5 — 2026-01-13

Added

  • Enhanced add command to display the calculated target exit time (TGT)
    immediately after adding an IN event.

Changed

  • Unified IN and OUT event creation through a shared CLI helper.
  • Removed duplicated upsert logic in edit and insert modes.
  • Reused existing time formatting utilities for target time rendering.

Internal

  • Refactored add command logic to improve readability and maintainability
    without changing existing behavior.

v0.8.4 — 2026-01-09

Changed

  • Improved list command output for National Holiday days:
    • time placeholders (--:--) are no longer shown
    • the meta field is displayed instead, providing a meaningful holiday description
  • Made National Holiday row layout adaptive to table width:
    • meta column now expands dynamically based on the current table layout
    • works consistently across weekday display modes and --compact
  • Unified and hardened meta rendering:
    • meta values are filtered, concatenated, and truncated in a single helper
    • truncation is Unicode-safe (char-based, UTF-8 safe)
    • optional ellipsis () is applied when truncation occurs
  • Added focused unit tests for get_meta_string to validate:
    • filtering of empty metadata
    • correct concatenation
    • Unicode-safe truncation behavior

Internal

  • Refactored list rendering logic to reduce hardcoded column widths
  • Improved robustness of table layout against future column size changes

[0.8.3] – 2026-01-08

✨ New features

  • Import data from JSON and CSV files

    • New import command to insert events into the database from external sources.
    • Supported formats:
      • JSON (flexible structures: root array, { days: [...] }, { holidays: [...] })
      • CSV (with header row).
    • Supported options:
      • --file <path>: input file
      • --format <json|csv> (default: json)
      • --dry-run: simulate the import without modifying the database
      • --replace: overwrite existing conflicting data
      • --source: logical label describing the data origin
  • National holidays support

    • Added new position NationalHoliday.
    • National holidays:
      • do not affect the user vacation balance
      • are compatible with automatic/preventive imports (e.g. yearly calendars).
  • Preventive holiday import

    • Allows preparing JSON/CSV files with annual holidays and importing them in advance.
    • Reduces manual errors and forgotten entries.

🔧 Improvements

  • Enhanced data source tracking

    • The source field of imported events now automatically includes the input format
      (e.g. import (from json), import (from csv)).
  • meta field support for imported events

    • Descriptive data (e.g. holiday name) is stored in the meta field as JSON.
    • Example:
      { "name": "New Year" }
  • Refactor of Event::new() constructor

    • The constructor now explicitly supports:
      • meta
      • source
    • Clear separation between CLI-created events and imported events.
  • Database query refactor

    • Split db::queries into topic-based submodules.
    • Fixed module conflict between queries.rs and queries/mod.rs.
  • Shared utilities

    • Added helper functions in utils::formatting to standardize source generation.

🛠 Fixes

  • Improved validation of imported records:
    • invalid dates
    • unsupported positions
    • malformed rows
  • Improved import reporting:
    • total rows
    • imported rows
    • skipped rows
    • conflicts
    • invalid rows

🧪 Developer notes

  • All import logic is isolated in the src/import module.
  • Full dry-run support for safe testing on real databases.
  • Solid foundation for future integrations (ICS calendars, APIs, external sync).

[0.8.2] — 2026-01-08

✨ Added

  • Added a new day position National holiday (N) to represent public holidays that do not affect personal holiday
    allowance.
  • Introduced support for --pos n / --pos national in the add command to mark national holidays.
  • Added idempotent database migration to extend the events.position CHECK constraint with the new N value.

🧠 Changed

  • Updated daily and compact list views to properly display National holiday days with neutral time and ΔWORK values.
  • Improved semantic distinction between Holiday (personal leave) and National holiday (public holiday) in
    reports and summaries.

🐞 Fixes

  • Ensured database migrations safely no-op when the schema is already aligned.
  • Fixed SQL escaping issues in migration logging statements.

🧹 Internal

  • Extended Location enum and related parsing/formatting utilities.
  • Refined migration logging for better traceability and robustness.

[0.8.1] - 2026-01-07

✨ New

  • Added list --compact output mode for a concise, single-line daily overview.
  • Introduced unified date column format YYYY-MM-DD (WD) with configurable weekday length.
  • Improved visual hierarchy for list --details with highlighted DETAILS section header.
  • Added dynamic table width handling based on weekday display mode (None, Short, Medium, Long).

🔧 Improvements

  • Refactored list command rendering logic for better layout consistency and maintainability.
  • Harmonized table headers and footers across standard and compact list views.
  • Improved footer alignment using dynamic table width calculation.
  • Clarified labels:
    • Expected → Target end
    • Surplus → ΔWORK
  • Enhanced compact delta formatting (e.g. +02h04m).
  • Automatic re-print of table headers when switching month during period listing.
  • Improved holiday visualization:
    • All time fields shown as --:--
    • Greyed output
    • Neutral contribution to totals.

🐞 Fixes

  • Fixed incorrect handling of --pos h (Holiday) requiring --in/--out.
  • Fixed misleading error classification (InvalidTime → InvalidArgs) for invalid CLI combinations.
  • Fixed surplus calculation edge cases when work gaps are present.
  • Fixed weekday width/layout inconsistencies across different display modes.
  • Removed unused variables and eliminated compiler warnings in list.rs.

🧹 Internal

  • Introduced WeekdayMode enum for explicit weekday rendering control.
  • Centralized table width logic via utils::table constants.
  • Simplified footer formatting and alignment logic.
  • Improved separation between presentation logic and data computation.

[v0.8.0] - 2025-12-18

🚀 Stable release — Timeline & Work Gap engine

This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.


✨ Highlights

  • Stable multi-pair daily model

    • Unlimited IN/OUT pairs per day
    • Persistent pair numbering
    • Fully deterministic timeline reconstruction
  • Working gap support (final)

    • Explicit --work-gap / --no-work-gap flags on OUT events
    • Gaps can be added, removed, or edited retroactively
    • Correct impact on worked time, expected exit, and surplus
    • Clear visual indicators (🔗 / ✂️)
  • Accurate time calculations

    • Worked time now correctly:
      • sums all pairs
      • subtracts non-working gaps
      • includes working gaps only when explicitly marked
    • Expected exit is consistently based on:
      • first IN of the day
      • configured minimum working time
      • lunch rules and windows
    • Surplus calculation is now fully reliable in all scenarios

🧠 Changed

  • OUT events without --pos now inherit the position of the corresponding IN
  • Day details view shows pair-level positions, not aggregated day position
  • Timeline, pairing, and gap logic fully unified across:
    • list
    • list --events
    • list --details
    • exports

🗄️ Database & Migration

  • New stable column events.work_gap
  • Safe, idempotent migrations with:
    • automatic schema alignment
    • backup before destructive changes
  • Automatic recalculation of pairs and daily summaries after edits

🖥️ CLI & UX

  • Unified message system across all commands:
    • ℹ️ info · ⚠️ warning · ❌ error · ✅ success
  • Clear, explicit confirmation messages for gap edits
  • Cleaner event listings:
    • no duplicated dates for multiple pairs
    • improved visual alignment

📦 Export system (stable)

  • Fully refactored export architecture
  • Supported formats:
    • CSV
    • JSON
    • XLSX
    • PDF (multipage, styled, dynamic titles)
  • Shared helpers and consistent overwrite handling

⚠️ Breaking changes

  • Legacy work_sessions table is no longer used
  • Timeline-based model is now the single source of truth
  • CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x

✅ Final notes

v0.8.0 represents a major architectural milestone.
The internal engine is now considered stable, correct, and extensible.

Future releases will focus on:

  • automated tests
  • performance refinements
  • advanced reporting and statistics

[v0.8.0-beta3] - 2025-12-15

✨ Added

  • 🔗 Working gap support between pairs via --work-gap flag on OUT events.
  • ✂️ Ability to remove a working gap using --no-work-gap in edit mode.
  • New work_gap boolean field stored in the events table.
  • Explicit confirmation messages when enabling or removing work gaps.

🧠 Changed

  • Expected / surplus calculation now correctly accounts for non-working gaps between pairs.
  • OUT events without --pos now inherit the position from the corresponding IN.
  • Day details view now shows the position of each pair, not the aggregated day position.
  • Improved visual output in list --events: repeated dates are no longer duplicated for multiple pairs.

🐞 Fixed

  • Incorrect surpl...
Read more

v0.8.4

09 Jan 11:09

Choose a tag to compare

Changelog

v0.8.4 — 2026-01-09

Changed

  • Improved list command output for National Holiday days:
    • time placeholders (--:--) are no longer shown
    • the meta field is displayed instead, providing a meaningful holiday description
  • Made National Holiday row layout adaptive to table width:
    • meta column now expands dynamically based on the current table layout
    • works consistently across weekday display modes and --compact
  • Unified and hardened meta rendering:
    • meta values are filtered, concatenated, and truncated in a single helper
    • truncation is Unicode-safe (char-based, UTF-8 safe)
    • optional ellipsis () is applied when truncation occurs
  • Added focused unit tests for get_meta_string to validate:
    • filtering of empty metadata
    • correct concatenation
    • Unicode-safe truncation behavior

Internal

  • Refactored list rendering logic to reduce hardcoded column widths
  • Improved robustness of table layout against future column size changes

[0.8.3] – 2026-01-08

✨ New features

  • Import data from JSON and CSV files

    • New import command to insert events into the database from external sources.
    • Supported formats:
      • JSON (flexible structures: root array, { days: [...] }, { holidays: [...] })
      • CSV (with header row).
    • Supported options:
      • --file <path>: input file
      • --format <json|csv> (default: json)
      • --dry-run: simulate the import without modifying the database
      • --replace: overwrite existing conflicting data
      • --source: logical label describing the data origin
  • National holidays support

    • Added new position NationalHoliday.
    • National holidays:
      • do not affect the user vacation balance
      • are compatible with automatic/preventive imports (e.g. yearly calendars).
  • Preventive holiday import

    • Allows preparing JSON/CSV files with annual holidays and importing them in advance.
    • Reduces manual errors and forgotten entries.

🔧 Improvements

  • Enhanced data source tracking

    • The source field of imported events now automatically includes the input format
      (e.g. import (from json), import (from csv)).
  • meta field support for imported events

    • Descriptive data (e.g. holiday name) is stored in the meta field as JSON.
    • Example:
      { "name": "New Year" }
  • Refactor of Event::new() constructor

    • The constructor now explicitly supports:
      • meta
      • source
    • Clear separation between CLI-created events and imported events.
  • Database query refactor

    • Split db::queries into topic-based submodules.
    • Fixed module conflict between queries.rs and queries/mod.rs.
  • Shared utilities

    • Added helper functions in utils::formatting to standardize source generation.

🛠 Fixes

  • Improved validation of imported records:
    • invalid dates
    • unsupported positions
    • malformed rows
  • Improved import reporting:
    • total rows
    • imported rows
    • skipped rows
    • conflicts
    • invalid rows

🧪 Developer notes

  • All import logic is isolated in the src/import module.
  • Full dry-run support for safe testing on real databases.
  • Solid foundation for future integrations (ICS calendars, APIs, external sync).

[0.8.2] — 2026-01-08

✨ Added

  • Added a new day position National holiday (N) to represent public holidays that do not affect personal holiday
    allowance.
  • Introduced support for --pos n / --pos national in the add command to mark national holidays.
  • Added idempotent database migration to extend the events.position CHECK constraint with the new N value.

🧠 Changed

  • Updated daily and compact list views to properly display National holiday days with neutral time and ΔWORK values.
  • Improved semantic distinction between Holiday (personal leave) and National holiday (public holiday) in
    reports and summaries.

🐞 Fixes

  • Ensured database migrations safely no-op when the schema is already aligned.
  • Fixed SQL escaping issues in migration logging statements.

🧹 Internal

  • Extended Location enum and related parsing/formatting utilities.
  • Refined migration logging for better traceability and robustness.

[0.8.1] - 2026-01-07

✨ New

  • Added list --compact output mode for a concise, single-line daily overview.
  • Introduced unified date column format YYYY-MM-DD (WD) with configurable weekday length.
  • Improved visual hierarchy for list --details with highlighted DETAILS section header.
  • Added dynamic table width handling based on weekday display mode (None, Short, Medium, Long).

🔧 Improvements

  • Refactored list command rendering logic for better layout consistency and maintainability.
  • Harmonized table headers and footers across standard and compact list views.
  • Improved footer alignment using dynamic table width calculation.
  • Clarified labels:
    • Expected → Target end
    • Surplus → ΔWORK
  • Enhanced compact delta formatting (e.g. +02h04m).
  • Automatic re-print of table headers when switching month during period listing.
  • Improved holiday visualization:
    • All time fields shown as --:--
    • Greyed output
    • Neutral contribution to totals.

🐞 Fixes

  • Fixed incorrect handling of --pos h (Holiday) requiring --in/--out.
  • Fixed misleading error classification (InvalidTime → InvalidArgs) for invalid CLI combinations.
  • Fixed surplus calculation edge cases when work gaps are present.
  • Fixed weekday width/layout inconsistencies across different display modes.
  • Removed unused variables and eliminated compiler warnings in list.rs.

🧹 Internal

  • Introduced WeekdayMode enum for explicit weekday rendering control.
  • Centralized table width logic via utils::table constants.
  • Simplified footer formatting and alignment logic.
  • Improved separation between presentation logic and data computation.

[v0.8.0] - 2025-12-18

🚀 Stable release — Timeline & Work Gap engine

This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.


✨ Highlights

  • Stable multi-pair daily model

    • Unlimited IN/OUT pairs per day
    • Persistent pair numbering
    • Fully deterministic timeline reconstruction
  • Working gap support (final)

    • Explicit --work-gap / --no-work-gap flags on OUT events
    • Gaps can be added, removed, or edited retroactively
    • Correct impact on worked time, expected exit, and surplus
    • Clear visual indicators (🔗 / ✂️)
  • Accurate time calculations

    • Worked time now correctly:
      • sums all pairs
      • subtracts non-working gaps
      • includes working gaps only when explicitly marked
    • Expected exit is consistently based on:
      • first IN of the day
      • configured minimum working time
      • lunch rules and windows
    • Surplus calculation is now fully reliable in all scenarios

🧠 Changed

  • OUT events without --pos now inherit the position of the corresponding IN
  • Day details view shows pair-level positions, not aggregated day position
  • Timeline, pairing, and gap logic fully unified across:
    • list
    • list --events
    • list --details
    • exports

🗄️ Database & Migration

  • New stable column events.work_gap
  • Safe, idempotent migrations with:
    • automatic schema alignment
    • backup before destructive changes
  • Automatic recalculation of pairs and daily summaries after edits

🖥️ CLI & UX

  • Unified message system across all commands:
    • ℹ️ info · ⚠️ warning · ❌ error · ✅ success
  • Clear, explicit confirmation messages for gap edits
  • Cleaner event listings:
    • no duplicated dates for multiple pairs
    • improved visual alignment

📦 Export system (stable)

  • Fully refactored export architecture
  • Supported formats:
    • CSV
    • JSON
    • XLSX
    • PDF (multipage, styled, dynamic titles)
  • Shared helpers and consistent overwrite handling

⚠️ Breaking changes

  • Legacy work_sessions table is no longer used
  • Timeline-based model is now the single source of truth
  • CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x

✅ Final notes

v0.8.0 represents a major architectural milestone.
The internal engine is now considered stable, correct, and extensible.

Future releases will focus on:

  • automated tests
  • performance refinements
  • advanced reporting and statistics

[v0.8.0-beta3] - 2025-12-15

✨ Added

  • 🔗 Working gap support between pairs via --work-gap flag on OUT events.
  • ✂️ Ability to remove a working gap using --no-work-gap in edit mode.
  • New work_gap boolean field stored in the events table.
  • Explicit confirmation messages when enabling or removing work gaps.

🧠 Changed

  • Expected / surplus calculation now correctly accounts for non-working gaps between pairs.
  • OUT events without --pos now inherit the position from the corresponding IN.
  • Day details view now shows the position of each pair, not the aggregated day position.
  • Improved visual output in list --events: repeated dates are no longer duplicated for multiple pairs.

🐞 Fixed

  • Incorrect surplus calculation when non-working gaps were present between pairs.
  • Wrong position assigned to OUT events when --pos was omitted.
  • Multiple inconsistencies in pair reconstruction and gap handling logic.

🗄️ Database

  • Migration added to introduce the work_gap column to the events table.
  • Automatic recalculation of pairs, expected time, and surplus after gap updates.

[0.8.0-beta2] - 2025-12-12

✨ Added

  • Nuovo sistema PDF multipagina con gestione automatica:...
Read more

v0.8.3

08 Jan 12:12

Choose a tag to compare

Changelog

[0.8.3] – Unreleased

✨ New features

  • Import data from JSON and CSV files

    • New import command to insert events into the database from external sources.
    • Supported formats:
      • JSON (flexible structures: root array, { days: [...] }, { holidays: [...] })
      • CSV (with header row).
    • Supported options:
      • --file <path>: input file
      • --format <json|csv> (default: json)
      • --dry-run: simulate the import without modifying the database
      • --replace: overwrite existing conflicting data
      • --source: logical label describing the data origin
  • National holidays support

    • Added new position NationalHoliday.
    • National holidays:
      • do not affect the user vacation balance
      • are compatible with automatic/preventive imports (e.g. yearly calendars).
  • Preventive holiday import

    • Allows preparing JSON/CSV files with annual holidays and importing them in advance.
    • Reduces manual errors and forgotten entries.

🔧 Improvements

  • Enhanced data source tracking

    • The source field of imported events now automatically includes the input format
      (e.g. import (from json), import (from csv)).
  • meta field support for imported events

    • Descriptive data (e.g. holiday name) is stored in the meta field as JSON.
    • Example:
      { "name": "New Year" }
  • Refactor of Event::new() constructor

    • The constructor now explicitly supports:
      • meta
      • source
    • Clear separation between CLI-created events and imported events.
  • Database query refactor

    • Split db::queries into topic-based submodules.
    • Fixed module conflict between queries.rs and queries/mod.rs.
  • Shared utilities

    • Added helper functions in utils::formatting to standardize source generation.

🛠 Fixes

  • Improved validation of imported records:
    • invalid dates
    • unsupported positions
    • malformed rows
  • Improved import reporting:
    • total rows
    • imported rows
    • skipped rows
    • conflicts
    • invalid rows

🧪 Developer notes

  • All import logic is isolated in the src/import module.
  • Full dry-run support for safe testing on real databases.
  • Solid foundation for future integrations (ICS calendars, APIs, external sync).

[0.8.2] — 2026-01-08

✨ Added

  • Added a new day position National holiday (N) to represent public holidays that do not affect personal holiday
    allowance.
  • Introduced support for --pos n / --pos national in the add command to mark national holidays.
  • Added idempotent database migration to extend the events.position CHECK constraint with the new N value.

🧠 Changed

  • Updated daily and compact list views to properly display National holiday days with neutral time and ΔWORK values.
  • Improved semantic distinction between Holiday (personal leave) and National holiday (public holiday) in
    reports and summaries.

🐞 Fixes

  • Ensured database migrations safely no-op when the schema is already aligned.
  • Fixed SQL escaping issues in migration logging statements.

🧹 Internal

  • Extended Location enum and related parsing/formatting utilities.
  • Refined migration logging for better traceability and robustness.

[0.8.1] - 2026-01-07

✨ New

  • Added list --compact output mode for a concise, single-line daily overview.
  • Introduced unified date column format YYYY-MM-DD (WD) with configurable weekday length.
  • Improved visual hierarchy for list --details with highlighted DETAILS section header.
  • Added dynamic table width handling based on weekday display mode (None, Short, Medium, Long).

🔧 Improvements

  • Refactored list command rendering logic for better layout consistency and maintainability.
  • Harmonized table headers and footers across standard and compact list views.
  • Improved footer alignment using dynamic table width calculation.
  • Clarified labels:
    • Expected → Target end
    • Surplus → ΔWORK
  • Enhanced compact delta formatting (e.g. +02h04m).
  • Automatic re-print of table headers when switching month during period listing.
  • Improved holiday visualization:
    • All time fields shown as --:--
    • Greyed output
    • Neutral contribution to totals.

🐞 Fixes

  • Fixed incorrect handling of --pos h (Holiday) requiring --in/--out.
  • Fixed misleading error classification (InvalidTime → InvalidArgs) for invalid CLI combinations.
  • Fixed surplus calculation edge cases when work gaps are present.
  • Fixed weekday width/layout inconsistencies across different display modes.
  • Removed unused variables and eliminated compiler warnings in list.rs.

🧹 Internal

  • Introduced WeekdayMode enum for explicit weekday rendering control.
  • Centralized table width logic via utils::table constants.
  • Simplified footer formatting and alignment logic.
  • Improved separation between presentation logic and data computation.

[v0.8.0] - 2025-12-18

🚀 Stable release — Timeline & Work Gap engine

This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.


✨ Highlights

  • Stable multi-pair daily model

    • Unlimited IN/OUT pairs per day
    • Persistent pair numbering
    • Fully deterministic timeline reconstruction
  • Working gap support (final)

    • Explicit --work-gap / --no-work-gap flags on OUT events
    • Gaps can be added, removed, or edited retroactively
    • Correct impact on worked time, expected exit, and surplus
    • Clear visual indicators (🔗 / ✂️)
  • Accurate time calculations

    • Worked time now correctly:
      • sums all pairs
      • subtracts non-working gaps
      • includes working gaps only when explicitly marked
    • Expected exit is consistently based on:
      • first IN of the day
      • configured minimum working time
      • lunch rules and windows
    • Surplus calculation is now fully reliable in all scenarios

🧠 Changed

  • OUT events without --pos now inherit the position of the corresponding IN
  • Day details view shows pair-level positions, not aggregated day position
  • Timeline, pairing, and gap logic fully unified across:
    • list
    • list --events
    • list --details
    • exports

🗄️ Database & Migration

  • New stable column events.work_gap
  • Safe, idempotent migrations with:
    • automatic schema alignment
    • backup before destructive changes
  • Automatic recalculation of pairs and daily summaries after edits

🖥️ CLI & UX

  • Unified message system across all commands:
    • ℹ️ info · ⚠️ warning · ❌ error · ✅ success
  • Clear, explicit confirmation messages for gap edits
  • Cleaner event listings:
    • no duplicated dates for multiple pairs
    • improved visual alignment

📦 Export system (stable)

  • Fully refactored export architecture
  • Supported formats:
    • CSV
    • JSON
    • XLSX
    • PDF (multipage, styled, dynamic titles)
  • Shared helpers and consistent overwrite handling

⚠️ Breaking changes

  • Legacy work_sessions table is no longer used
  • Timeline-based model is now the single source of truth
  • CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x

✅ Final notes

v0.8.0 represents a major architectural milestone.
The internal engine is now considered stable, correct, and extensible.

Future releases will focus on:

  • automated tests
  • performance refinements
  • advanced reporting and statistics

[v0.8.0-beta3] - 2025-12-15

✨ Added

  • 🔗 Working gap support between pairs via --work-gap flag on OUT events.
  • ✂️ Ability to remove a working gap using --no-work-gap in edit mode.
  • New work_gap boolean field stored in the events table.
  • Explicit confirmation messages when enabling or removing work gaps.

🧠 Changed

  • Expected / surplus calculation now correctly accounts for non-working gaps between pairs.
  • OUT events without --pos now inherit the position from the corresponding IN.
  • Day details view now shows the position of each pair, not the aggregated day position.
  • Improved visual output in list --events: repeated dates are no longer duplicated for multiple pairs.

🐞 Fixed

  • Incorrect surplus calculation when non-working gaps were present between pairs.
  • Wrong position assigned to OUT events when --pos was omitted.
  • Multiple inconsistencies in pair reconstruction and gap handling logic.

🗄️ Database

  • Migration added to introduce the work_gap column to the events table.
  • Automatic recalculation of pairs, expected time, and surplus after gap updates.

[0.8.0-beta2] - 2025-12-12

✨ Added

  • Nuovo sistema PDF multipagina con gestione automatica:

    • intestazione titolo per pagina
    • numeri di pagina
    • tabelle multilinea con header ripetuti
    • zebra striping
    • calcolo intelligente della larghezza colonne
  • Titolo PDF dinamico basato su --range, con supporto a:

    • anno (YYYY)
    • mese (YYYY-MM)
    • giorno (YYYY-MM-DD)
    • intervallo (YYYY:YYYY, YYYY-MM:YYYY-MM, ecc.)
  • Supporto ufficiale al nuovo enum ExportFormat (CSV, JSON, XLSX, PDF) con validazione in Clap.

  • Gestione uniforme dell’overwrite dei file con richiesta di conferma.

  • Helper condivisi in export/utils.rs:

    • build_pdf_title
    • path_str
    • to_io_app_error

🔧 Changed

  • Riscrittura completa del sistema di messaggistica a video (UI):
    • Tutti i messaggi CLI passano ora da ui/messages.rs
    • Stile uniforme per info, successi, warning ed errori
    • Emoji standardizzate:
      • ℹ️ info
      • ⚠️ warning
      • ❌ error
      • ✅ success
    • Prompt di conferma file riscritti usando la ...
Read more

v0.8.2

07 Jan 16:24

Choose a tag to compare

Changelog

[0.8.2] — 2026-01-08

✨ Added

  • Added a new day position National holiday (N) to represent public holidays that do not affect personal holiday allowance.
  • Introduced support for --pos n / --pos national in the add command to mark national holidays.
  • Added idempotent database migration to extend the events.position CHECK constraint with the new N value.

🧠 Changed

  • Updated daily and compact list views to properly display National holiday days with neutral time and ΔWORK values.
  • Improved semantic distinction between Holiday (personal leave) and National holiday (public holiday) in reports and summaries.

🐞 Fixes

  • Ensured database migrations safely no-op when the schema is already aligned.
  • Fixed SQL escaping issues in migration logging statements.

🧹 Internal

  • Extended Location enum and related parsing/formatting utilities.
  • Refined migration logging for better traceability and robustness.

[0.8.1] - 2026-01-07

✨ New

  • Added list --compact output mode for a concise, single-line daily overview.
  • Introduced unified date column format YYYY-MM-DD (WD) with configurable weekday length.
  • Improved visual hierarchy for list --details with highlighted DETAILS section header.
  • Added dynamic table width handling based on weekday display mode (None, Short, Medium, Long).

🔧 Improvements

  • Refactored list command rendering logic for better layout consistency and maintainability.
  • Harmonized table headers and footers across standard and compact list views.
  • Improved footer alignment using dynamic table width calculation.
  • Clarified labels:
    • Expected → Target end
    • Surplus → ΔWORK
  • Enhanced compact delta formatting (e.g. +02h04m).
  • Automatic re-print of table headers when switching month during period listing.
  • Improved holiday visualization:
    • All time fields shown as --:--
    • Greyed output
    • Neutral contribution to totals.

🐞 Fixes

  • Fixed incorrect handling of --pos h (Holiday) requiring --in/--out.
  • Fixed misleading error classification (InvalidTime → InvalidArgs) for invalid CLI combinations.
  • Fixed surplus calculation edge cases when work gaps are present.
  • Fixed weekday width/layout inconsistencies across different display modes.
  • Removed unused variables and eliminated compiler warnings in list.rs.

🧹 Internal

  • Introduced WeekdayMode enum for explicit weekday rendering control.
  • Centralized table width logic via utils::table constants.
  • Simplified footer formatting and alignment logic.
  • Improved separation between presentation logic and data computation.

[v0.8.0] - 2025-12-18

🚀 Stable release — Timeline & Work Gap engine

This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.


✨ Highlights

  • Stable multi-pair daily model

    • Unlimited IN/OUT pairs per day
    • Persistent pair numbering
    • Fully deterministic timeline reconstruction
  • Working gap support (final)

    • Explicit --work-gap / --no-work-gap flags on OUT events
    • Gaps can be added, removed, or edited retroactively
    • Correct impact on worked time, expected exit, and surplus
    • Clear visual indicators (🔗 / ✂️)
  • Accurate time calculations

    • Worked time now correctly:
      • sums all pairs
      • subtracts non-working gaps
      • includes working gaps only when explicitly marked
    • Expected exit is consistently based on:
      • first IN of the day
      • configured minimum working time
      • lunch rules and windows
    • Surplus calculation is now fully reliable in all scenarios

🧠 Changed

  • OUT events without --pos now inherit the position of the corresponding IN
  • Day details view shows pair-level positions, not aggregated day position
  • Timeline, pairing, and gap logic fully unified across:
    • list
    • list --events
    • list --details
    • exports

🗄️ Database & Migration

  • New stable column events.work_gap
  • Safe, idempotent migrations with:
    • automatic schema alignment
    • backup before destructive changes
  • Automatic recalculation of pairs and daily summaries after edits

🖥️ CLI & UX

  • Unified message system across all commands:
    • ℹ️ info · ⚠️ warning · ❌ error · ✅ success
  • Clear, explicit confirmation messages for gap edits
  • Cleaner event listings:
    • no duplicated dates for multiple pairs
    • improved visual alignment

📦 Export system (stable)

  • Fully refactored export architecture
  • Supported formats:
    • CSV
    • JSON
    • XLSX
    • PDF (multipage, styled, dynamic titles)
  • Shared helpers and consistent overwrite handling

⚠️ Breaking changes

  • Legacy work_sessions table is no longer used
  • Timeline-based model is now the single source of truth
  • CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x

✅ Final notes

v0.8.0 represents a major architectural milestone.
The internal engine is now considered stable, correct, and extensible.

Future releases will focus on:

  • automated tests
  • performance refinements
  • advanced reporting and statistics

[v0.8.0-beta3] - 2025-12-15

✨ Added

  • 🔗 Working gap support between pairs via --work-gap flag on OUT events.
  • ✂️ Ability to remove a working gap using --no-work-gap in edit mode.
  • New work_gap boolean field stored in the events table.
  • Explicit confirmation messages when enabling or removing work gaps.

🧠 Changed

  • Expected / surplus calculation now correctly accounts for non-working gaps between pairs.
  • OUT events without --pos now inherit the position from the corresponding IN.
  • Day details view now shows the position of each pair, not the aggregated day position.
  • Improved visual output in list --events: repeated dates are no longer duplicated for multiple pairs.

🐞 Fixed

  • Incorrect surplus calculation when non-working gaps were present between pairs.
  • Wrong position assigned to OUT events when --pos was omitted.
  • Multiple inconsistencies in pair reconstruction and gap handling logic.

🗄️ Database

  • Migration added to introduce the work_gap column to the events table.
  • Automatic recalculation of pairs, expected time, and surplus after gap updates.

[0.8.0-beta2] - 2025-12-12

✨ Added

  • Nuovo sistema PDF multipagina con gestione automatica:

    • intestazione titolo per pagina
    • numeri di pagina
    • tabelle multilinea con header ripetuti
    • zebra striping
    • calcolo intelligente della larghezza colonne
  • Titolo PDF dinamico basato su --range, con supporto a:

    • anno (YYYY)
    • mese (YYYY-MM)
    • giorno (YYYY-MM-DD)
    • intervallo (YYYY:YYYY, YYYY-MM:YYYY-MM, ecc.)
  • Supporto ufficiale al nuovo enum ExportFormat (CSV, JSON, XLSX, PDF) con validazione in Clap.

  • Gestione uniforme dell’overwrite dei file con richiesta di conferma.

  • Helper condivisi in export/utils.rs:

    • build_pdf_title
    • path_str
    • to_io_app_error

🔧 Changed

  • Riscrittura completa del sistema di messaggistica a video (UI):
    • Tutti i messaggi CLI passano ora da ui/messages.rs
    • Stile uniforme per info, successi, warning ed errori
    • Emoji standardizzate:
      • ℹ️ info
      • ⚠️ warning
      • ❌ error
      • ✅ success
    • Prompt di conferma file riscritti usando la nuova UI
  • Refactor completo del modulo Export
    • Suddivisione in:
      • logic.rs
      • csv_export.rs
      • json_export.rs
      • xlsx_export.rs
      • pdf_export.rs
      • utils.rs
    • Rimossi duplicati, ridotto il codice di oltre il 40%
    • Migliorata la leggibilità e l’estendibilità del codice
  • XLSX export migliorato
    • gestione numeri, date e orari
    • riduzione della duplicazione di codice
    • stile coerente con il PDF
  • Migrazioni Config riviste
    • messaggi più chiari
    • log più leggibili
    • gestione errori unificata

🐛 Fixed

  • Risolto crash PDF: “duplicate indirect reference id” grazie alla nuova gestione interna degli ID.
  • Fix larghezza colonne in XLSX (ora corretto anche in caso di testi lunghi).
  • Fix del sistema export che utilizzava ancora versioni duplicate di events_to_table.
  • Fix comportamento --force in alcuni percorsi non assoluti.

🧹 Removed

  • Codice legacy del vecchio export (ora sostituito da export/).
  • Vecchio PdfManager monolitico (ora multipagina e completamente rifattorizzato).

🖥️ Unified console message system (dettaglio tecnico)

(Questa sezione compare solo nel CHANGELOG, non nel README)

La release introduce un nuovo sistema di messaggistica centralizzato, ora usato da tutti i comandi dell'app:

  • Output coerente e stilisticamente uniforme
  • Distinzione immediata delle tipologie di messaggi
  • Addio ai println! sparsi
  • Integrazione diretta nei flussi init, export, config, db, migrate, ecc.

Esempi:

ℹ️ Exporting to PDF: report.pdf
⚠️ The file already exists. Overwrite? [y/N]:
❌ Error: invalid date format
✅ Export completed: report.pdf

[0.8.0-beta1] – 2025-12-10

🚀 Major changes

✔ Full rewrite of the list command

  • The command is now fully based on the timeline model (events → timeline → pairs).
  • The legacy table work_sessions is officially removed.
  • Consistent layout for:
    • list
    • list --today
    • list --events
    • list --details
  • Automatic month separators when using --period spanning multiple months.
  • Intelligent ANSI-color output (green/red/gray) across all modes.
  • Daily surplus formula rewritten as:
    surplus = end_time – expected_exit.

✔ Correct handling of Expected Exit & Lunch

  • Implemented **lunch_window–aware expected exit calculati...
Read more

v0.8.1

07 Jan 15:08

Choose a tag to compare

Changelog

[0.8.1] - 2026-01-07

✨ New

  • Added list --compact output mode for a concise, single-line daily overview.
  • Introduced unified date column format YYYY-MM-DD (WD) with configurable weekday length.
  • Improved visual hierarchy for list --details with highlighted DETAILS section header.
  • Added dynamic table width handling based on weekday display mode (None, Short, Medium, Long).

🔧 Improvements

  • Refactored list command rendering logic for better layout consistency and maintainability.
  • Harmonized table headers and footers across standard and compact list views.
  • Improved footer alignment using dynamic table width calculation.
  • Clarified labels:
    • Expected → Target end
    • Surplus → ΔWORK
  • Enhanced compact delta formatting (e.g. +02h04m).
  • Automatic re-print of table headers when switching month during period listing.
  • Improved holiday visualization:
    • All time fields shown as --:--
    • Greyed output
    • Neutral contribution to totals.

🐞 Fixes

  • Fixed incorrect handling of --pos h (Holiday) requiring --in/--out.
  • Fixed misleading error classification (InvalidTime → InvalidArgs) for invalid CLI combinations.
  • Fixed surplus calculation edge cases when work gaps are present.
  • Fixed weekday width/layout inconsistencies across different display modes.
  • Removed unused variables and eliminated compiler warnings in list.rs.

🧹 Internal

  • Introduced WeekdayMode enum for explicit weekday rendering control.
  • Centralized table width logic via utils::table constants.
  • Simplified footer formatting and alignment logic.
  • Improved separation between presentation logic and data computation.

[v0.8.0] - 2025-12-18

🚀 Stable release — Timeline & Work Gap engine

This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.


✨ Highlights

  • Stable multi-pair daily model

    • Unlimited IN/OUT pairs per day
    • Persistent pair numbering
    • Fully deterministic timeline reconstruction
  • Working gap support (final)

    • Explicit --work-gap / --no-work-gap flags on OUT events
    • Gaps can be added, removed, or edited retroactively
    • Correct impact on worked time, expected exit, and surplus
    • Clear visual indicators (🔗 / ✂️)
  • Accurate time calculations

    • Worked time now correctly:
      • sums all pairs
      • subtracts non-working gaps
      • includes working gaps only when explicitly marked
    • Expected exit is consistently based on:
      • first IN of the day
      • configured minimum working time
      • lunch rules and windows
    • Surplus calculation is now fully reliable in all scenarios

🧠 Changed

  • OUT events without --pos now inherit the position of the corresponding IN
  • Day details view shows pair-level positions, not aggregated day position
  • Timeline, pairing, and gap logic fully unified across:
    • list
    • list --events
    • list --details
    • exports

🗄️ Database & Migration

  • New stable column events.work_gap
  • Safe, idempotent migrations with:
    • automatic schema alignment
    • backup before destructive changes
  • Automatic recalculation of pairs and daily summaries after edits

🖥️ CLI & UX

  • Unified message system across all commands:
    • ℹ️ info · ⚠️ warning · ❌ error · ✅ success
  • Clear, explicit confirmation messages for gap edits
  • Cleaner event listings:
    • no duplicated dates for multiple pairs
    • improved visual alignment

📦 Export system (stable)

  • Fully refactored export architecture
  • Supported formats:
    • CSV
    • JSON
    • XLSX
    • PDF (multipage, styled, dynamic titles)
  • Shared helpers and consistent overwrite handling

⚠️ Breaking changes

  • Legacy work_sessions table is no longer used
  • Timeline-based model is now the single source of truth
  • CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x

✅ Final notes

v0.8.0 represents a major architectural milestone.
The internal engine is now considered stable, correct, and extensible.

Future releases will focus on:

  • automated tests
  • performance refinements
  • advanced reporting and statistics

[v0.8.0-beta3] - 2025-12-15

✨ Added

  • 🔗 Working gap support between pairs via --work-gap flag on OUT events.
  • ✂️ Ability to remove a working gap using --no-work-gap in edit mode.
  • New work_gap boolean field stored in the events table.
  • Explicit confirmation messages when enabling or removing work gaps.

🧠 Changed

  • Expected / surplus calculation now correctly accounts for non-working gaps between pairs.
  • OUT events without --pos now inherit the position from the corresponding IN.
  • Day details view now shows the position of each pair, not the aggregated day position.
  • Improved visual output in list --events: repeated dates are no longer duplicated for multiple pairs.

🐞 Fixed

  • Incorrect surplus calculation when non-working gaps were present between pairs.
  • Wrong position assigned to OUT events when --pos was omitted.
  • Multiple inconsistencies in pair reconstruction and gap handling logic.

🗄️ Database

  • Migration added to introduce the work_gap column to the events table.
  • Automatic recalculation of pairs, expected time, and surplus after gap updates.

[0.8.0-beta2] - 2025-12-12

✨ Added

  • Nuovo sistema PDF multipagina con gestione automatica:

    • intestazione titolo per pagina
    • numeri di pagina
    • tabelle multilinea con header ripetuti
    • zebra striping
    • calcolo intelligente della larghezza colonne
  • Titolo PDF dinamico basato su --range, con supporto a:

    • anno (YYYY)
    • mese (YYYY-MM)
    • giorno (YYYY-MM-DD)
    • intervallo (YYYY:YYYY, YYYY-MM:YYYY-MM, ecc.)
  • Supporto ufficiale al nuovo enum ExportFormat (CSV, JSON, XLSX, PDF) con validazione in Clap.

  • Gestione uniforme dell’overwrite dei file con richiesta di conferma.

  • Helper condivisi in export/utils.rs:

    • build_pdf_title
    • path_str
    • to_io_app_error

🔧 Changed

  • Riscrittura completa del sistema di messaggistica a video (UI):
    • Tutti i messaggi CLI passano ora da ui/messages.rs
    • Stile uniforme per info, successi, warning ed errori
    • Emoji standardizzate:
      • ℹ️ info
      • ⚠️ warning
      • ❌ error
      • ✅ success
    • Prompt di conferma file riscritti usando la nuova UI
  • Refactor completo del modulo Export
    • Suddivisione in:
      • logic.rs
      • csv_export.rs
      • json_export.rs
      • xlsx_export.rs
      • pdf_export.rs
      • utils.rs
    • Rimossi duplicati, ridotto il codice di oltre il 40%
    • Migliorata la leggibilità e l’estendibilità del codice
  • XLSX export migliorato
    • gestione numeri, date e orari
    • riduzione della duplicazione di codice
    • stile coerente con il PDF
  • Migrazioni Config riviste
    • messaggi più chiari
    • log più leggibili
    • gestione errori unificata

🐛 Fixed

  • Risolto crash PDF: “duplicate indirect reference id” grazie alla nuova gestione interna degli ID.
  • Fix larghezza colonne in XLSX (ora corretto anche in caso di testi lunghi).
  • Fix del sistema export che utilizzava ancora versioni duplicate di events_to_table.
  • Fix comportamento --force in alcuni percorsi non assoluti.

🧹 Removed

  • Codice legacy del vecchio export (ora sostituito da export/).
  • Vecchio PdfManager monolitico (ora multipagina e completamente rifattorizzato).

🖥️ Unified console message system (dettaglio tecnico)

(Questa sezione compare solo nel CHANGELOG, non nel README)

La release introduce un nuovo sistema di messaggistica centralizzato, ora usato da tutti i comandi dell'app:

  • Output coerente e stilisticamente uniforme
  • Distinzione immediata delle tipologie di messaggi
  • Addio ai println! sparsi
  • Integrazione diretta nei flussi init, export, config, db, migrate, ecc.

Esempi:

ℹ️ Exporting to PDF: report.pdf
⚠️ The file already exists. Overwrite? [y/N]:
❌ Error: invalid date format
✅ Export completed: report.pdf

[0.8.0-beta1] – 2025-12-10

🚀 Major changes

✔ Full rewrite of the list command

  • The command is now fully based on the timeline model (events → timeline → pairs).
  • The legacy table work_sessions is officially removed.
  • Consistent layout for:
    • list
    • list --today
    • list --events
    • list --details
  • Automatic month separators when using --period spanning multiple months.
  • Intelligent ANSI-color output (green/red/gray) across all modes.
  • Daily surplus formula rewritten as:
    surplus = end_time – expected_exit.

✔ Correct handling of Expected Exit & Lunch

  • Implemented lunch_window–aware expected exit calculation, fixing incorrect results when lunch was not explicitly
    declared.
  • When the user records only --in (no --out yet), expected exit now correctly includes:
    • required minimum lunch duration
    • validation against lunch_window
  • Lunch computation is now unified and extracted from the timeline model.

🗄 Database updates

✔ New command db

Introduced:

  • rtimelogger db --info → show DB size, event count, date range, avg events/day
  • rtimelogger db --check → PRAGMA integrity_check
  • rtimelogger db --vacuum → compact and optimize DB
  • rtimelogger db --migrate → run schema migrations safely

✔ Safe migration to new schema ≥ 0.8.0-beta1

  • migrate.rs rewritten to support progressive migrations.
  • Removal of obsolete tables (work_sessions) only when upgrading from pre-0.8.0 versions.
  • Automatic backup before performing destructive schema changes.
  • Added and populated missing column pair when required.

✔ Reca...

Read more

v0.8.0

15 Dec 10:24

Choose a tag to compare

Changelog

[v0.8.0] - 2025-12-18

🚀 Stable release — Timeline & Work Gap engine

This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.


✨ Highlights

  • Stable multi-pair daily model

    • Unlimited IN/OUT pairs per day
    • Persistent pair numbering
    • Fully deterministic timeline reconstruction
  • Working gap support (final)

    • Explicit --work-gap / --no-work-gap flags on OUT events
    • Gaps can be added, removed, or edited retroactively
    • Correct impact on worked time, expected exit, and surplus
    • Clear visual indicators (🔗 / ✂️)
  • Accurate time calculations

    • Worked time now correctly:
      • sums all pairs
      • subtracts non-working gaps
      • includes working gaps only when explicitly marked
    • Expected exit is consistently based on:
      • first IN of the day
      • configured minimum working time
      • lunch rules and windows
    • Surplus calculation is now fully reliable in all scenarios

🧠 Changed

  • OUT events without --pos now inherit the position of the corresponding IN
  • Day details view shows pair-level positions, not aggregated day position
  • Timeline, pairing, and gap logic fully unified across:
    • list
    • list --events
    • list --details
    • exports

🗄️ Database & Migration

  • New stable column events.work_gap
  • Safe, idempotent migrations with:
    • automatic schema alignment
    • backup before destructive changes
  • Automatic recalculation of pairs and daily summaries after edits

🖥️ CLI & UX

  • Unified message system across all commands:
    • ℹ️ info · ⚠️ warning · ❌ error · ✅ success
  • Clear, explicit confirmation messages for gap edits
  • Cleaner event listings:
    • no duplicated dates for multiple pairs
    • improved visual alignment

📦 Export system (stable)

  • Fully refactored export architecture
  • Supported formats:
    • CSV
    • JSON
    • XLSX
    • PDF (multipage, styled, dynamic titles)
  • Shared helpers and consistent overwrite handling

⚠️ Breaking changes

  • Legacy work_sessions table is no longer used
  • Timeline-based model is now the single source of truth
  • CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x

✅ Final notes

v0.8.0 represents a major architectural milestone.
The internal engine is now considered stable, correct, and extensible.

Future releases will focus on:

  • automated tests
  • performance refinements
  • advanced reporting and statistics

[v0.8.0-beta3] - 2025-12-15

✨ Added

  • 🔗 Working gap support between pairs via --work-gap flag on OUT events.
  • ✂️ Ability to remove a working gap using --no-work-gap in edit mode.
  • New work_gap boolean field stored in the events table.
  • Explicit confirmation messages when enabling or removing work gaps.

🧠 Changed

  • Expected / surplus calculation now correctly accounts for non-working gaps between pairs.
  • OUT events without --pos now inherit the position from the corresponding IN.
  • Day details view now shows the position of each pair, not the aggregated day position.
  • Improved visual output in list --events: repeated dates are no longer duplicated for multiple pairs.

🐞 Fixed

  • Incorrect surplus calculation when non-working gaps were present between pairs.
  • Wrong position assigned to OUT events when --pos was omitted.
  • Multiple inconsistencies in pair reconstruction and gap handling logic.

🗄️ Database

  • Migration added to introduce the work_gap column to the events table.
  • Automatic recalculation of pairs, expected time, and surplus after gap updates.

[0.8.0-beta2] - 2025-12-12

✨ Added

  • Nuovo sistema PDF multipagina con gestione automatica:

    • intestazione titolo per pagina
    • numeri di pagina
    • tabelle multilinea con header ripetuti
    • zebra striping
    • calcolo intelligente della larghezza colonne
  • Titolo PDF dinamico basato su --range, con supporto a:

    • anno (YYYY)
    • mese (YYYY-MM)
    • giorno (YYYY-MM-DD)
    • intervallo (YYYY:YYYY, YYYY-MM:YYYY-MM, ecc.)
  • Supporto ufficiale al nuovo enum ExportFormat (CSV, JSON, XLSX, PDF) con validazione in Clap.

  • Gestione uniforme dell’overwrite dei file con richiesta di conferma.

  • Helper condivisi in export/utils.rs:

    • build_pdf_title
    • path_str
    • to_io_app_error

🔧 Changed

  • Riscrittura completa del sistema di messaggistica a video (UI):
    • Tutti i messaggi CLI passano ora da ui/messages.rs
    • Stile uniforme per info, successi, warning ed errori
    • Emoji standardizzate:
      • ℹ️ info
      • ⚠️ warning
      • ❌ error
      • ✅ success
    • Prompt di conferma file riscritti usando la nuova UI
  • Refactor completo del modulo Export
    • Suddivisione in:
      • logic.rs
      • csv_export.rs
      • json_export.rs
      • xlsx_export.rs
      • pdf_export.rs
      • utils.rs
    • Rimossi duplicati, ridotto il codice di oltre il 40%
    • Migliorata la leggibilità e l’estendibilità del codice
  • XLSX export migliorato
    • gestione numeri, date e orari
    • riduzione della duplicazione di codice
    • stile coerente con il PDF
  • Migrazioni Config riviste
    • messaggi più chiari
    • log più leggibili
    • gestione errori unificata

🐛 Fixed

  • Risolto crash PDF: “duplicate indirect reference id” grazie alla nuova gestione interna degli ID.
  • Fix larghezza colonne in XLSX (ora corretto anche in caso di testi lunghi).
  • Fix del sistema export che utilizzava ancora versioni duplicate di events_to_table.
  • Fix comportamento --force in alcuni percorsi non assoluti.

🧹 Removed

  • Codice legacy del vecchio export (ora sostituito da export/).
  • Vecchio PdfManager monolitico (ora multipagina e completamente rifattorizzato).

🖥️ Unified console message system (dettaglio tecnico)

(Questa sezione compare solo nel CHANGELOG, non nel README)

La release introduce un nuovo sistema di messaggistica centralizzato, ora usato da tutti i comandi dell'app:

  • Output coerente e stilisticamente uniforme
  • Distinzione immediata delle tipologie di messaggi
  • Addio ai println! sparsi
  • Integrazione diretta nei flussi init, export, config, db, migrate, ecc.

Esempi:

ℹ️ Exporting to PDF: report.pdf
⚠️ The file already exists. Overwrite? [y/N]:
❌ Error: invalid date format
✅ Export completed: report.pdf

[0.8.0-beta1] – 2025-12-10

🚀 Major changes

✔ Full rewrite of the list command

  • The command is now fully based on the timeline model (events → timeline → pairs).
  • The legacy table work_sessions is officially removed.
  • Consistent layout for:
    • list
    • list --today
    • list --events
    • list --details
  • Automatic month separators when using --period spanning multiple months.
  • Intelligent ANSI-color output (green/red/gray) across all modes.
  • Daily surplus formula rewritten as:
    surplus = end_time – expected_exit.

✔ Correct handling of Expected Exit & Lunch

  • Implemented lunch_window–aware expected exit calculation, fixing incorrect results when lunch was not explicitly
    declared.
  • When the user records only --in (no --out yet), expected exit now correctly includes:
    • required minimum lunch duration
    • validation against lunch_window
  • Lunch computation is now unified and extracted from the timeline model.

🗄 Database updates

✔ New command db

Introduced:

  • rtimelogger db --info → show DB size, event count, date range, avg events/day
  • rtimelogger db --check → PRAGMA integrity_check
  • rtimelogger db --vacuum → compact and optimize DB
  • rtimelogger db --migrate → run schema migrations safely

✔ Safe migration to new schema ≥ 0.8.0-beta1

  • migrate.rs rewritten to support progressive migrations.
  • Removal of obsolete tables (work_sessions) only when upgrading from pre-0.8.0 versions.
  • Automatic backup before performing destructive schema changes.
  • Added and populated missing column pair when required.

✔ Recalculation of all event pairs

  • New utility: db_utils::rebuild_all_pairs()
    Ensures all IN/OUT events receive a correct, sequential pair number.

🗂 Configuration system upgrades

✔ Auto-heal of missing config fields

When loading rtimelogger.conf, if any field is missing, the system now:

  1. Adds the missing key
  2. Assigns default value
  3. Saves updated config back to disk

✔ Added new setting lunch_window

Used to compute expected exit when lunch is not explicitly set by the user.


💾 Backup improvements

  • backup --file <path> now asks for confirmation before overwriting an existing file.
  • Improved clarity of success/error output.
  • Compression logic unchanged, but now more robust.

🔧 Internal refactoring

  • Consolidated ANSI color helpers (gray, red, green, reset).
  • Unified naming/formatting in formatting.rs.
  • Replaced scattered logic with consistent timeline-derived computations.
  • Strong cleanup of unused or legacy code paths.
  • Better error reporting in many critical code points.

🧹 Fixes

  • Fixed wrong Expected Exit when lunch was defined only in one event of the pair.
  • Fixed day surplus double-counting or off-by-lunch errors.
  • Fixed visual misalignment in several output modes.
  • Fixed pair generation inconsistencies in newly inserted events.
  • Fixed config loading not saving newly introduced parameters.

[0.8.0-alpha2] - 2025-12-04

Changed

  • The add command has been fully redesigned to use a cleaner and more
    explicit flag-based syntax. Positional parameters have been removed,
    except for the required date argument.
  • Th...
Read more

v0.8.0-beta3

12 Dec 15:22

Choose a tag to compare

v0.8.0-beta3 Pre-release
Pre-release

Changelog

[v0.8.0] - 2025-12-18

🚀 Stable release — Timeline & Work Gap engine

This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.


✨ Highlights

  • Stable multi-pair daily model

    • Unlimited IN/OUT pairs per day
    • Persistent pair numbering
    • Fully deterministic timeline reconstruction
  • Working gap support (final)

    • Explicit --work-gap / --no-work-gap flags on OUT events
    • Gaps can be added, removed, or edited retroactively
    • Correct impact on worked time, expected exit, and surplus
    • Clear visual indicators (🔗 / ✂️)
  • Accurate time calculations

    • Worked time now correctly:
      • sums all pairs
      • subtracts non-working gaps
      • includes working gaps only when explicitly marked
    • Expected exit is consistently based on:
      • first IN of the day
      • configured minimum working time
      • lunch rules and windows
    • Surplus calculation is now fully reliable in all scenarios

🧠 Changed

  • OUT events without --pos now inherit the position of the corresponding IN
  • Day details view shows pair-level positions, not aggregated day position
  • Timeline, pairing, and gap logic fully unified across:
    • list
    • list --events
    • list --details
    • exports

🗄️ Database & Migration

  • New stable column events.work_gap
  • Safe, idempotent migrations with:
    • automatic schema alignment
    • backup before destructive changes
  • Automatic recalculation of pairs and daily summaries after edits

🖥️ CLI & UX

  • Unified message system across all commands:
    • ℹ️ info · ⚠️ warning · ❌ error · ✅ success
  • Clear, explicit confirmation messages for gap edits
  • Cleaner event listings:
    • no duplicated dates for multiple pairs
    • improved visual alignment

📦 Export system (stable)

  • Fully refactored export architecture
  • Supported formats:
    • CSV
    • JSON
    • XLSX
    • PDF (multipage, styled, dynamic titles)
  • Shared helpers and consistent overwrite handling

⚠️ Breaking changes

  • Legacy work_sessions table is no longer used
  • Timeline-based model is now the single source of truth
  • CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x

✅ Final notes

v0.8.0 represents a major architectural milestone.
The internal engine is now considered stable, correct, and extensible.

Future releases will focus on:

  • automated tests
  • performance refinements
  • advanced reporting and statistics

[v0.8.0-beta3] - 2025-12-15

✨ Added

  • 🔗 Working gap support between pairs via --work-gap flag on OUT events.
  • ✂️ Ability to remove a working gap using --no-work-gap in edit mode.
  • New work_gap boolean field stored in the events table.
  • Explicit confirmation messages when enabling or removing work gaps.

🧠 Changed

  • Expected / surplus calculation now correctly accounts for non-working gaps between pairs.
  • OUT events without --pos now inherit the position from the corresponding IN.
  • Day details view now shows the position of each pair, not the aggregated day position.
  • Improved visual output in list --events: repeated dates are no longer duplicated for multiple pairs.

🐞 Fixed

  • Incorrect surplus calculation when non-working gaps were present between pairs.
  • Wrong position assigned to OUT events when --pos was omitted.
  • Multiple inconsistencies in pair reconstruction and gap handling logic.

🗄️ Database

  • Migration added to introduce the work_gap column to the events table.
  • Automatic recalculation of pairs, expected time, and surplus after gap updates.

[0.8.0-beta2] - 2025-12-12

✨ Added

  • Nuovo sistema PDF multipagina con gestione automatica:

    • intestazione titolo per pagina
    • numeri di pagina
    • tabelle multilinea con header ripetuti
    • zebra striping
    • calcolo intelligente della larghezza colonne
  • Titolo PDF dinamico basato su --range, con supporto a:

    • anno (YYYY)
    • mese (YYYY-MM)
    • giorno (YYYY-MM-DD)
    • intervallo (YYYY:YYYY, YYYY-MM:YYYY-MM, ecc.)
  • Supporto ufficiale al nuovo enum ExportFormat (CSV, JSON, XLSX, PDF) con validazione in Clap.

  • Gestione uniforme dell’overwrite dei file con richiesta di conferma.

  • Helper condivisi in export/utils.rs:

    • build_pdf_title
    • path_str
    • to_io_app_error

🔧 Changed

  • Riscrittura completa del sistema di messaggistica a video (UI):
    • Tutti i messaggi CLI passano ora da ui/messages.rs
    • Stile uniforme per info, successi, warning ed errori
    • Emoji standardizzate:
      • ℹ️ info
      • ⚠️ warning
      • ❌ error
      • ✅ success
    • Prompt di conferma file riscritti usando la nuova UI
  • Refactor completo del modulo Export
    • Suddivisione in:
      • logic.rs
      • csv_export.rs
      • json_export.rs
      • xlsx_export.rs
      • pdf_export.rs
      • utils.rs
    • Rimossi duplicati, ridotto il codice di oltre il 40%
    • Migliorata la leggibilità e l’estendibilità del codice
  • XLSX export migliorato
    • gestione numeri, date e orari
    • riduzione della duplicazione di codice
    • stile coerente con il PDF
  • Migrazioni Config riviste
    • messaggi più chiari
    • log più leggibili
    • gestione errori unificata

🐛 Fixed

  • Risolto crash PDF: “duplicate indirect reference id” grazie alla nuova gestione interna degli ID.
  • Fix larghezza colonne in XLSX (ora corretto anche in caso di testi lunghi).
  • Fix del sistema export che utilizzava ancora versioni duplicate di events_to_table.
  • Fix comportamento --force in alcuni percorsi non assoluti.

🧹 Removed

  • Codice legacy del vecchio export (ora sostituito da export/).
  • Vecchio PdfManager monolitico (ora multipagina e completamente rifattorizzato).

🖥️ Unified console message system (dettaglio tecnico)

(Questa sezione compare solo nel CHANGELOG, non nel README)

La release introduce un nuovo sistema di messaggistica centralizzato, ora usato da tutti i comandi dell'app:

  • Output coerente e stilisticamente uniforme
  • Distinzione immediata delle tipologie di messaggi
  • Addio ai println! sparsi
  • Integrazione diretta nei flussi init, export, config, db, migrate, ecc.

Esempi:

ℹ️ Exporting to PDF: report.pdf
⚠️ The file already exists. Overwrite? [y/N]:
❌ Error: invalid date format
✅ Export completed: report.pdf

[0.8.0-beta1] – 2025-12-10

🚀 Major changes

✔ Full rewrite of the list command

  • The command is now fully based on the timeline model (events → timeline → pairs).
  • The legacy table work_sessions is officially removed.
  • Consistent layout for:
    • list
    • list --today
    • list --events
    • list --details
  • Automatic month separators when using --period spanning multiple months.
  • Intelligent ANSI-color output (green/red/gray) across all modes.
  • Daily surplus formula rewritten as:
    surplus = end_time – expected_exit.

✔ Correct handling of Expected Exit & Lunch

  • Implemented lunch_window–aware expected exit calculation, fixing incorrect results when lunch was not explicitly
    declared.
  • When the user records only --in (no --out yet), expected exit now correctly includes:
    • required minimum lunch duration
    • validation against lunch_window
  • Lunch computation is now unified and extracted from the timeline model.

🗄 Database updates

✔ New command db

Introduced:

  • rtimelogger db --info → show DB size, event count, date range, avg events/day
  • rtimelogger db --check → PRAGMA integrity_check
  • rtimelogger db --vacuum → compact and optimize DB
  • rtimelogger db --migrate → run schema migrations safely

✔ Safe migration to new schema ≥ 0.8.0-beta1

  • migrate.rs rewritten to support progressive migrations.
  • Removal of obsolete tables (work_sessions) only when upgrading from pre-0.8.0 versions.
  • Automatic backup before performing destructive schema changes.
  • Added and populated missing column pair when required.

✔ Recalculation of all event pairs

  • New utility: db_utils::rebuild_all_pairs()
    Ensures all IN/OUT events receive a correct, sequential pair number.

🗂 Configuration system upgrades

✔ Auto-heal of missing config fields

When loading rtimelogger.conf, if any field is missing, the system now:

  1. Adds the missing key
  2. Assigns default value
  3. Saves updated config back to disk

✔ Added new setting lunch_window

Used to compute expected exit when lunch is not explicitly set by the user.


💾 Backup improvements

  • backup --file <path> now asks for confirmation before overwriting an existing file.
  • Improved clarity of success/error output.
  • Compression logic unchanged, but now more robust.

🔧 Internal refactoring

  • Consolidated ANSI color helpers (gray, red, green, reset).
  • Unified naming/formatting in formatting.rs.
  • Replaced scattered logic with consistent timeline-derived computations.
  • Strong cleanup of unused or legacy code paths.
  • Better error reporting in many critical code points.

🧹 Fixes

  • Fixed wrong Expected Exit when lunch was defined only in one event of the pair.
  • Fixed day surplus double-counting or off-by-lunch errors.
  • Fixed visual misalignment in several output modes.
  • Fixed pair generation inconsistencies in newly inserted events.
  • Fixed config loading not saving newly introduced parameters.

[0.8.0-alpha2] - 2025-12-04

Changed

  • The add command has been fully redesigned to use a cleaner and more
    explicit flag-based syntax. Positional parameters have been removed,
    except for the required date argument.
  • Th...
Read more

v0.8.0-beta2

11 Dec 15:03

Choose a tag to compare

v0.8.0-beta2 Pre-release
Pre-release

Changelog

[0.8.0-beta2] - 2025-12-12

✨ Added

  • Nuovo sistema PDF multipagina con gestione automatica:

    • intestazione titolo per pagina
    • numeri di pagina
    • tabelle multilinea con header ripetuti
    • zebra striping
    • calcolo intelligente della larghezza colonne
  • Titolo PDF dinamico basato su --range, con supporto a:

    • anno (YYYY)
    • mese (YYYY-MM)
    • giorno (YYYY-MM-DD)
    • intervallo (YYYY:YYYY, YYYY-MM:YYYY-MM, ecc.)
  • Supporto ufficiale al nuovo enum ExportFormat (CSV, JSON, XLSX, PDF) con validazione in Clap.

  • Gestione uniforme dell’overwrite dei file con richiesta di conferma.

  • Helper condivisi in export/utils.rs:

    • build_pdf_title
    • path_str
    • to_io_app_error

🔧 Changed

  • Riscrittura completa del sistema di messaggistica a video (UI):
    • Tutti i messaggi CLI passano ora da ui/messages.rs
    • Stile uniforme per info, successi, warning ed errori
    • Emoji standardizzate:
      • ℹ️ info
      • ⚠️ warning
      • ❌ error
      • ✅ success
    • Prompt di conferma file riscritti usando la nuova UI
  • Refactor completo del modulo Export
    • Suddivisione in:
      • logic.rs
      • csv_export.rs
      • json_export.rs
      • xlsx_export.rs
      • pdf_export.rs
      • utils.rs
    • Rimossi duplicati, ridotto il codice di oltre il 40%
    • Migliorata la leggibilità e l’estendibilità del codice
  • XLSX export migliorato
    • gestione numeri, date e orari
    • riduzione della duplicazione di codice
    • stile coerente con il PDF
  • Migrazioni Config riviste
    • messaggi più chiari
    • log più leggibili
    • gestione errori unificata

🐛 Fixed

  • Risolto crash PDF: “duplicate indirect reference id” grazie alla nuova gestione interna degli ID.
  • Fix larghezza colonne in XLSX (ora corretto anche in caso di testi lunghi).
  • Fix del sistema export che utilizzava ancora versioni duplicate di events_to_table.
  • Fix comportamento --force in alcuni percorsi non assoluti.

🧹 Removed

  • Codice legacy del vecchio export (ora sostituito da export/).
  • Vecchio PdfManager monolitico (ora multipagina e completamente rifattorizzato).

🖥️ Unified console message system (dettaglio tecnico)

(Questa sezione compare solo nel CHANGELOG, non nel README)

La release introduce un nuovo sistema di messaggistica centralizzato, ora usato da tutti i comandi dell'app:

  • Output coerente e stilisticamente uniforme
  • Distinzione immediata delle tipologie di messaggi
  • Addio ai println! sparsi
  • Integrazione diretta nei flussi init, export, config, db, migrate, ecc.

Esempi:

ℹ️ Exporting to PDF: report.pdf
⚠️ The file already exists. Overwrite? [y/N]:
❌ Error: invalid date format
✅ Export completed: report.pdf

[0.8.0-beta1] – 2025-12-10

🚀 Major changes

✔ Full rewrite of the list command

  • The command is now fully based on the timeline model (events → timeline → pairs).
  • The legacy table work_sessions is officially removed.
  • Consistent layout for:
    • list
    • list --today
    • list --events
    • list --details
  • Automatic month separators when using --period spanning multiple months.
  • Intelligent ANSI-color output (green/red/gray) across all modes.
  • Daily surplus formula rewritten as:
    surplus = end_time – expected_exit.

✔ Correct handling of Expected Exit & Lunch

  • Implemented lunch_window–aware expected exit calculation, fixing incorrect results when lunch was not explicitly
    declared.
  • When the user records only --in (no --out yet), expected exit now correctly includes:
    • required minimum lunch duration
    • validation against lunch_window
  • Lunch computation is now unified and extracted from the timeline model.

🗄 Database updates

✔ New command db

Introduced:

  • rtimelogger db --info → show DB size, event count, date range, avg events/day
  • rtimelogger db --check → PRAGMA integrity_check
  • rtimelogger db --vacuum → compact and optimize DB
  • rtimelogger db --migrate → run schema migrations safely

✔ Safe migration to new schema ≥ 0.8.0-beta1

  • migrate.rs rewritten to support progressive migrations.
  • Removal of obsolete tables (work_sessions) only when upgrading from pre-0.8.0 versions.
  • Automatic backup before performing destructive schema changes.
  • Added and populated missing column pair when required.

✔ Recalculation of all event pairs

  • New utility: db_utils::rebuild_all_pairs()
    Ensures all IN/OUT events receive a correct, sequential pair number.

🗂 Configuration system upgrades

✔ Auto-heal of missing config fields

When loading rtimelogger.conf, if any field is missing, the system now:

  1. Adds the missing key
  2. Assigns default value
  3. Saves updated config back to disk

✔ Added new setting lunch_window

Used to compute expected exit when lunch is not explicitly set by the user.


💾 Backup improvements

  • backup --file <path> now asks for confirmation before overwriting an existing file.
  • Improved clarity of success/error output.
  • Compression logic unchanged, but now more robust.

🔧 Internal refactoring

  • Consolidated ANSI color helpers (gray, red, green, reset).
  • Unified naming/formatting in formatting.rs.
  • Replaced scattered logic with consistent timeline-derived computations.
  • Strong cleanup of unused or legacy code paths.
  • Better error reporting in many critical code points.

🧹 Fixes

  • Fixed wrong Expected Exit when lunch was defined only in one event of the pair.
  • Fixed day surplus double-counting or off-by-lunch errors.
  • Fixed visual misalignment in several output modes.
  • Fixed pair generation inconsistencies in newly inserted events.
  • Fixed config loading not saving newly introduced parameters.

[0.8.0-alpha2] - 2025-12-04

Changed

  • The add command has been fully redesigned to use a cleaner and more
    explicit flag-based syntax. Positional parameters have been removed,
    except for the required date argument.
  • The legacy positional fields (pos_pos, start_pos, lunch_pos,
    end_pos) have been removed from the CLI parser and internal API.
  • The new syntax is now:
    rtimelogger add <date> --pos <code> --in HH:MM --out HH:MM --lunch <min>

Examples:

  • rtimelogger add 2025-12-03 --pos r --in 08:50
  • rtimelogger add 2025-12-03 --in 09:00 --out 17:30 --lunch 45
  • rtimelogger add 2025-12-03 --edit --pair 1 --out 15:30

Added

  • The add command now supports explicit, optional flags for:
  • --pos (location)
  • --in
  • --out
  • --lunch
  • --pair
  • --edit

This makes the command behavior clearer, more consistent, and easier to
extend in future releases.

Improved

  • The handle() function for the add command has been simplified.
    It now processes only the new flag-based syntax and no longer merges
    legacy positional parameters.
  • The business logic AddLogic::apply() has been refactored to remove
    all references to positional parameter fallbacks.
  • Edit mode logic has been preserved and improved:
  • Explicit flags override only the fields passed by the user
  • IN-only, OUT-only, and lunch-only operations are now more predictable
  • Invalid combinations generate clearer error messages

Notes

This release marks the beginning of the new 0.8.x CLI design, which will
gradually replace the legacy positional-parameter architecture with a
cleaner, more maintainable, and future-proof flag-only approach.


[0.8.0-alpha1] - 2025-11-30

🚀 Major Refactor & Architecture Overhaul

  • Fully reworked internal architecture of event handling, pairing, timeline construction, work sessions,
    logging, and exporting.

  • Unifying logic across add, del, edit, backup, log, and export commands.

  • Significantly improved code organization and separation of concerns across modules:

    • core/add.rs, core/del.rs, core/backup.rs, core/export.rs
    • db/queries.rs rewritten and consolidated
    • models updated for correctness and consistency
    • utils updated for date/time parsing and improved formatting

➕ Add Command Improvements

  • Complete rewrite of AddLogic with cleaner separation between parsing, validation, and DB operations.

  • All parameters (except date) are now optional, with automatic inference based on context.

  • Improved handling of positional arguments and flags.

  • Correct handling of editing existing pairs using --edit and --pair.

  • Position (location) inference rules rewritten:

    • If no position is provided, fallback to last event of the day.
    • Default position remains O (Office).
  • Fix for lunch-only updates without requiring an OUT event.


🗑️ Del Command Improvements

  • Introduced interactive confirmation prompts for destructive operations:

    • Deleting a single pair now asks for confirmation.
    • Deleting an entire date also asks for confirmation.
  • Logic moved fully into core/del.rs.

  • Proper timeline recalculation after deletions.


📝 Full Logging Redesign

  • Internal log now uses a clean and structured format.

  • Timestamp standardized to %FT%T%:z.

  • Added ANSI color output:

    • init → orange
    • add → green
    • del → red
    • edit → yellow
    • migration_applied → purple
    • migrate_to_* → purple
    • backup → blue
    • fallback → white
  • Unified operation + target into one column with truncation to 60 chars.

  • Smart alignment of columns for a consistent table-like layout.


#...

Read more

v0.8.0-beta1

10 Dec 09:25

Choose a tag to compare

v0.8.0-beta1 Pre-release
Pre-release

Changelog

[0.8.0-beta1] – 2025-12-10

🚀 Major changes

✔ Full rewrite of the list command

  • The command is now fully based on the timeline model (events → timeline → pairs).
  • The legacy table work_sessions is officially removed.
  • Consistent layout for:
    • list
    • list --today
    • list --events
    • list --details
  • Automatic month separators when using --period spanning multiple months.
  • Intelligent ANSI-color output (green/red/gray) across all modes.
  • Daily surplus formula rewritten as:
    surplus = end_time – expected_exit.

✔ Correct handling of Expected Exit & Lunch

  • Implemented lunch_window–aware expected exit calculation, fixing incorrect results when lunch was not explicitly
    declared.
  • When the user records only --in (no --out yet), expected exit now correctly includes:
    • required minimum lunch duration
    • validation against lunch_window
  • Lunch computation is now unified and extracted from the timeline model.

🗄 Database updates

✔ New command db

Introduced:

  • rtimelogger db --info → show DB size, event count, date range, avg events/day
  • rtimelogger db --check → PRAGMA integrity_check
  • rtimelogger db --vacuum → compact and optimize DB
  • rtimelogger db --migrate → run schema migrations safely

✔ Safe migration to new schema ≥ 0.8.0-beta1

  • migrate.rs rewritten to support progressive migrations.
  • Removal of obsolete tables (work_sessions) only when upgrading from pre-0.8.0 versions.
  • Automatic backup before performing destructive schema changes.
  • Added and populated missing column pair when required.

✔ Recalculation of all event pairs

  • New utility: db_utils::rebuild_all_pairs()
    Ensures all IN/OUT events receive a correct, sequential pair number.

🗂 Configuration system upgrades

✔ Auto-heal of missing config fields

When loading rtimelogger.conf, if any field is missing, the system now:

  1. Adds the missing key
  2. Assigns default value
  3. Saves updated config back to disk

✔ Added new setting lunch_window

Used to compute expected exit when lunch is not explicitly set by the user.


💾 Backup improvements

  • backup --file <path> now asks for confirmation before overwriting an existing file.
  • Improved clarity of success/error output.
  • Compression logic unchanged, but now more robust.

🔧 Internal refactoring

  • Consolidated ANSI color helpers (gray, red, green, reset).
  • Unified naming/formatting in formatting.rs.
  • Replaced scattered logic with consistent timeline-derived computations.
  • Strong cleanup of unused or legacy code paths.
  • Better error reporting in many critical code points.

🧹 Fixes

  • Fixed wrong Expected Exit when lunch was defined only in one event of the pair.
  • Fixed day surplus double-counting or off-by-lunch errors.
  • Fixed visual misalignment in several output modes.
  • Fixed pair generation inconsistencies in newly inserted events.
  • Fixed config loading not saving newly introduced parameters.

[0.8.0-alpha2] - 2025-12-04

Changed

  • The add command has been fully redesigned to use a cleaner and more
    explicit flag-based syntax. Positional parameters have been removed,
    except for the required date argument.
  • The legacy positional fields (pos_pos, start_pos, lunch_pos,
    end_pos) have been removed from the CLI parser and internal API.
  • The new syntax is now:
    rtimelogger add <date> --pos <code> --in HH:MM --out HH:MM --lunch <min>

Examples:

  • rtimelogger add 2025-12-03 --pos r --in 08:50
  • rtimelogger add 2025-12-03 --in 09:00 --out 17:30 --lunch 45
  • rtimelogger add 2025-12-03 --edit --pair 1 --out 15:30

Added

  • The add command now supports explicit, optional flags for:
  • --pos (location)
  • --in
  • --out
  • --lunch
  • --pair
  • --edit

This makes the command behavior clearer, more consistent, and easier to
extend in future releases.

Improved

  • The handle() function for the add command has been simplified.
    It now processes only the new flag-based syntax and no longer merges
    legacy positional parameters.
  • The business logic AddLogic::apply() has been refactored to remove
    all references to positional parameter fallbacks.
  • Edit mode logic has been preserved and improved:
  • Explicit flags override only the fields passed by the user
  • IN-only, OUT-only, and lunch-only operations are now more predictable
  • Invalid combinations generate clearer error messages

Notes

This release marks the beginning of the new 0.8.x CLI design, which will
gradually replace the legacy positional-parameter architecture with a
cleaner, more maintainable, and future-proof flag-only approach.


[0.8.0-alpha1] - 2025-11-30

🚀 Major Refactor & Architecture Overhaul

  • Fully reworked internal architecture of event handling, pairing, timeline construction, work sessions,
    logging, and exporting.

  • Unifying logic across add, del, edit, backup, log, and export commands.

  • Significantly improved code organization and separation of concerns across modules:

    • core/add.rs, core/del.rs, core/backup.rs, core/export.rs
    • db/queries.rs rewritten and consolidated
    • models updated for correctness and consistency
    • utils updated for date/time parsing and improved formatting

➕ Add Command Improvements

  • Complete rewrite of AddLogic with cleaner separation between parsing, validation, and DB operations.

  • All parameters (except date) are now optional, with automatic inference based on context.

  • Improved handling of positional arguments and flags.

  • Correct handling of editing existing pairs using --edit and --pair.

  • Position (location) inference rules rewritten:

    • If no position is provided, fallback to last event of the day.
    • Default position remains O (Office).
  • Fix for lunch-only updates without requiring an OUT event.


🗑️ Del Command Improvements

  • Introduced interactive confirmation prompts for destructive operations:

    • Deleting a single pair now asks for confirmation.
    • Deleting an entire date also asks for confirmation.
  • Logic moved fully into core/del.rs.

  • Proper timeline recalculation after deletions.


📝 Full Logging Redesign

  • Internal log now uses a clean and structured format.

  • Timestamp standardized to %FT%T%:z.

  • Added ANSI color output:

    • init → orange
    • add → green
    • del → red
    • edit → yellow
    • migration_applied → purple
    • migrate_to_* → purple
    • backup → blue
    • fallback → white
  • Unified operation + target into one column with truncation to 60 chars.

  • Smart alignment of columns for a consistent table-like layout.


🗂️ Export System Rewrite

  • Entire export subsystem refactored into core/export.rs.

  • Added support for formats:

    • CSV
    • JSON
    • XLSX (with professional Excel styling: freeze panes, custom formats, banded rows)
    • PDF (via PdfManager)
  • Added --range support matching --period syntax:

    • YYYY, YYYY-MM, YYYY-MM-DD
    • YYYY:YYYY, YYYY-MM:YYYY-MM, YYYY-MM-DD:YYYY-MM-DD
  • Smart parsing of Excel date/time formats.

  • Added --force to bypass overwrite confirmation.

  • Enforced requirement for absolute file paths.


💾 Backup System Improvements

  • Backup logic rewritten into core/backup.rs.
  • Added ZIP compression using the zip crate.
  • Backup now logs its operation into the internal log.
  • Automatic cleanup of uncompressed files after successful compression.
  • Added error feedback for invalid paths and missing database file.

🧮 Pair Recalculation & Session Consistency

  • Pair recalculation fully rewritten.

  • Automatically updates pair values after:

    • additions
    • edits
    • deletions
  • Fix for events being stored with incorrect pair values.

  • Timeline logic improved for IN/OUT matching.


🗃️ Database Query Layer

  • Consolidated all DB read/write functions in db/queries.rs.
  • load_events_by_date now works with NaiveDate instead of string.
  • map_row improved with safe parsing and better error reporting.
  • Removed deprecated timestamp field usage.

🧱 Models & Utilities

  • Updated Event, EventType, and Location to reflect the new structure.
  • Location now has cleaner conversions: code, to_db_str, from_db_str, from_code.
  • Added time parsing helpers in utils/time.rs.
  • Improved date parsing with better validation.

🧹 Cleanup and Misc Improvements

  • Removed all deprecated functions and unused fields.
  • Ensured consistent error handling using AppError and AppResult.
  • Removed redundant arguments from handlers.
  • Fixed warnings across multiple modules.
  • Ensured database path resolution flows through config consistently.

⚙️ Migration Compatibility

  • Added detection and logging for migrations (e.g., migrate_to_*).
  • ANSI color mapping extended for migration operations.

✔️ Final Notes

This release marks a major architectural milestone, with more than 80% of the application redesigned for
maintainability, correctness, and future expansion.

The next phase will introduce:

  • unit tests
  • integration tests
  • timeline/export validation tests

rTimeLogger's internal engine is now finally stable and extensible.


[0.7.7] - 2025-12-01

Added

  • Introduced the new --period filter for the db --rebuild command.
    The rebuild process can now target a specific time interval instead of
    processing the entire databas...
Read more