Skip to content

Fix development Settings window and Xcode diagnostics - #237

Merged
rajzik merged 3 commits into
mainfrom
codex/fix-development-settings-xcode-warnings
Jul 30, 2026
Merged

rajzik merged 3 commits into
mainfrom
codex/fix-development-settings-xcode-warnings

Conversation

@rajzik

@rajzik rajzik commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • declare multiple-scene support so the development-only Mac Catalyst Settings window can open
  • route Apple, Google, and Microsoft authentication presentation-anchor lookups through one main-thread resolver
  • make three best-effort connection refresh result discards explicit and add regression coverage

Root cause

The development Settings entry point opens a separate scene, but the app manifest did not declare multiple-scene support. AuthenticationServices can also invoke its synchronous presentation-context callbacks outside the main actor; those callbacks directly accessed UIApplication, scene, and window state, producing Main Thread Checker reports. Three recovery paths also discarded optional try? results without explicitly assigning them.

User impact

The development Settings window opens on Mac Catalyst, authentication flows resolve their presentation window without off-main UIKit access, and the related Xcode diagnostics are removed.

Validation

  • mise exec -- zsh scripts/check-apple-lint.zsh
  • MTC_CRASH_ON_REPORT=1 mise exec -- xcodebuild test -quiet -project apps/unwired-mail/unwired-mail.xcodeproj -scheme unwired-mail -destination 'platform=iOS Simulator,name=iPhone 17' -only-testing:unwired-mailTests/ProductAccountSessionTests/testAuthenticationPresentationAnchorsCanBeRequestedOffMainThread
  • mise exec -- xcodebuild test -quiet -project apps/unwired-mail/unwired-mail.xcodeproj -scheme unwired-mail -destination 'platform=iOS Simulator,name=iPhone 17'
  • mise exec -- xcodebuild build -quiet -project apps/unwired-mail/unwired-mail.xcodeproj -scheme unwired-mail -destination 'platform=macOS,variant=Mac Catalyst' CODE_SIGNING_ALLOWED=NO
  • verified the built Catalyst app plist contains UIApplicationSupportsMultipleScenes = true
  • git diff --check

A Catalyst-hosted focused test could not launch in this checkout because no development signing team is configured; the unsigned Catalyst build completed successfully.

Refs #115


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

📝 Walkthrough

Summary

  • Enabled multiple-scene support so the development-only Mac Catalyst Settings window can open correctly when DEVELOPMENT_MULTIPLE_SCENES is enabled.
  • Centralized ASWebAuthenticationSession/ASAuthorizationController presentation-anchor resolution via a shared AuthenticationPresentationAnchorStore, ensuring the anchor is captured on the main actor and subsequent anchor lookups use a main-thread-safe, nonisolated path for Microsoft Graph, Google Gmail, and Sign in with Apple.
  • Added explicit discards of refreshConnections() results during specific connection-refresh error paths to address Xcode diagnostics without changing the surrounding state/error-handling behavior.
  • Added regression coverage for development multi-scene configuration and for requesting authentication presentation anchors off the main thread.

Configuration and security

  • Info.plist (Mac Catalyst/iOS app): conditionally adds UIApplicationSceneManifest with UIApplicationSupportsMultipleScenes = true when DEVELOPMENT_MULTIPLE_SCENES is enabled.
  • Xcode build settings: enabled INFOPLIST_PREPROCESS and added DEVELOPMENT_MULTIPLE_SCENES=1 via INFOPLIST_PREPROCESSOR_DEFINITIONS[sdk=macosx*] for the Debug configuration (and enabled preprocessing in Release).

Security/privacy boundary changes

  • None intended. The change is scoped to UI presentation-context resolution for authentication flows (presentation anchors), not to authentication mechanisms or data handling policies.

Validation

  • Apple linting, focused and full iOS tests, unsigned Mac Catalyst build, plist verification, and git diff --check.
  • Catalyst-hosted focused test could not launch due to missing development signing team configuration.

Affected areas

  • Apple (Swift/UIKit/AppKit/XCTest):
    • Development Settings window multiple-scene support: Info.plist, Settings destination registry tests.
    • Authentication UI presentation context:
      • SignInWithAppleService (new AuthenticationPresentationAnchor/AuthenticationPresentationAnchorStore, new AppleSignInError.presentationAnchorUnavailable, nonisolated presentation-context provider)
      • GoogleGmailOAuthService (injects anchor store; captures current anchor before auth)
      • MicrosoftGraphOAuthService (injects anchor store; captures current anchor before starting ASWebAuthenticationSession)
    • Connection refresh regression: AccountView.swift (MailboxProviderConnectionViewModel).
    • Tests: ProductAccountSessionTests (off-main-thread anchor retrieval).
  • TypeScript:
    • No changes indicated.

