Skip to content

Add Spotlight keywords for improved discoverability - #3255

Open
richtabor wants to merge 2 commits into
trunkfrom
codex/add-spotlight-keywords
Open

Add Spotlight keywords for improved discoverability#3255
richtabor wants to merge 2 commits into
trunkfrom
codex/add-spotlight-keywords

Conversation

@richtabor

@richtabor richtabor commented Apr 27, 2026

Copy link
Copy Markdown

Related issues

  • Related to user feedback on X that the installed app is hard to find when searching for "WordPress" because the app name is just "Studio".

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

  • Add macOS MDItemKeywords metadata to the packaged app via Electron Forge packagerConfig.extendInfo. This is scoped to macOS app-bundle metadata and does not change Windows or Linux package metadata.
  • Include WordPress, WordPress Studio, WP, and local WordPress development as Spotlight keywords so the app can be discovered by WordPress-related searches without renaming the app bundle.

Testing Instructions

  1. Build a packaged macOS app:
npm run make:macos-arm64
  1. Replace the installed app with the packaged app, or copy it to /Applications/Studio.app.

  2. Confirm the packaged plist contains the metadata as a comma-separated string:

/usr/libexec/PlistBuddy -c 'Print :MDItemKeywords' /Applications/Studio.app/Contents/Info.plist

Expected output:

WordPress, WordPress Studio, WP, local WordPress development
  1. Force Spotlight to re-import the app bundle and inspect the indexed metadata:
mdimport -i /Applications/Studio.app
mdls -name kMDItemKeywords /Applications/Studio.app

Expected output should include WordPress in kMDItemKeywords.

  1. Verify the app can be found through a WordPress keyword query:
mdfind "kMDItemKeywords == '*WordPress*' && kMDItemContentType == 'com.apple.application-bundle'"

Expected output should include:

/Applications/Studio.app
  1. Optional manual check: open Spotlight and search for 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.ts currently fails because apps/studio/forge.config.ts is outside the repo's ESLint TypeScript project service configuration.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@richtabor richtabor changed the title Add Spotlight keywords for WordPress search Apr 27, 2026
@richtabor
richtabor marked this pull request as ready for review April 27, 2026 12:23
Copilot AI review requested due to automatic review settings April 27, 2026 12:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.MDItemKeywords to 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.

@richtabor
richtabor requested a review from ivan-ottinger May 24, 2026 14:36

@ivan-ottinger ivan-ottinger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement! The change looks good and works as expected:

➜  studio git:(codex/add-spotlight-keywords) /usr/libexec/PlistBuddy -c 'Print :MDItemKeywords' /Applications/Studio.app/Contents/Info.plist
WordPress, WordPress Studio, WP, local WordPress development
➜  studio git:(codex/add-spotlight-keywords) mdimport -i /Applications/Studio.app
➜  studio git:(codex/add-spotlight-keywords) mdls -name kMDItemKeywords /Applications/Studio.app
kMDItemKeywords = " WordPress Studio,WordPress, local WordPress development, WP"
➜  studio git:(codex/add-spotlight-keywords) mdfind "kMDItemKeywords == '*WordPress*' && kMDItemContentType == 'com.apple.application-bundle'"
/Applications/Studio.app
Image

The only thing I noticed is that kMDItemKeywords is not formatted nicely:

kMDItemKeywords = " WordPress Studio,WordPress, local WordPress development, WP"

but when researching it further it looks like to fix that we would need to introduce keywords per each locale.

Considering the feature is working as expected and the issue is cosmetic, I don't think it is worth engineering extra code just for that. Approving. ✅ 🙂

@sejas
sejas enabled auto-merge (squash) July 30, 2026 12:48

@sejas sejas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving the spotlight keywords. LGTM!

@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 1a44a9d vs trunk

app-size

Metric trunk 1a44a9d Diff Change
App Size (Mac) 1378.88 MB 1378.88 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 1a44a9d Diff Change
load 755 ms 1073 ms +318 ms 🔴 42.1%

site-startup

Metric trunk 1a44a9d Diff Change
siteCreation 6534 ms 6495 ms 39 ms ⚪ 0.0%
siteStartup 2386 ms 2388 ms +2 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants