Gate iMessage local sync to macOS in serve to eliminate unsupported-platform warnings#2
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/chz160/openmessage/sessions/86acf90b-56f8-45a6-934b-c55cd4979791 Co-authored-by: chz160 <3420276+chz160@users.noreply.github.com>
Agent-Logs-Url: https://github.com/chz160/openmessage/sessions/86acf90b-56f8-45a6-934b-c55cd4979791 Co-authored-by: chz160 <3420276+chz160@users.noreply.github.com>
Agent-Logs-Url: https://github.com/chz160/openmessage/sessions/86acf90b-56f8-45a6-934b-c55cd4979791 Co-authored-by: chz160 <3420276+chz160@users.noreply.github.com>
…-platform warnings Agent-Logs-Url: https://github.com/chz160/openmessage/sessions/86acf90b-56f8-45a6-934b-c55cd4979791 Co-authored-by: chz160 <3420276+chz160@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
chz160
May 11, 2026 00:40
View session
There was a problem hiding this comment.
Pull request overview
This PR prevents openmessage serve from attempting iMessage local database sync on unsupported operating systems by gating the periodic iMessage sync path to macOS (Darwin). This reduces noisy/ misleading warnings on Windows/Linux while keeping existing macOS behavior intact.
Changes:
- Gate periodic iMessage local sync behind a
iMessageSyncSupported()check (Darwin-only). - Introduce a shared
isDarwin()helper and reuse it from the macOS notifications default-path and iMessage sync gating. - Add a unit test verifying iMessage sync support behavior across
darwinvswindows.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| go.mod | Promotes several already-imported dependencies from indirect to direct requirements (module bookkeeping). |
| cmd/serve.go | Skips periodic iMessage local sync unless running on Darwin; centralizes GOOS check in isDarwin(). |
| cmd/serve_test.go | Adds TestIMessageSyncSupported to validate Darwin-only support behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
openmessage servewas attempting iMessage local DB sync on Windows, producing repeated warnings likeload chats: unable to open database fileunderplatform=imessage. This change limits iMessage background sync to supported OS behavior so Windows/Linux runs stop surfacing misleading iMessage importer errors.Behavior change: platform-gated iMessage sync
servenow skips iMessage local sync unless running on Darwin.Code structure: shared Darwin predicate
isDarwin()helper and reused it from both notification gating and iMessage sync support checks.Coverage: explicit sync support test
TestIMessageSyncSupportedto verify:darwin=> supportedwindows=> unsupported