Add Spotlight keywords for improved discoverability#3255
Open
Add Spotlight keywords for improved discoverability#3255
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves macOS Spotlight discoverability for the Studio app without renaming the app bundle, by adding keyword metadata to the app’s packaged Info.plist via Electron Forge’s packaging configuration.
Changes:
- Add
packagerConfig.extendInfo.MDItemKeywordsto the macOS app bundle metadata. - Include WordPress-related terms (
WordPress,WordPress Studio,WP,local WordPress development) as Spotlight keywords.
💡 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.
Related issues
How AI was used in this PR
Codex was used to inspect the Electron Forge packaging configuration, test how macOS Spotlight reads app bundle metadata, and apply the focused metadata change. The resulting diff was reviewed and validated locally.
Proposed Changes
MDItemKeywordsmetadata to the packaged app via Electron ForgepackagerConfig.extendInfo. This is scoped to macOS app-bundle metadata and does not change Windows or Linux package metadata.WordPress,WordPress Studio,WP, andlocal WordPress developmentas Spotlight keywords so the app can be discovered by WordPress-related searches without renaming the app bundle.Testing Instructions
Replace the installed app with the packaged app, or copy it to
/Applications/Studio.app.Confirm the packaged plist contains the metadata as a comma-separated string:
/usr/libexec/PlistBuddy -c 'Print :MDItemKeywords' /Applications/Studio.app/Contents/Info.plistExpected output:
Expected output should include
WordPressinkMDItemKeywords.mdfind "kMDItemKeywords == '*WordPress*' && kMDItemContentType == 'com.apple.application-bundle'"Expected output should include:
WordPress; Studio should be discoverable.Local validation run on this branch:
npm run typecheck npx prettier --check apps/studio/forge.config.ts npx ts-node -e "import config from './apps/studio/forge.config'; const keywords = (config.packagerConfig as any).extendInfo?.MDItemKeywords; if (typeof keywords !== 'string' || !keywords.includes('WordPress')) process.exit(1); console.log(keywords);"Note:
npx eslint --fix apps/studio/forge.config.tscurrently fails becauseapps/studio/forge.config.tsis outside the repo's ESLint TypeScript project service configuration.Pre-merge Checklist