Repository navigation
fix(macos): retain cached calendar ranges while offline - #4510
Merged
Merged
Conversation
tyler-dane
marked this pull request as ready for review
October 16, 2026 23:41
tyler-dane
enabled auto-merge
October 16, 2026 23:41
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
marked this pull request as draft
October 17, 2026 00:13
tyler-dane
marked this pull request as ready for review
October 17, 2026 00:17
tyler-dane
enabled auto-merge
October 17, 2026 00:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 --strictpasses 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.