Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR forces Writing Tools UI back on macOS 27 (“Golden Gate”) by injecting/bridging Writing Tools menu items (context menu, Edit menu, toolbar) even when WebKit/system behavior hides them when “Siri AI” is enabled.
Changes:
- Add a macOS 27-only helper to inject a “Show Writing Tools” item into WKWebView context menus.
- Add an Edit-menu placeholder item wired via storyboard/outlet and dynamically synchronized with the system Writing Tools menu item/submenu.
- Add localized strings and runtime tests for selector/menu item presence.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| MarkEditMac/Sources/Main/AppWritingTools.swift | Adds macOS 27 helper to ensure a Writing Tools menu item exists in a given menu. |
| MarkEditMac/Sources/Main/AppResources.swift | Introduces localized title for “Show Writing Tools”. |
| MarkEditMac/Sources/Main/Application/AppDelegate+Menu.swift | Manages hiding/showing the placeholder Writing Tools menu item and syncing submenu/title/icon. |
| MarkEditMac/Sources/Main/Application/AppDelegate.swift | Adds IBOutlet for the new Edit-menu Writing Tools placeholder item. |
| MarkEditMac/Sources/Main/AppDesign.swift | Adds forceWritingTools feature flag logic for macOS 27 based on FoundationModels availability. |
| MarkEditMac/Sources/Editor/Views/EditorWebView.swift | Injects “Show Writing Tools” into the WKWebView context menu when forced on macOS 27. |
| MarkEditMac/Sources/Editor/Controllers/EditorViewController+Toolbar.swift | Updates toolbar Writing Tools item sourcing with macOS 27 fallback. |
| MarkEditMac/Sources/Editor/Controllers/EditorViewController+Menu.swift | Removes now-redundant system Writing Tools menu lookup property. |
| MarkEditMac/Resources/Localizable.xcstrings | Adds translations for “Show Writing Tools”. |
| MarkEditMac/mul.lproj/Main.xcstrings | Adds non-translatable placeholder storyboard strings for the Writing Tools placeholder menu items. |
| MarkEditMac/Modules/Tests/RuntimeTests.swift | Adds runtime presence tests for _showWritingTools and standardWritingToolsMenuItem. |
| MarkEditMac/Modules/Sources/AppKitExtensions/UI/NSMenuItem+Extension.swift | Adds systemWritingToolsItem accessor via standardWritingToolsMenuItem. |
| MarkEditMac/Base.lproj/Main.storyboard | Adds hidden placeholder Writing Tools menu item and connects it to the AppDelegate outlet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WKWebView in macOS Golden Gate when
Siri AIis enabled, currently shows neitherWriting ToolsnorAsk Siri, this should be a bug.However in iOS 27 with
Siri AIenabled,Writing Toolsis intentionally hidden, this might be a design change.This changes forces showing Writing Tools, no matter with bugs or design changes.