Open
Conversation
Contributor
📝 WalkthroughWalkthroughThis PR modifies full sync interval handling across the sync manager, configurator, and preflight logic. When the server omits or sends 0 for Changes
Sequence Diagram(s)sequenceDiagram
participant Init as Initialization Flow
participant Daemon as Daemon (XPC)
participant SM as SNTSyncManager
participant Preflight as Preflight Handler
participant Server as Server
Init->>Daemon: synchronousRemoteObjectProxy<br/>(fullSyncInterval callback)
Daemon-->>SM: callback(daemonInterval)
SM->>SM: persistedFullSyncInterval = daemonInterval
Note over SM: Stores daemon-provided interval<br/>as fallback
SM->>SM: Schedule full sync timer<br/>using persistedFullSyncInterval
rect rgba(100, 150, 200, 0.5)
Note over Preflight,Server: Preflight Sync
Preflight->>Server: Request sync state
Server-->>Preflight: fullSyncInterval = X
Preflight->>SM: Update syncState with interval
end
rect rgba(150, 100, 200, 0.5)
Note over Preflight,Server: Server Omits Interval
Preflight->>Server: Request sync state
Server-->>Preflight: fullSyncInterval = nil/0
Preflight->>SM: fullSyncInterval not set
SM->>SM: Falls back to<br/>persistedFullSyncInterval
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
This makes it so that on startup, if sync fails or the server doesn't set sync interval values, previously persisted intervals will be used.