Conversation
There was a problem hiding this comment.
Pull request overview
This PR reorganizes several AppKit helper extensions by moving them out of the MarkEditMac app target and into the Modules SwiftPM package (primarily AppKitExtensions), and aligns some “Extension” naming to “Extras” in the app’s Sources grouping.
Changes:
- Move
NSMenu,NSSpellChecker,NSDocumentController, andBundlehelper extensions intoMarkEditMac/Modules/Sources/AppKitExtensions. - Remove/trim the corresponding helpers from
MarkEditMac/Sources/Extras/MarkEditMac/Sources/Extensions. - Update the Xcode project grouping/build references to reflect the new organization.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| MarkEditMac/Sources/Extras/NSSpellChecker+Extras.swift | Removes the local declineCorrectionIndicator helper from the app target after moving it into AppKitExtensions. |
| MarkEditMac/Sources/Extras/NSMenu+Extras.swift | Removes local menu-search helpers from the app target after moving them into AppKitExtensions. |
| MarkEditMac/Sources/Extras/NSDocumentController+Extras.swift | Removes the local setOpenPanelDirectory helper from the app target after moving it into AppKitExtensions. |
| MarkEditMac/Sources/Extras/NSApplication+Extras.swift | Header comment rename to match “Extras” naming. |
| MarkEditMac/Sources/Extensions/Bundle+Extension.swift | Deletes the app-target Bundle.isDefaultApp(toOpen:) helper after moving it into AppKitExtensions. |
| MarkEditMac/Modules/Sources/AppKitExtensions/UI/NSPopover+Extension.swift | Updates access/visibility and keeps sourceView helper in the shared extensions module. |
| MarkEditMac/Modules/Sources/AppKitExtensions/UI/NSMenu+Extension.swift | Adds menu-search helpers (firstActionNamed, firstMenuNamed, etc.) to the shared extensions module. |
| MarkEditMac/Modules/Sources/AppKitExtensions/Foundation/NSSpellChecker+Extension.swift | Adds declineCorrectionIndicator(for:) to the shared extensions module. |
| MarkEditMac/Modules/Sources/AppKitExtensions/Foundation/NSDocumentController+Extension.swift | Adds setOpenPanelDirectory(_:) to the shared extensions module. |
| MarkEditMac/Modules/Sources/AppKitExtensions/Foundation/Bundle+Extension.swift | Adds isDefaultApp(toOpen:) to the shared extensions module and adjusts imports accordingly. |
| MarkEditKit/Sources/Extensions/UserDefaults+Extension.swift | Removes the NSNavLastRootDirectory constant now that the key is inlined elsewhere. |
| MarkEdit.xcodeproj/project.pbxproj | Updates file references/groups (e.g., “Extensions” → “Extras”) to match the new layout. |
Comments suppressed due to low confidence (1)
MarkEditMac/Modules/Sources/AppKitExtensions/UI/NSPopover+Extension.swift:12
sourceViewis now provided by the AppKitExtensions module (and the extension is markedpublic), but current app call sites (e.g. MarkEditMac/Sources/Editor/Controllers/EditorViewController+UI.swift) don’t import AppKitExtensions. This will break compilation unless those files addimport AppKitExtensions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
MarkEditMac/Modules/Sources/AppKitExtensions/UI/NSPopover+Extension.swift:12
sourceViewis declared inside apublic extension NSPopover, but the property itself is not markedpublic, so it remainsinternaland won’t be accessible from other modules (e.g. MarkEditMac).
Only moving functions, no behavioral changes.