Skip to content

Develop - #29

Merged
EarMaster merged 3 commits into
mainfrom
develop
Oct 1, 2026
Merged

EarMaster merged 3 commits into
mainfrom
develop

Conversation

@EarMaster

Copy link
Copy Markdown
Owner

No description provided.

EarMaster and others added 3 commits September 29, 2026 21:28
SYNC_ENTITLED_TIERS included 'enterprise', so shouldSync() returned
true for any account billed at that tier, including the owner before
they ever assigned themselves a seat - disagreeing with the server,
which now requires enterprise_owner_id to actually be set (see the
same-day cloud/ and website/ commits). Now just ['pro'];
enterpriseOwnerId is what grants entitlement, tier alone does not.

Checked: tsc --noEmit, npm run test (250 passing, 2 new).
… and chrono

The frontend now gets every date and time from src/lib/utils/time.ts,
which takes Temporal from temporal-polyfill as a value. Without that,
WebView2 would run native Temporal while WKWebView and WebKitGTK ran the
polyfill. The backend gets them from src-tauri/src/time.rs on
temporal_rs, and chrono, SystemTime and UNIX_EPOCH are gone. cargo tree
finds no path to chrono any more.

Both sides now write one text format: RFC 3339 in UTC, always nine
fractional digits, always Z. Before this, the same columns held chrono's
+00:00 with up to nine digits from Rust and Date's Z with three from the
frontend. SQLite compares those columns as text, so the completed-stash
cleanup and the newest-first export could misorder two rows within the
same second. The DB writers normalise whatever they are handed, and a
one-time pass, recorded in PRAGMA user_version, rewrites existing rows
and keeps any value it cannot read.

The legacy toLocaleString() heading dates in old archives were parsed
by a chrono format list. That is now a small hand-written parser,
tested against every form the list accepted.

The export dialog took its file name's date from UTC and its time from
the local clock, so exports near midnight were named a day off. Both
now come from the local calendar (CHANGELOG entry). getRelativeTime
keeps its signature and i18n keys, so no call site changed.

Every read of "now" goes through time.ts, so the screenshot demo freezes
it with setClock instead of replacing globalThis.Date. npm run
check:temporal fails on any Date, a stray polyfill import, chrono or
SystemTime, and runs in the frontend test job.

Checked: 268 vitest tests, 178 cargo tests with clippy -D warnings and
fmt clean, check:temporal against deliberate violations in both
languages, a vite build, and the queue screenshot, which still reads
"6 minutes ago" under the frozen clock.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@EarMaster
EarMaster merged commit 746cc76 into main Oct 1, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant