Skip to content

refactor: migrate app to Swift and SwiftPM#23

Merged
sozercan merged 4 commits into
masterfrom
swift
Jul 16, 2026
Merged

refactor: migrate app to Swift and SwiftPM#23
sozercan merged 4 commits into
masterfrom
swift

Conversation

@sozercan

@sozercan sozercan commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • migrate the application entry point and deterministic Finder-path core from Objective-C to Swift 6
  • replace the Xcode project with a SwiftPM executable target and XCTest target
  • replace the generated Finder ScriptingBridge header with Swift-based Finder automation while preserving selection and front-window fallback behavior
  • add a Kaset-style packaging script that builds per architecture, creates universal binaries with lipo, compiles the Icon Composer asset with actool, assembles the app bundle, and supports unsigned or ad-hoc signing
  • update the release workflow to build through SwiftPM before Developer ID signing and notarization
  • preserve VS Code channel priority and alias, package, file, and directory-symlink path handling

Validation

  • ./scripts/test.sh
  • OPEN_IN_CODE_SIGNING=unsigned ./scripts/build-app.sh release
  • ARCHES="arm64 x86_64" OPEN_IN_CODE_SIGNING=unsigned ./scripts/build-app.sh release
  • universal ad-hoc build verified with codesign; Finder automation entitlement confirmed
  • both universal slices report a macOS 12 deployment target
  • shellcheck, actionlint, bash -n, plutil -lint, and swift package dump-package
  • structured autoreview: no accepted/actionable findings

Port Finder automation, VS Code launching, and path handling to Swift 6.

Rewrite the focused tests and remove the generated Finder Objective-C bridge and legacy build settings.

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copilot AI review requested due to automatic review settings July 16, 2026 05:08

Copilot AI 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.

Pull request overview

Migrates the macOS Finder utility from Objective-C to Swift 6 while preserving existing path resolution and VS Code launch behavior.

Changes:

  • Reimplements Finder automation and application launch flow in Swift.
  • Ports core path logic and tests to Swift 6.
  • Updates build configuration, test tooling, and contributor guidance.
Show a summary per file
File Description
main.swift Adds the Swift application entry point and Finder automation.
main.m Removes the Objective-C entry point.
OpenInCodeCore.swift Ports shared path and editor-priority logic to Swift.
OpenInCodeCore.h Removes the obsolete Objective-C interface.
OpenInCodeCore.m Removes the Objective-C core implementation.
Tests/OpenInCodeCoreTests.swift Ports focused core tests to Swift.
Tests/OpenInCodeCoreTests.m Removes the Objective-C tests.
scripts/test.sh Compiles and runs the Swift 6 tests.
Open in Code.xcodeproj/project.pbxproj Configures Swift sources and removes ScriptingBridge generation.
Open in Code_Prefix.pch Removes the obsolete Objective-C prefix header.
AGENTS.md Updates repository guidance for Swift development.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 11/11 changed files
  • Comments generated: 0
  • Review effort level: Medium

@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: 733dfb3d33

ℹ️ 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 Sources/OpenInCode/OpenInCodeCore.swift
Replace the Xcode project with a SwiftPM executable and XCTest target.

Add a universal app packaging script for Icon Composer assets, bundle metadata, signing, and release workflow integration.

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copilot AI review requested due to automatic review settings July 16, 2026 05:34
@sozercan sozercan changed the title refactor: migrate app to Swift refactor: migrate app to Swift and SwiftPM Jul 16, 2026

Copilot AI 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.

Review details

Files not reviewed (1)
  • Open in Code.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Generated file
  • Files reviewed: 17/19 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread scripts/build-app.sh Outdated
Comment thread Sources/OpenInCode/main.swift Outdated
Resolve Finder file-reference URLs before path extraction, bridge NSWorkspace launching through async/await, and document every accepted packaging signing mode.

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copilot AI review requested due to automatic review settings July 16, 2026 05:52

Copy link
Copy Markdown
Owner Author

@codex review

Run focused tests and assemble a signed universal app for pull requests and master pushes.

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>

Copilot AI 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.

Review details

Files not reviewed (1)
  • Open in Code.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Generated file
  • Files reviewed: 18/20 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

Copilot AI review requested due to automatic review settings July 16, 2026 05:56

Copilot AI 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.

Review details

Files not reviewed (1)
  • Open in Code.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Generated file
  • Files reviewed: 18/20 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@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: 6e1a9311bd

ℹ️ 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 .github/workflows/ci.yml
@sozercan
sozercan merged commit eed514a into master Jul 16, 2026
2 checks passed
@sozercan
sozercan deleted the swift branch July 16, 2026 06:17
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