Skip to content

fix(macos): retain cached calendar ranges while offline - #4510

Merged
tyler-dane merged 2 commits into
mainfrom
fix/macos-offline-calendar-cache
Oct 17, 2026
Merged

tyler-dane merged 2 commits into
mainfrom
fix/macos-offline-calendar-cache

Conversation

@tyler-dane

@tyler-dane tyler-dane commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4509

What and why

An expired cached range previously failed to load if its refresh failed. Return the last known range for connection failures only, retain its stale timestamp so the next request retries, and reject fallback after in-flight cache invalidation. Unknown ranges and authentication/API errors still fail normally. This complements account cache ownership and clearing in #4499 without changing that policy.

Verify

VERDICT: PASS

Full bun run verify --strict passes on reconciled head 4998a05: Swift package tests, Xcode native tests, type-check, lint, and knip. Swift contracts, desktop export, and lint also pass. This change covers range reads; offline calendar-metadata bootstrapping remains a separate gap.

126 CompassData package tests pass, including stale-cache fallback, reconnect/pruning, unknown-range failure, authentication failure, and in-flight invalidation. Swift contract and desktop export checks pass. Diff review retains the existing store/cache boundary and introduces no new product state or abstraction.

Resolved the actual main-branch conflict with account isolation. Both success and connection-error paths reject responses from an earlier session before cache access.

@tyler-dane
tyler-dane marked this pull request as ready for review October 16, 2026 23:41
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 16, 2026
@tyler-dane
tyler-dane enabled auto-merge October 16, 2026 23:41
@tyler-dane
tyler-dane added this pull request to the merge queue Oct 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 17, 2026
@tyler-dane
tyler-dane marked this pull request as draft October 17, 2026 00:13
@tyler-dane
tyler-dane marked this pull request as ready for review October 17, 2026 00:17
@tyler-dane
tyler-dane enabled auto-merge October 17, 2026 00:17
@tyler-dane
tyler-dane added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit b959fb4 Oct 17, 2026
23 checks passed
@tyler-dane
tyler-dane deleted the fix/macos-offline-calendar-cache branch October 17, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-automerge Agent-loop finished; merge-guard may squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macos: retain cached calendar ranges during connection failures

1 participant