From 1724894105408aab5844c4575a5df2b400da0dc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 16:18:16 +0000 Subject: [PATCH 1/3] Bump the actions-minor-and-patch group with 3 updates Bumps the actions-minor-and-patch group with 3 updates: [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/analyze](https://github.com/github/codeql-action) and [swatinem/rust-cache](https://github.com/swatinem/rust-cache). Updates `github/codeql-action/init` from 4.38.3 to 4.39.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...9b3254085494b55a0f7c4c2b3d2d52cc712ce370) Updates `github/codeql-action/analyze` from 4.38.3 to 4.39.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...9b3254085494b55a0f7c4c2b3d2d52cc712ce370) Updates `swatinem/rust-cache` from 2.9.2 to 2.9.3 - [Release notes](https://github.com/swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](https://github.com/swatinem/rust-cache/compare/6323deb102c322ba6fcbdcafc7e3dddab59af2b6...d1527c8f67ef9af357290475d4af4b0fab8f12e0) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.39.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-and-patch - dependency-name: github/codeql-action/analyze dependency-version: 4.39.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-and-patch - dependency-name: swatinem/rust-cache dependency-version: 2.9.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor-and-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql.yml | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index dce3796..3dd7aa0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -121,13 +121,13 @@ jobs: - name: Initialize CodeQL if: env.SKIP != 'true' - uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4 + uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} - name: Analyze if: env.SKIP != 'true' - uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4 + uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4 with: category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e09f7fb..72d570a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -310,7 +310,7 @@ jobs: # roughly 600 of windows-latest's 694. test.yml has cached since it was written; the # build matrix simply never got one. - name: Cache Rust dependencies - uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + uses: swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 with: workspaces: src-tauri -> target diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a09f4ae..647515c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -172,7 +172,7 @@ jobs: # roughly daily. A `Cargo.lock` or rustc change between releases means develop runs cold # until the next one - the honest cost of three entries instead of nine. - name: Cache Rust dependencies - uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + uses: swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 with: workspaces: src-tauri -> target save-if: ${{ github.ref == 'refs/heads/main' }} From 903ae90fac5b6b7bab1980efe50009a7bc18131f Mon Sep 17 00:00:00 2001 From: Nico Wiedemann Date: Thu, 5 Nov 2026 09:50:09 +0100 Subject: [PATCH 2/3] Read day-first slash dates in old export archives as day first Archives from before the export format changed carry each stash's date as JavaScript's toLocaleString() wrote it on the exporting machine. The importer read every slash date month first and only fell back to day first when month first was impossible, so an en-GB 12/03/2026 - 12 March - came back as 3 December, and every stash created up to the 12th of a month was silently swapped. It showed as creation dates in the future. en-US is the only locale whose toLocaleString() writes an upper-case AM/PM, and it always does. So a slash date is now month first only beside one; a 24-hour clock or a lower-case am/pm (en-GB, en-AU, en-IN) is day first. The other order is still tried when the preferred one cannot be a date. The test that pinned the old behaviour (3/4/2026, 10:14:32 as 4 March) now pins the right one, plus the 12/03 case from real data. Already imported stashes are left as they are. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 8 ++++++++ src-tauri/src/transfer.rs | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fd27cd..d218e6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,14 @@ popover, not for the person who wrote the commit. ## [Unreleased] +### Fixed + +- **Importing an older export no longer swaps day and month.** Archives from before the export + format changed carry dates the way the exporting computer wrote them, and on a computer set + to a day-first format such as British English, every stash created up to the 12th of a month + came back with day and month swapped - 12 March became 3 December. Stashes already imported + keep the dates they were given + ## [1.11.4] - 2026-11-05 ### Added diff --git a/src-tauri/src/transfer.rs b/src-tauri/src/transfer.rs index 2c347db..06c490f 100644 --- a/src-tauri/src/transfer.rs +++ b/src-tauri/src/transfer.rs @@ -142,17 +142,24 @@ fn parse_heading_date(raw: &str) -> Option { /// The `toLocaleString()` forms older exports used, which no ISO parser reads: /// -/// * `8/20/2026, 10:14:32 AM` and `8/20/2026, 10:14:32` - en-US, month first +/// * `8/20/2026, 10:14:32 AM` - en-US, month first /// * `20.8.2026, 10:14:32` and `20.8.2026 10:14:32` - de-DE /// * `20/8/2026, 10:14:32` and `20/8/2026 10:14:32` - en-GB and similar, day first +/// * `20/8/2026, 10:14:32 am` - en-AU, en-IN and similar, day first /// -/// A slash date is tried month first, as en-US is far the more common, and read day first -/// only when that cannot be a date - the same order the formats were tried in before. +/// **A slash date is month first only beside an upper-case `AM`/`PM`.** en-US +/// `toLocaleString()` always writes one, and the day-first slash locales write either a +/// 24-hour clock or a lower-case `am`/`pm`. This used to try month first for every slash +/// date and fall back to day first only when month first was impossible, so an en-GB +/// archive's `12/03/2026` - 12 March - came back as 3 December, and every date up to the +/// 12th of a month was silently swapped on import. The other order is still tried when the +/// preferred one cannot be a date, so a stray `8/20/2026, 22:14:32` reads as 20 August. fn parse_locale_heading(text: &str) -> Option { let (date, rest) = text.split_once([',', ' '])?; let mut clock = rest.trim_start_matches([',', ' ']).split(' '); let hms = clock.next()?; let meridiem = clock.next(); + let month_first = matches!(meridiem, Some("AM" | "PM")); if clock.next().is_some() { return None; } @@ -196,7 +203,8 @@ fn parse_locale_heading(text: &str) -> Option { ) }; match separator { - '/' => at(a, b).or_else(|| at(b, a)), + '/' if month_first => at(a, b).or_else(|| at(b, a)), + '/' => at(b, a).or_else(|| at(a, b)), _ => at(b, a), } } @@ -1425,10 +1433,14 @@ old ("8/20/2026, 12:05:00 PM", "2026-08-20 12:05:00"), ("8/20/2026, 22:14:32", "2026-08-20 22:14:32"), ("20.08.2026 10:14:32", "2026-08-20 10:14:32"), - // Day first only when month first cannot be a date. ("20/8/2026, 10:14:32", "2026-08-20 10:14:32"), ("20/8/2026 10:14:32", "2026-08-20 10:14:32"), - ("3/4/2026, 10:14:32", "2026-03-04 10:14:32"), + // Month first only beside an upper-case meridiem, which only en-US writes. + ("3/4/2026, 10:14:32 AM", "2026-03-04 10:14:32"), + // Day first otherwise: en-GB's 24-hour clock, en-AU's lower-case am/pm. + ("3/4/2026, 10:14:32", "2026-04-03 10:14:32"), + ("12/03/2026, 09:25:39", "2026-03-12 09:25:39"), + ("3/4/2026, 10:14:32 pm", "2026-04-03 22:14:32"), ("2026-08-20T10:14:32", "2026-08-20 10:14:32"), ("2026-08-20", "2026-08-20 00:00:00"), ("2026-08-20T10:14:32+02:00", "2026-08-20 08:14:32"), From 199e1444b079963c15edd7ea1c69c21d333bf986 Mon Sep 17 00:00:00 2001 From: Nico Wiedemann Date: Thu, 5 Nov 2026 09:52:24 +0100 Subject: [PATCH 3/3] chore: bump version to v1.11.5 Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 2 ++ package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d218e6f..2eccd69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ popover, not for the person who wrote the commit. ## [Unreleased] +## [1.11.5] - 2026-11-05 + ### Fixed - **Importing an older export no longer swaps day and month.** Archives from before the export diff --git a/package.json b/package.json index 96930c4..5ab999a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stashpad", - "version": "1.11.4", + "version": "1.11.5", "description": "The staging area for your AI context.", "author": { "name": "Nico Wiedemann", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index dee2b47..466d8b4 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5557,7 +5557,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stashpad" -version = "1.11.4" +version = "1.11.5" dependencies = [ "active-win-pos-rs", "aes-gcm", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 7b8fd87..50cd097 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stashpad" -version = "1.11.4" +version = "1.11.5" description = "The staging area for your AI context." authors = ["Nico Wiedemann "] repository = "https://github.com/EarMaster/stashpad" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 648dbc4..f93ad44 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "stashpad", - "version": "1.11.4", + "version": "1.11.5", "identifier": "org.stashpad", "build": { "frontendDist": "../dist",