Commit Graph

7 Commits

Author SHA1 Message Date
74c9ded46b [bugfix] harden countdown snapshot serialization and error messaging
- guard instant-to-epoch conversion against pre-boot instants
- serialize snapshot duration as milliseconds (u128) in DTO/commands
- derive Display/Error for CountdownError and return user-facing error strings
- remove unused command result alias and minor snapshot lock cleanup
2026-02-26 17:44:07 +01:00
8f8db9233b [bugfix] align countdown snapshot timing with tokio instants
- switch ClockAnchor to tokio::time::Instant
- remove flawed epoch conversion helpers from Countdown
- expose countdown getters for id/label/start/target instants
- update service snapshot to compute remaining_at(now) and return instants directly
- add core extern declaration in lib.rs
2026-02-26 17:27:55 +01:00
d0857d7028 [bugfix] fix countdown snapshot time calculations and unify tokio instants
- switch ClockAnchor to tokio::time::Instant for consistent async timing
- remove incorrect epoch-ms math in Countdown model and expose instant getters
- update CountdownService snapshot to use remaining_at(now) plus start/target instants
- add missing core extern declaration in lib.rs
2026-02-26 16:24:35 +01:00
503a3ef94c [refactor] simplify app state to a single countdown service
- replace AppState.countdowns vector with countdown_service
- add CountdownService::new(id, label, duration) for configurable initialization
- add CountdownService::default() with default countdown values
- remove unused next_id field and note TODO for multi-countdown support
2026-02-26 12:32:52 +01:00
7817c9c907 feat(countdown): add app state and wire countdown service into Tauri
- add `app_state` module with `ClockAnchor` and `AppState`
  - initialize `AppState` with a default `CountdownService`
  - register app state in Tauri via `.manage(app_state)`
  - extend `CountdownSnapshotDto` epoch fields to `Option<u128>`
  - add countdown model helpers for start/target epoch-ms conversion
  - return optional epoch fields from `CountdownService::snapshot`
  - ignore generated `dist/` directory in `.gitignore`
2026-02-26 12:23:54 +01:00
8517e073ba implemented model, service and dto for countdown. TODO: calculate
start_epoch_ms and target_epoch_ms
2026-02-20 22:37:39 +01:00
236cab99ae init Tauri 2026-02-20 19:40:15 +01:00