Walkthrough

Authentication presentation-anchor lookup is centralized across Apple, Google, and Microsoft authentication flows, multi-scene support is enabled through conditional Info.plist preprocessing, and account connection error paths explicitly discard refresh results.

Changes

Authentication and development settings

Layer / File(s) Summary
Centralized authentication presentation anchors
apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift, apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift, apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift, apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
Apple, Google, and Microsoft authentication services capture and provide presentation anchors through AuthenticationPresentationAnchorStore; off-main-thread access is tested.
Development settings scene configuration
apps/unwired-mail/unwired-mail/Info.plist, apps/unwired-mail/unwired-mail.xcodeproj/project.pbxproj, apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift, .changeset/open-development-settings-window.md
Conditional Info.plist preprocessing enables multiple scenes for macOS development builds, with a test validating the scene manifest.
Account connection error handling
apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
Connection error paths explicitly discard refreshConnections() results while retaining existing state updates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ASAuthorizationController
  participant SignInWithAppleService
  participant ASWebAuthenticationSession
  participant GoogleGmailOAuthService
  participant MicrosoftGraphOAuthService
  participant AuthenticationPresentationAnchorStore

  ASAuthorizationController->>SignInWithAppleService: request presentation anchor
  SignInWithAppleService->>AuthenticationPresentationAnchorStore: captureCurrent()
  AuthenticationPresentationAnchorStore-->>SignInWithAppleService: captured anchor
  SignInWithAppleService-->>ASAuthorizationController: return anchor

  ASWebAuthenticationSession->>GoogleGmailOAuthService: request presentation anchor
  GoogleGmailOAuthService->>AuthenticationPresentationAnchorStore: current()
  AuthenticationPresentationAnchorStore-->>GoogleGmailOAuthService: return anchor

  ASWebAuthenticationSession->>MicrosoftGraphOAuthService: request presentation anchor
  MicrosoftGraphOAuthService->>AuthenticationPresentationAnchorStore: current()
  AuthenticationPresentationAnchorStore-->>MicrosoftGraphOAuthService: return anchor
Loading

Possibly related PRs

