Skip to content

feat(macos): add Swift 6 strict concurrency compatibility#166

Merged
steipete merged 1 commit intoopenclaw:mainfrom
Nachx639:feat/swift6-compatibility
Jan 4, 2026
Merged

feat(macos): add Swift 6 strict concurrency compatibility#166
steipete merged 1 commit intoopenclaw:mainfrom
Nachx639:feat/swift6-compatibility

Conversation

@Nachx639
Copy link
Contributor

@Nachx639 Nachx639 commented Jan 4, 2026

Summary

Prepares the macOS app for Swift 6 strict concurrency mode (Xcode 26+). These changes are forward-compatible and don't affect behavior on current Swift versions.

Changes:

  1. GatewayModels.swift: Added Sendable conformance to WizardNextResult, WizardStartResult, and WizardStatusResult

  2. OnboardingWizard.swift: Added AnyCodable bridging helpers to handle type conflicts between ClawdisProtocol and local module under strict concurrency

  3. MacNodeLocationService.swift & PermissionManager.swift: Made CLLocationManagerDelegate methods nonisolated with Task { @MainActor in } pattern to safely access MainActor state from protocol requirements

Related Issue

Addresses #164 (Swift 6 / Xcode 26 compatibility) - forward-compatibility changes

Test Plan

  • Verified code compiles on Xcode 26 beta with Swift 6.2.3
  • Verified code still compiles on stable Xcode versions
  • Location permission flow works correctly
  • Onboarding wizard works correctly

🤖 Generated with Claude Code

Prepares the macOS app for Swift 6 strict concurrency mode by:

1. Adding Sendable conformance to WizardNextResult, WizardStartResult,
   and WizardStatusResult in GatewayModels.swift

2. Adding AnyCodable bridging helpers in OnboardingWizard.swift to
   handle type conflicts between ClawdisProtocol and local module

3. Making CLLocationManagerDelegate methods nonisolated in:
   - MacNodeLocationService.swift
   - PermissionManager.swift (LocationPermissionRequester)

   Using Task { @mainactor in } pattern to safely access MainActor
   state from nonisolated protocol requirements.

These changes are forward-compatible and don't affect behavior on
current Swift versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Nachx639 Nachx639 force-pushed the feat/swift6-compatibility branch from b6d2102 to d32b77b Compare January 4, 2026 02:57
@steipete
Copy link
Contributor

steipete commented Jan 4, 2026

Ohh that was not on! shame on me!

steipete added a commit that referenced this pull request Jan 4, 2026
@steipete steipete merged commit b978cc4 into openclaw:main Jan 4, 2026
9 of 14 checks passed
steipete added a commit that referenced this pull request Jan 4, 2026
KristijanJovanovski added a commit to KristijanJovanovski/clawdbot that referenced this pull request Jan 10, 2026
Applies the same Swift 6 compatibility patterns from PR openclaw#166 (macOS) to the iOS app.

Changes:
- LocationService.swift: Added Sendable constraint to withTimeout<T> generic,
  made CLLocationManagerDelegate methods nonisolated with Task { @mainactor in }
  pattern to safely access MainActor state
- TalkModeManager.swift: Fixed OSLog string interpolation to avoid operator
  overload issues with OSLogMessage in Swift 6

Addresses openclaw#164

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
steipete pushed a commit that referenced this pull request Jan 10, 2026
Applies the same Swift 6 compatibility patterns from PR #166 (macOS) to the iOS app.

Changes:
- LocationService.swift: Added Sendable constraint to withTimeout<T> generic,
  made CLLocationManagerDelegate methods nonisolated with Task { @mainactor in }
  pattern to safely access MainActor state
- TalkModeManager.swift: Fixed OSLog string interpolation to avoid operator
  overload issues with OSLogMessage in Swift 6

Addresses #164

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
dgarson referenced this pull request in dgarson/clawdbot Feb 7, 2026
joshp123 pushed a commit to joshp123/clawdis that referenced this pull request Feb 11, 2026
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
Tasks completed: 2/2
- Port quote context + QUOTE_TEXT_INVALID fix (commit #163)
- Port CI-safe types + cleanup + nested fix (commits #164, #165, #166)

SUMMARY: .planning/phases/14-telegram-channels/14-06-SUMMARY.md
dgarson referenced this pull request in dgarson/clawdbot Feb 22, 2026
…portingDashboard, OpenAPIExplorer, DataLineageViewer, DatabaseSchemaViewer (+ message-queues)
dominicnunez pushed a commit to dominicnunez/openclaw that referenced this pull request Feb 26, 2026
cael-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Mar 4, 2026
ronan-dandelion-cult pushed a commit to karmaterminal/openclaw that referenced this pull request Mar 4, 2026
…penclaw#166)

- Replace truthy guard (!totalTokens) with explicit <= 0 check
  Catches negative, zero, and NaN (NaN fails all comparisons)
  'Correct by accident' is not good enough for upstream review
- Add NaN totalTokens test case
- Add JSDoc on test helper explaining partial mock pattern

27/27 tests pass.
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Applies the same Swift 6 compatibility patterns from PR openclaw#166 (macOS) to the iOS app.

Changes:
- LocationService.swift: Added Sendable constraint to withTimeout<T> generic,
  made CLLocationManagerDelegate methods nonisolated with Task { @mainactor in }
  pattern to safely access MainActor state
- TalkModeManager.swift: Fixed OSLog string interpolation to avoid operator
  overload issues with OSLogMessage in Swift 6

Addresses openclaw#164
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.

2 participants