From 4a48dbd3249e0437113a22e95a8f8461b9988f5c Mon Sep 17 00:00:00 2001 From: HTMLGuy <2415447+HTMLGuyLLC@users.noreply.github.com> Date: Sun, 29 Nov 2026 11:11:06 -0500 Subject: [PATCH 1/3] release: v0.5.12, moving to jiff 1.0 and notify 9 jiff 1.0 renames Zoned to ZonedDateTime and to_zoned to to_zoned_datetime. notify 9 is licensed BSL-1.0 (Boost), so cargo-deny allows it. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 9 +- Cargo.lock | 144 +++++++++++++---------- Cargo.toml | 6 +- THIRD_PARTY_NOTICES.md | 4 +- app/package.json | 2 +- app/src-tauri/src/commands.rs | 2 +- app/src-tauri/src/report_cards/codex.rs | 2 +- app/src-tauri/tauri.conf.json | 2 +- crates/sources/src/time.rs | 8 +- crates/store/src/card_tests.rs | 2 +- crates/store/src/stats.rs | 2 +- crates/store/src/tests.rs | 10 +- deny.toml | 1 + plugins/grade/.claude-plugin/plugin.json | 2 +- 14 files changed, 117 insertions(+), 79 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a33f57..9d82f64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes are listed here. Format follows [Keep a Changelog](https://k ## [Unreleased] +## [0.5.12] - 2026-11-29 + +### Changed + +- Updated jiff to 1.0 and notify to 9. + ## [0.5.11] - 2026-11-25 ### Security @@ -334,7 +340,8 @@ First release. - Per-source consent: nothing is read until you allow it, and Forget deletes a source's data - `noactually` command-line tool (`sources`, `allow`, `sync`, `stats`) -[Unreleased]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.11...HEAD +[Unreleased]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.12...HEAD +[0.5.12]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.11...v0.5.12 [0.5.11]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.10...v0.5.11 [0.5.10]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.9...v0.5.10 [0.5.9]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.8...v0.5.9 diff --git a/Cargo.lock b/Cargo.lock index e7d0bff..b2b729c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -768,37 +768,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "defmt" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a0795ac740cb54d7b3775c9c17345f6aaecf884c01733b39d6017738e0e3e1" -dependencies = [ - "bitflags 1.3.2", - "defmt-macros", -] - -[[package]] -name = "defmt-macros" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "840bb056bd99c495c9188198a258ab787c79f306d864db3e6e8451442d6d8366" -dependencies = [ - "defmt-parser", - "proc-macro2", - "quote", - "syn 3.0.9", -] - -[[package]] -name = "defmt-parser" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71958f69fb2de856c5dd51ac9377e986ca1aa5919f931bf5395a807277f889a0" -dependencies = [ - "thiserror 2.0.21", -] - [[package]] name = "deranged" version = "0.5.9" @@ -2017,14 +1986,29 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.38" +version = "0.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175dc66334db3b9ab9985bf8b61cfed50dc16d20964bb47f9e479adcae984a7f" +dependencies = [ + "jiff-core 0.1.8", + "jiff-static 0.2.46", + "jiff-tzdb-platform 0.1.3", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link", +] + +[[package]] +name = "jiff" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" +checksum = "107f2e89536b6818514025f6787b0d94d819e54fe3b40365275fc753de485b3f" dependencies = [ - "defmt", - "jiff-core", - "jiff-static", - "jiff-tzdb-platform", + "jiff-core 1.0.2", + "jiff-static 1.0.3", + "jiff-tzdb-platform 1.0.0", "log", "portable-atomic", "portable-atomic-util", @@ -2034,39 +2018,74 @@ dependencies = [ [[package]] name = "jiff-core" -version = "0.1.1" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e599b80292e597019b8b3e392de3f4bea2959ddfb8c7dff60e035e9e311a2c1b" +dependencies = [ + "log", +] + +[[package]] +name = "jiff-core" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" +checksum = "d44c923edf2bf456a982253f1a9ee1f6e89e421dffd0065d9b9a581da0def58f" dependencies = [ - "defmt", "log", ] [[package]] name = "jiff-static" -version = "0.2.38" +version = "0.2.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" +checksum = "c7b1af7547d47354bc438d797e3854601bde8f8d185780c5ba4ab27afa54f1ba" dependencies = [ - "jiff-core", + "jiff-core 0.1.8", "proc-macro2", "quote", "syn 2.0.119", ] +[[package]] +name = "jiff-static" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4996f71e569e3a3e32b925c28ef8f0027dc30bb1d594b33eeda409eea185f5c8" +dependencies = [ + "jiff-core 1.0.2", + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "jiff-tzdb" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7" +[[package]] +name = "jiff-tzdb" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12e71a1b68a875a44a33bb7a1dd84392cb77145a3367a552a3cfe6a4f5cf3afc" + [[package]] name = "jiff-tzdb-platform" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" dependencies = [ - "jiff-tzdb", + "jiff-tzdb 0.1.9", +] + +[[package]] +name = "jiff-tzdb-platform" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc65b284afcfa8f6cf189c7274c805505314a7ab975c60e1f548bff56525420e" +dependencies = [ + "jiff-tzdb 1.0.0", ] [[package]] @@ -2467,10 +2486,10 @@ dependencies = [ [[package]] name = "noactually-app" -version = "0.5.11" +version = "0.5.12" dependencies = [ "dirs 6.0.0", - "jiff", + "jiff 1.0.3", "log", "noactually-cli", "noactually-engine", @@ -2495,12 +2514,12 @@ dependencies = [ [[package]] name = "noactually-cli" -version = "0.5.11" +version = "0.5.12" dependencies = [ "anyhow", "auto-launch", "dirs 6.0.0", - "jiff", + "jiff 1.0.3", "log", "memchr", "noactually-engine", @@ -2513,7 +2532,7 @@ dependencies = [ [[package]] name = "noactually-engine" -version = "0.5.11" +version = "0.5.12" dependencies = [ "regex", "serde", @@ -2523,10 +2542,10 @@ dependencies = [ [[package]] name = "noactually-sources" -version = "0.5.11" +version = "0.5.12" dependencies = [ "dirs 6.0.0", - "jiff", + "jiff 1.0.3", "memchr", "noactually-engine", "ruzstd", @@ -2538,11 +2557,11 @@ dependencies = [ [[package]] name = "noactually-store" -version = "0.5.11" +version = "0.5.12" dependencies = [ "dirs 6.0.0", "getrandom 0.4.3", - "jiff", + "jiff 1.0.3", "log", "noactually-engine", "noactually-sources", @@ -2556,9 +2575,9 @@ dependencies = [ [[package]] name = "notify" -version = "8.2.2" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41a04a5f59df9322cc657286dd2d79f90816119b22c5f847607c850110205ab" +checksum = "5482d5bd11b91a337521980e5d52fe115bdccfb4c217099daaf0abd69159dc4e" dependencies = [ "bitflags 2.13.2", "inotify", @@ -2571,6 +2590,7 @@ dependencies = [ "objc2-core-services", "walkdir", "windows-sys 0.61.2", + "xxhash-rust", ] [[package]] @@ -2589,9 +2609,9 @@ dependencies = [ [[package]] name = "notify-types" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" +checksum = "cbd044e85df3d939d8e32a1c35a3b737c7d0a4eeb7acd737bd207644e00f4e5f" dependencies = [ "bitflags 2.13.2", ] @@ -3827,7 +3847,7 @@ dependencies = [ "hex", "indexmap 1.9.3", "indexmap 2.14.2", - "jiff", + "jiff 0.2.46", "schemars 0.9.0", "schemars 1.2.3", "serde_core", @@ -4683,7 +4703,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix", "windows-sys 0.61.2", @@ -5818,6 +5838,12 @@ dependencies = [ "rustix", ] +[[package]] +name = "xxhash-rust" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40de123dbb523ebcc00d61ec01840ad192578afc378d859f3429caa38308fad5" + [[package]] name = "yoke" version = "0.8.4" diff --git a/Cargo.toml b/Cargo.toml index f9082bd..10e12ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/engine", "crates/sources", "crates/store", "crates/cli", "app/src-tauri"] [workspace.package] -version = "0.5.11" +version = "0.5.12" edition = "2021" # Oldest Rust that builds the whole workspace, app included. CI's `msrv` job checks it. rust-version = "1.90" @@ -25,7 +25,7 @@ store = { path = "crates/store", package = "noactually-store" } regex = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" -jiff = { version = "0.2.38", features = ["serde"] } +jiff = { version = "1.0.2", features = ["serde"] } rayon = "1" rusqlite = { version = "0.43", features = ["bundled", "fallible_uint"] } sha2 = "0.10" @@ -48,7 +48,7 @@ tauri-plugin-single-instance = "2" tauri-plugin-log = "2" tauri-plugin-opener = "2" tauri-plugin-updater = "2" -notify = "8" +notify = "9" [workspace.lints.rust] unsafe_code = "forbid" diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index e237627..8f47b63 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -112,12 +112,12 @@ These are the direct runtime dependencies from the `Cargo.toml` files (versions | Crate | License | |---|---| -| `tauri` 2.12.5 and the `tauri-plugin-*` crates (notification, autostart, positioner, dialog, single-instance, log, opener, updater) | Apache-2.0 OR MIT | +| `tauri` 2.12.7 and the `tauri-plugin-*` crates (notification, autostart, positioner, dialog, single-instance, log, opener, updater) | Apache-2.0 OR MIT | | `regex`, `serde`, `serde_json`, `anyhow`, `dirs`, `rayon`, `sha2`, `log` | MIT OR Apache-2.0 | | `thiserror` | MIT OR Apache-2.0 | | `memchr`, `jiff` | Unlicense OR MIT | | `ruzstd`, `rusqlite` | MIT | -| `notify` | CC0-1.0 | +| `notify` | BSL-1.0 | `rusqlite` is built with the `bundled` feature, so it includes SQLite, which is in the public domain. diff --git a/app/package.json b/app/package.json index cf66ec8..81ff131 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "noactually-app", "private": true, - "version": "0.5.11", + "version": "0.5.12", "type": "module", "packageManager": "pnpm@10.32.1", "engines": { diff --git a/app/src-tauri/src/commands.rs b/app/src-tauri/src/commands.rs index cd1e4b3..92272d3 100644 --- a/app/src-tauri/src/commands.rs +++ b/app/src-tauri/src/commands.rs @@ -117,7 +117,7 @@ pub fn recent_report_cards(app: State>, filter: Filter) -> Res>, kind: GoalKind, target: i64) -> Res { - let now = jiff::Zoned::now(); + let now = jiff::ZonedDateTime::now(); lock(&app.writer).set_goal(kind, target, now.date(), now.timestamp().as_millisecond()).map_err(err) } diff --git a/app/src-tauri/src/report_cards/codex.rs b/app/src-tauri/src/report_cards/codex.rs index b1762cb..ffc83f3 100644 --- a/app/src-tauri/src/report_cards/codex.rs +++ b/app/src-tauri/src/report_cards/codex.rs @@ -416,7 +416,7 @@ fn read_hooks(path: &Path) -> Res> { /// Copies the hooks file as it is to `hooks.json.bak-YYYYMMDD-HHMMSS` beside it, never over an /// earlier copy (a second one in the same second gets `-1`, `-2`...). fn back_up(real: &Path) -> std::io::Result<()> { - let stamp = jiff::Zoned::now().strftime("%Y%m%d-%H%M%S"); + let stamp = jiff::ZonedDateTime::now().strftime("%Y%m%d-%H%M%S"); let mut src = std::fs::File::open(real)?; for n in 0.. { let name = if n == 0 { format!("hooks.json.bak-{stamp}") } else { format!("hooks.json.bak-{stamp}-{n}") }; diff --git a/app/src-tauri/tauri.conf.json b/app/src-tauri/tauri.conf.json index 28b1067..7d616ea 100644 --- a/app/src-tauri/tauri.conf.json +++ b/app/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "No, Actually...", - "version": "0.5.11", + "version": "0.5.12", "identifier": "app.noactually", "build": { "beforeDevCommand": "pnpm dev", diff --git a/crates/sources/src/time.rs b/crates/sources/src/time.rs index 93764f4..cb62a6e 100644 --- a/crates/sources/src/time.rs +++ b/crates/sources/src/time.rs @@ -5,16 +5,16 @@ use jiff::civil::Date; use jiff::tz::TimeZone; -use jiff::{Timestamp, Zoned}; +use jiff::{Timestamp, ZonedDateTime}; /// Today's date where the computer is. pub fn today() -> Date { - Zoned::now().date() + ZonedDateTime::now().date() } /// The date `ts` fell on where the computer is. pub fn local_day(ts: Timestamp) -> Date { - ts.to_zoned(TimeZone::system()).date() + ts.to_zoned_datetime(TimeZone::system()).date() } /// The time zone the computer is in, to look up many times with [`Timestamp::to_zoned`]. @@ -49,7 +49,7 @@ enum Fraction { } fn stamp(ts: Timestamp, fraction: Fraction, utc: &str) -> String { - let t = ts.to_zoned(TimeZone::UTC).datetime(); + let t = ts.to_zoned_datetime(TimeZone::UTC).datetime(); let ns = t.subsec_nanosecond(); let frac = match fraction { Fraction::Millis => format!(".{:03}", ns / 1_000_000), diff --git a/crates/store/src/card_tests.rs b/crates/store/src/card_tests.rs index dfa6398..33c75df 100644 --- a/crates/store/src/card_tests.rs +++ b/crates/store/src/card_tests.rs @@ -23,7 +23,7 @@ use std::time::Duration as StdDuration; fn at(day: u32, m: u32) -> String { jiff::civil::date(2026, 10, day as i8) .at(12, m as i8, 0, 0) - .to_zoned(sources::time::local_zone()) + .to_zoned_datetime(sources::time::local_zone()) .unwrap() .timestamp() .to_string() diff --git a/crates/store/src/stats.rs b/crates/store/src/stats.rs index 2c8f6b8..e9e4176 100644 --- a/crates/store/src/stats.rs +++ b/crates/store/src/stats.rs @@ -401,7 +401,7 @@ fn correction_hours(v: &View) -> Result<[i64; 24]> { let zone = sources::time::local_zone(); for ts in v.rows(&sql, &[], |r| r.get::<_, String>(0))? { if let Some(t) = sources::time::parse(&ts) { - hours[t.to_zoned(zone.clone()).hour() as usize] += 1; + hours[t.to_zoned_datetime(zone.clone()).hour() as usize] += 1; } } Ok(hours) diff --git a/crates/store/src/tests.rs b/crates/store/src/tests.rs index 346f95f..17f2e81 100644 --- a/crates/store/src/tests.rs +++ b/crates/store/src/tests.rs @@ -150,7 +150,11 @@ fn weekly_buckets_split_on_monday() { // Local noon is the same day in every timezone; a fixed UTC hour isn't. let noon = |day: i8| { rfc3339( - jiff::civil::date(2026, 10, day).at(12, 0, 0, 0).to_zoned(sources::time::local_zone()).unwrap().timestamp(), + jiff::civil::date(2026, 10, day) + .at(12, 0, 0, 0) + .to_zoned_datetime(sources::time::local_zone()) + .unwrap() + .timestamp(), ) }; let (sunday, monday) = (noon(25), noon(26)); @@ -520,7 +524,7 @@ fn history_from_the_from_now_on_day_re_reads_that_day() { // "From now on" skipped the part of today before it, so "since today" reaches back. let dir = tempfile::tempdir().unwrap(); let path = dir.path().join("a.jsonl"); - let midnight = today().to_zoned(sources::time::local_zone()).unwrap().timestamp(); + let midnight = today().to_zoned_datetime(sources::time::local_zone()).unwrap().timestamp(); let earlier_today = (Timestamp::now() - SignedDuration::from_mins(1)).max(midnight); write_settled(&path, cc_correction("old", &rfc3339(earlier_today))); let all = claude_code(&dir); @@ -1486,7 +1490,7 @@ fn forget_clears_the_source_in_every_table_that_has_one_and_nothing_else() { #[test] fn a_message_on_the_backfill_day_is_kept_and_one_just_before_it_is_not() { let day = jiff::civil::date(2026, 6, 15); - let midnight = day.to_zoned(sources::time::local_zone()).unwrap().timestamp(); + let midnight = day.to_zoned_datetime(sources::time::local_zone()).unwrap().timestamp(); let state = SourceState { backfill_since: Some(day), ..test_source() }; assert!(state.wants(midnight), "the first moment of the day counts"); assert!(state.wants(midnight + SignedDuration::from_hours(12))); diff --git a/deny.toml b/deny.toml index 19461c0..b53362e 100644 --- a/deny.toml +++ b/deny.toml @@ -30,6 +30,7 @@ allow = [ "CC0-1.0", "0BSD", "CDLA-Permissive-2.0", + "BSL-1.0", ] confidence-threshold = 0.9 diff --git a/plugins/grade/.claude-plugin/plugin.json b/plugins/grade/.claude-plugin/plugin.json index 7b66e72..d8395e0 100644 --- a/plugins/grade/.claude-plugin/plugin.json +++ b/plugins/grade/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "grade", - "version": "0.5.11", + "version": "0.5.12", "description": "Report cards on how you prompt: type /grade:me for a letter grade, why, and how to ask so it's clear the first time. Works with the No, Actually... app to track your progress.", "author": { "name": "HTMLGuy LLC", From 0cb77c032c29cfceebc82c18e0d4fcfee30c932c Mon Sep 17 00:00:00 2001 From: HTMLGuy <2415447+HTMLGuyLLC@users.noreply.github.com> Date: Sun, 29 Nov 2026 11:20:46 -0500 Subject: [PATCH 2/3] Raise MSRV to 1.91 for notify 9 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 1 + Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 787de84..4e026de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ concurrency: env: CARGO_TERM_COLOR: always # Minimum supported Rust version. Keep in step with `rust-version` in Cargo.toml. - MSRV: '1.90' + MSRV: '1.91' # Branch protection requires only the `ci-ok` job at the bottom, so renaming or adding a job # here never blocks merges. diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d82f64..896d749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes are listed here. Format follows [Keep a Changelog](https://k ### Changed - Updated jiff to 1.0 and notify to 9. +- Building from source needs Rust 1.91 or later. ## [0.5.11] - 2026-11-25 diff --git a/Cargo.toml b/Cargo.toml index 10e12ed..270d399 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = ["crates/engine", "crates/sources", "crates/store", "crates/cli", "app version = "0.5.12" edition = "2021" # Oldest Rust that builds the whole workspace, app included. CI's `msrv` job checks it. -rust-version = "1.90" +rust-version = "1.91" license = "MIT" authors = ["HTMLGuy LLC"] repository = "https://github.com/HTMLGuyLLC/NoActually" From eae634ee1f327d2bec6e23ffe105df0eee38ab91 Mon Sep 17 00:00:00 2001 From: HTMLGuy <2415447+HTMLGuyLLC@users.noreply.github.com> Date: Sun, 29 Nov 2026 11:27:53 -0500 Subject: [PATCH 3/3] Use Duration::from_mins/from_hours now that MSRV is 1.91 Co-Authored-By: Claude Opus 5.5 --- app/src-tauri/src/report_cards.rs | 2 +- app/src-tauri/src/tracker.rs | 2 +- app/src-tauri/src/updater.rs | 4 ++-- crates/store/src/card_tests.rs | 2 +- crates/store/src/retention.rs | 2 +- crates/store/src/sync.rs | 2 +- crates/store/src/tests.rs | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src-tauri/src/report_cards.rs b/app/src-tauri/src/report_cards.rs index eb14977..4ef3c72 100644 --- a/app/src-tauri/src/report_cards.rs +++ b/app/src-tauri/src/report_cards.rs @@ -709,7 +709,7 @@ pub async fn report_cards_delete_history(window: tauri::Window, app: State<'_, A } /// How long a move that didn't finish and lost the plugin waits before it is tried again while the app stays open. -const RETRY_EVERY: Duration = Duration::from_secs(60 * 60); +const RETRY_EVERY: Duration = Duration::from_hours(1); /// One pass of the plugin check, on its own: no other pass and no click on Turn on or Turn off changes /// the plugin meanwhile, so two moves never run at once. `env` is made once the pass has its turn. With diff --git a/app/src-tauri/src/tracker.rs b/app/src-tauri/src/tracker.rs index 888ef47..55f0853 100644 --- a/app/src-tauri/src/tracker.rs +++ b/app/src-tauri/src/tracker.rs @@ -18,7 +18,7 @@ pub enum Msg { Stop(mpsc::Sender<()>), } -const SAFETY_NET: Duration = Duration::from_secs(5 * 60); +const SAFETY_NET: Duration = Duration::from_mins(5); const DEBOUNCE: Duration = Duration::from_secs(2); /// Live tracking checks at most this often while an AI tool is writing: a busy session rewrites /// its files every few seconds, and scores don't need to move that fast. "Check now" and consent diff --git a/app/src-tauri/src/updater.rs b/app/src-tauri/src/updater.rs index 7ea1397..710e7a3 100644 --- a/app/src-tauri/src/updater.rs +++ b/app/src-tauri/src/updater.rs @@ -19,13 +19,13 @@ pub enum Msg { } const FIRST_CHECK: Duration = Duration::from_secs(60); -const INTERVAL: Duration = Duration::from_secs(6 * 60 * 60); +const INTERVAL: Duration = Duration::from_hours(6); /// How long a check for a new version may take. One stalled request would otherwise block the only /// update worker for good. const CHECK_TIMEOUT: Duration = Duration::from_secs(30); /// How long the download of an update may take, start to end. A stalled one would otherwise leave /// the app "installing" until it's restarted. -const DOWNLOAD_TIMEOUT: Duration = Duration::from_secs(10 * 60); +const DOWNLOAD_TIMEOUT: Duration = Duration::from_mins(10); /// Settings key. Anything but "off" means on, so automatic checks start enabled. pub const AUTO_KEY: &str = "updates.auto"; diff --git a/crates/store/src/card_tests.rs b/crates/store/src/card_tests.rs index 33c75df..c5bd019 100644 --- a/crates/store/src/card_tests.rs +++ b/crates/store/src/card_tests.rs @@ -88,7 +88,7 @@ struct Lab { } /// A chat that has gone quiet, so its last message is final. -const SETTLED: StdDuration = StdDuration::from_secs(20 * 60); +const SETTLED: StdDuration = StdDuration::from_mins(20); impl Lab { fn new() -> Self { diff --git a/crates/store/src/retention.rs b/crates/store/src/retention.rs index de3a6fd..e6de200 100644 --- a/crates/store/src/retention.rs +++ b/crates/store/src/retention.rs @@ -112,7 +112,7 @@ pub(crate) const REDACTION_KEY: &str = "redaction_version"; /// Kept beside the database. Deleting text removes it, and the next pass writes a new one. pub const BACKUP_FILE: &str = "noactually-backup.db"; -const BACKUP_EVERY: std::time::Duration = std::time::Duration::from_secs(24 * 60 * 60); +const BACKUP_EVERY: std::time::Duration = std::time::Duration::from_hours(24); impl Store { /// The retention settings, or the defaults if never set. A saved value that can't be read diff --git a/crates/store/src/sync.rs b/crates/store/src/sync.rs index 30a5dbe..99fcc0f 100644 --- a/crates/store/src/sync.rs +++ b/crates/store/src/sync.rs @@ -9,7 +9,7 @@ use std::path::PathBuf; use std::time::{Duration, SystemTime}; /// A file untouched this long is done: its last unanswered message is counted as-is. -const QUIET: Duration = Duration::from_secs(15 * 60); +const QUIET: Duration = Duration::from_mins(15); /// Files parsed in parallel before their results are written. Bounds memory on a big backfill. const CHUNK: usize = 64; diff --git a/crates/store/src/tests.rs b/crates/store/src/tests.rs index 17f2e81..4534fe5 100644 --- a/crates/store/src/tests.rs +++ b/crates/store/src/tests.rs @@ -57,7 +57,7 @@ fn stats(s: &Store) -> Stats { } /// A chat that has gone quiet, so its last message is final. -const SETTLED: StdDuration = StdDuration::from_secs(20 * 60); +const SETTLED: StdDuration = StdDuration::from_mins(20); fn claude_code(dir: &tempfile::TempDir) -> Vec> { vec![sources::claude_code_at(dir.path().to_path_buf())] @@ -389,7 +389,7 @@ fn quiet_files_count_their_last_unanswered_message() { s.allow("claude-code", None).unwrap(); let all = claude_code(&dir); assert_eq!(sync(&mut s, &all).unwrap().messages, 0, "still being written"); - set_mtime_ago(&path, StdDuration::from_secs(20 * 60)); + set_mtime_ago(&path, StdDuration::from_mins(20)); let r = sync(&mut s, &all).unwrap(); assert_eq!((r.messages, r.corrections), (1, 1), "a quiet file is final"); assert_eq!(sync(&mut s, &all).unwrap().files_read, 0);