Suggested labels: codex, codex-automation

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: opening the development Settings window and cleaning up related Xcode diagnostics.
Description check ✅ Passed The description is directly related to the changeset and accurately summarizes the window, authentication, and diagnostic fixes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@rajzik
rajzik marked this pull request as ready for review July 30, 2026 14:13
@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37ab26363d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/unwired-mail/unwired-mail/Info.plist Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift`:
- Around line 28-38: Update AuthenticationPresentationAnchor.current() and its
callers in SignInWithAppleService so the presenting window from the sign-in UI
is passed through and used as the ASAuthorizationController presentation anchor.
Do not select the first foreground-active scene or arbitrary AppKit window; when
no presenting window is available, return no anchor using the existing API’s
optional behavior.
- Around line 13-23: Update the synchronous MainActor access around
currentOnMainActor so it uses a bridge that actually establishes MainActor
isolation instead of relying on Thread.isMainThread and
MainActor.assumeIsolated. Preserve synchronous behavior for both main-thread and
background callers, and remove or replace assumeIsolated in this path to prevent
isolation traps.

In `@apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift`:
- Around line 51-80: Update
testAuthenticationPresentationAnchorsCanBeRequestedOffMainThread to create
deterministic multiple active scenes with distinct windows, then assert that
SignInWithAppleService and each web provider return the intended authentication
window rather than ignoring the anchors. Keep the off-main-thread request
coverage, ensure scene/window setup and teardown are isolated, and wait for
assertions to complete without relying on the detached fallback.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a6ab697b-62df-4329-8bb8-f473247cdef7

📥 Commits

Reviewing files that changed from the base of the PR and between 28493a2 and 37ab263.

📒 Files selected for processing (8)
  • .changeset/open-development-settings-window.md
  • apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
  • apps/unwired-mail/unwired-mail/Info.plist
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
  • apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift
📜 Review details
🧰 Additional context used
📓 Path-based instructions (6)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

Create a Changeset for runtime behavior changes or exported type/API changes; tests-only, internal refactors, docs-only changes, and JSDoc-only maintenance may skip it.

Files:

  • .changeset/open-development-settings-window.md
apps/unwired-mail/**/*.{swift,m,mm}

📄 CodeRabbit inference engine (AGENTS.md)

apps/unwired-mail/**/*.{swift,m,mm}: The Apple app must provide formatter, linter, and test commands; use zsh scripts/check-apple-lint.zsh for formatting and linting.
Run Apple tests with xcodebuild test -project apps/unwired-mail/unwired-mail.xcodeproj -scheme unwired-mail -destination 'platform=iOS Simulator,name=iPhone 17'.
Every Apple code change must receive formatter, linter, and test validation unless Apple tooling or a platform dependency is unavailable.

Files:

  • apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
apps/unwired-mail/**/*.swift

📄 CodeRabbit inference engine (AGENTS.md)

SwiftLint runs in strict mode, so warnings fail validation.

Files:

  • apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift

⚙️ CodeRabbit configuration file

apps/unwired-mail/**/*.swift: Prioritize functional correctness, data protection, and Apple platform
behavior over style already enforced by swift-format and SwiftLint.
Check actor isolation, cancellation, lifecycle transitions, persistence,
retry and offline behavior, and Keychain accessibility. Flag credentials,
tokens, mail content, or decrypted Product Sync data that can be logged,
persisted outside approved device-local storage, or cross a documented
privacy boundary. Require focused tests for changed behavior and failure
paths.

Files:

  • apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
**/*.{swift,m,mm}

📄 CodeRabbit inference engine (AGENTS.md)

Run the smallest meaningful checks for the touched Apple area first, then broaden validation for shared tooling or cross-project behavior.

Files:

  • apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
**/*

📄 CodeRabbit inference engine (AGENTS.md)

Touch only files required by the request; do not refactor, reformat, or improve adjacent code, and remove only unused items created by your changes.

Files:

  • apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift
  • apps/unwired-mail/unwired-mail/Info.plist
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
**/*Tests/**/*.swift

⚙️ CodeRabbit configuration file

**/*Tests/**/*.swift: Verify externally observable behavior, privacy invariants, error paths,
cancellation or restart behavior where relevant, and deterministic
isolation. Flag fragile sleeps, ordering dependencies, and tests that
duplicate the implementation instead of exercising it.

Files:

  • apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
🪛 markdownlint-cli2 (0.23.1)
.changeset/open-development-settings-window.md

[warning] 4-4: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (8)
apps/unwired-mail/unwired-mail/Info.plist (1)

28-32: LGTM!

apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift (1)

193-199: LGTM!

.changeset/open-development-settings-window.md (1)

1-3: 🗄️ Data Integrity & Integration

No changes needed.
Empty front matter is the repo’s normal Changesets pattern for app-level release notes, so this file doesn’t need package-specific bump metadata.

			> Likely an incorrect or invalid review comment.
apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift (1)

317-320: LGTM!

apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift (1)

4094-4097: LGTM!

apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift (1)

284-287: LGTM!

apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift (1)

1228-1230: LGTM!

apps/unwired-mail/unwired-mail/Features/Account/AccountView.swift (1)

6511-6518: LGTM!

Also applies to: 6580-6580

Comment thread apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift (1)

51-95: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Cover the no-anchor error paths.

This only tests a populated store. Add deterministic tests that an empty store prevents launch and returns presentationAnchorUnavailable for Apple and webAuthenticationUnavailable for Google/Microsoft.

As per path instructions, “Verify externally observable behavior, privacy invariants, error paths, cancellation or restart behavior where relevant, and deterministic isolation.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift` around
lines 51 - 95, Extend the authentication presentation tests around
testAuthenticationPresentationAnchorsCanBeRequestedOffMainThread to use empty
AuthenticationPresentationAnchorStore instances and verify the externally
observable failure behavior: Apple authorization must not launch and must return
presentationAnchorUnavailable, while Google and Microsoft web authentication
must not launch and must return webAuthenticationUnavailable. Keep the tests
deterministic and isolated, covering each provider’s no-anchor path without
relying on a populated presentation anchor.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift`:
- Around line 51-95: Extend the authentication presentation tests around
testAuthenticationPresentationAnchorsCanBeRequestedOffMainThread to use empty
AuthenticationPresentationAnchorStore instances and verify the externally
observable failure behavior: Apple authorization must not launch and must return
presentationAnchorUnavailable, while Google and Microsoft web authentication
must not launch and must return webAuthenticationUnavailable. Keep the tests
deterministic and isolated, covering each provider’s no-anchor path without
relying on a populated presentation anchor.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bd03305e-d723-4fa8-905e-61624b1b7fea

📥 Commits

Reviewing files that changed from the base of the PR and between 37ab263 and 7f2ab6f.

📒 Files selected for processing (6)
  • apps/unwired-mail/unwired-mail.xcodeproj/project.pbxproj
  • apps/unwired-mail/unwired-mail/Info.plist
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Apple · Unwired Mail
🧰 Additional context used
📓 Path-based instructions (5)
**/*

📄 CodeRabbit inference engine (AGENTS.md)

Touch only files required by the request; do not refactor, reformat, or improve adjacent code, and remove only unused items created by your changes.

Files:

  • apps/unwired-mail/unwired-mail/Info.plist
  • apps/unwired-mail/unwired-mail.xcodeproj/project.pbxproj
  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
apps/unwired-mail/**/*.{swift,m,mm}

📄 CodeRabbit inference engine (AGENTS.md)

apps/unwired-mail/**/*.{swift,m,mm}: The Apple app must provide formatter, linter, and test commands; use zsh scripts/check-apple-lint.zsh for formatting and linting.
Run Apple tests with xcodebuild test -project apps/unwired-mail/unwired-mail.xcodeproj -scheme unwired-mail -destination 'platform=iOS Simulator,name=iPhone 17'.
Every Apple code change must receive formatter, linter, and test validation unless Apple tooling or a platform dependency is unavailable.

Files:

  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
apps/unwired-mail/**/*.swift

📄 CodeRabbit inference engine (AGENTS.md)

SwiftLint runs in strict mode, so warnings fail validation.

Files:

  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift

⚙️ CodeRabbit configuration file

apps/unwired-mail/**/*.swift: Prioritize functional correctness, data protection, and Apple platform
behavior over style already enforced by swift-format and SwiftLint.
Check actor isolation, cancellation, lifecycle transitions, persistence,
retry and offline behavior, and Keychain accessibility. Flag credentials,
tokens, mail content, or decrypted Product Sync data that can be logged,
persisted outside approved device-local storage, or cross a documented
privacy boundary. Require focused tests for changed behavior and failure
paths.

Files:

  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
**/*.{swift,m,mm}

📄 CodeRabbit inference engine (AGENTS.md)

Run the smallest meaningful checks for the touched Apple area first, then broaden validation for shared tooling or cross-project behavior.

Files:

  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift
  • apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift
  • apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift
**/*Tests/**/*.swift

⚙️ CodeRabbit configuration file

**/*Tests/**/*.swift: Verify externally observable behavior, privacy invariants, error paths,
cancellation or restart behavior where relevant, and deterministic
isolation. Flag fragile sleeps, ordering dependencies, and tests that
duplicate the implementation instead of exercising it.

Files:

  • apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift
🧬 Code graph analysis (1)
apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift (2)
apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift (1)
  • presentationAnchor (292-292)
apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift (1)
  • presentationAnchor (340-340)
🔇 Additional comments (7)
apps/unwired-mail/unwired-mail/Services/ProductAccount/SignInWithAppleService.swift (2)

13-19: Use the initiating scene’s window.

connectedScenes is unordered, so .first(where: \.isKeyWindow) can select a different active window after enabling multiple scenes. Pass the presenting window/scene from the sign-in UI instead of globally scanning scenes. This prior concern remains after centralization. As per path instructions, “Prioritize functional correctness, data protection, and Apple platform behavior over style already enforced by swift-format and SwiftLint.”

Source: Path instructions


28-53: LGTM!

Also applies to: 96-118, 193-205, 237-239, 339-342

apps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swift (1)

142-159: LGTM!

Also applies to: 226-229, 291-295

apps/unwired-mail/unwired-mail/Services/Mailbox/MicrosoftGraphMailboxConnectionAdapter.swift (1)

3925-3947: LGTM!

Also applies to: 4041-4044, 4101-4105

apps/unwired-mail/unwired-mailTests/ProductAccountSessionTests.swift (1)

1243-1243: LGTM!

apps/unwired-mail/unwired-mail.xcodeproj/project.pbxproj (1)

676-677: LGTM!

Also applies to: 713-713

apps/unwired-mail/unwired-mail/Info.plist (1)

28-34: LGTM!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f2ab6fdc2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/unwired-mail/unwired-mailTests/SettingsDestinationRegistryTests.swift Outdated
@rajzik
rajzik merged commit f6d1ac3 into main Jul 30, 2026
7 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