Skip to content

fix(macos): suppress Swift compiler warnings - #128

Merged
qeude merged 1 commit into
mainfrom
t3/check-build-warnings
Oct 11, 2026
Merged

qeude merged 1 commit into
mainfrom
t3/check-build-warnings

Conversation

@qeude

@qeude qeude commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Replace unsafe force cast with unsafeDowncast in AXFocusOperations for proper type-safe handling of CFBoolean
  • Fix sendability warning in AXFrameCoordinator by reconstructing the application element locally instead of capturing it across async boundaries
  • Update closure syntax in MacOSPlatform+WindowSnapshotDiscovery to clarify closure scope
  • Replace unsafe String(cString:) with explicit null-terminator handling in WindowSnapshotRefreshPolicy to handle C strings safely

Testing

  • Swift build completes without warnings: python3 script/verify.py local
  • No functional behavior changes; warnings only

View guided diff Turn on auto-fix

Note

Fix Swift compiler warnings in DefiMacOS accessibility code

  • Removes a forced cast in AXFocusOperations.readFocused by using an unchecked downcast after the existing CF type-identifier check (AXFocusOperations.swift)
  • Fixes appBundleIdentifier(processID:) to decode the non-null portion of the proc_pidpath buffer as UTF-8, so bundle lookup gets a clean executable path (WindowSnapshotRefreshPolicy.swift)
  • Reworks the queued restoration closure in AXFrameCoordinator to capture the restoration token, recreate the application accessibility element from the process ID at execution time, and record failed restorations against that element (AXFrameCoordinator.swift)
  • Adds parentheses around a closure in the window-retry deadline check (MacOSPlatform+WindowSnapshotDiscovery.swift)

Macroscope summarized 50dce2d.

- Replace force casts with unsafeDowncast for type safety
- Fix AXUIElement sendability violations in async restoration
- Improve C string conversion safety with explicit bounds check
@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issue was found.

Summary

This PR removes Swift warnings in four macOS files.

  • macOS helpers keep their behavior while spelling out warning-prone code.

No actionable issues were found. Build and desktop checks were not run in this Linux review environment.

Reviews (1) · Last reviewed commit: "fix(macos): suppress Swift compiler warn..." · Reviewed by Greptile

@macroscopeapp

macroscopeapp Bot commented Oct 11, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved at 50dce2d

Macroscope's review found this PR approvable — This is a narrowly scoped macOS maintenance patch that removes compiler warnings while preserving existing focus, restoration, retry, and bundle-discovery flows. The only runtime-touching edits are localized substitutions whose effects are directly visible in the diff, with no new capability or broad integration introduced.

You can add or adjust custom eligibility rules. Learn more.

@qeude
qeude merged commit f360d78 into main Oct 11, 2026
5 checks passed
@qeude
qeude deleted the t3/check-build-warnings branch October 11, 2026 21:19
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