feat: add JetBrains IDE suite to Open In Apps presets#7938
Conversation
Adds IntelliJ IDEA, WebStorm, PyCharm, PhpStorm, GoLand, Rider, CLion, RubyMine, DataGrip, and RustRover as presets in the Add app dropdown, grouped under a JetBrains IDEs submenu. Commands match the launcher scripts generated by JetBrains Toolbox. Each preset uses the bundled official product icon SVG instead of the domain favicon, since all JetBrains products share one favicon domain. Also adds jetbrains/intellij/webstorm settings-search keywords. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis change adds JetBrains IDE support to the Open In application menu. The preset catalog now includes JetBrains entries with bundled icons and new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Satisfies the PR docstring-coverage check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/lib/open-in-app-catalog.tsx (1)
7-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider a data-driven approach to reduce repetition across the 10 JetBrains presets.
Each JetBrains preset (Lines 55-134) repeats the same shape (
id,label,command,faviconDomain: 'jetbrains.com',iconSrc,group: 'jetbrains'), differing only in the id/label/command/icon. This works correctly today, but adding/removing a JetBrains IDE means touching multiple parallel lists (imports, preset objects) that must stay in sync by hand.♻️ Suggested refactor sketch
+const jetbrainsProducts = [ + { id: 'intellij-idea', command: 'idea', icon: intellijIdeaIcon, key: '00451c5ef5', fallback: 'IntelliJ IDEA' }, + { id: 'webstorm', command: 'webstorm', icon: webstormIcon, key: '20e6751d0c', fallback: 'WebStorm' }, + // ...remaining products +] as const + +// inside getOpenInAppPresets(): +...jetbrainsProducts.map((product) => ({ + id: product.id, + label: translate(`auto.lib.open.in.app.catalog.${product.key}`, product.fallback), + command: product.command, + faviconDomain: 'jetbrains.com', + iconSrc: product.icon, + group: 'jetbrains' as const +}))Also applies to: 33-135
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ecdfb753-984d-44a8-a7a8-a3dc5d175c69
⛔ Files ignored due to path filters (10)
resources/jetbrains-clion.svgis excluded by!**/*.svgresources/jetbrains-datagrip.svgis excluded by!**/*.svgresources/jetbrains-goland.svgis excluded by!**/*.svgresources/jetbrains-intellijidea.svgis excluded by!**/*.svgresources/jetbrains-phpstorm.svgis excluded by!**/*.svgresources/jetbrains-pycharm.svgis excluded by!**/*.svgresources/jetbrains-rider.svgis excluded by!**/*.svgresources/jetbrains-rubymine.svgis excluded by!**/*.svgresources/jetbrains-rustrover.svgis excluded by!**/*.svgresources/jetbrains-webstorm.svgis excluded by!**/*.svg
📒 Files selected for processing (9)
src/renderer/src/components/settings/OpenInMenuSetting.test.tssrc/renderer/src/components/settings/OpenInMenuSetting.tsxsrc/renderer/src/components/settings/general-search.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/open-in-app-catalog.tsx
Addresses CodeRabbit nitpick: per-product fields live in one list and the shared faviconDomain/group are applied in a single map. Labels keep literal translate() keys because the localization catalog scanner only verifies string-literal keys. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai Regarding the nitpick on The sketch derives the i18n key with a template literal ( So the refactor keeps each label as a literal |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
git log --oneline -5
git show e7825eee0 --stat 2>/dev/null || echo "commit not found, trying full sha search"
git log --all --grep="jetbrains" -i --oneline | head -20Length of output: 1369 🏁 Script executed: #!/bin/bash
sed -n '1,220p' src/renderer/src/lib/open-in-app-catalog.tsxLength of output: 5956 This confirms the refactor as described. That's a solid tradeoff — fully data-driving the translate key would have silently broken catalog verification without a lint failure to catch it, which is a worse outcome than a few extra lines of per-product literals. Adding/removing an IDE is now a one-entry change plus its icon import, exactly as intended. Thanks for the detailed explanation and for applying the dedup in e7825ee. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/settings/OpenInMenuSetting.tsx (1)
298-323: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePartition logic is type-safe today, but silently drops presets with any future third
groupvalue.
standalonePresets/jetbrainsPresetsare computed by checking exact values (undefined/'jetbrains'). IfOpenInAppPreset.groupis ever extended with another literal, unmatched presets simply vanish from the "Add app" menu instead of erroring. Not an issue today since the type only allows these two states, but worth a defensive comment or an exhaustive partition (e.g., default all non-undefinedgroups into their own submenus) if more groups are added later.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 460ff5a3-bf82-4376-9f5e-ddaccc408430
⛔ Files ignored due to path filters (10)
resources/jetbrains-clion.svgis excluded by!**/*.svgresources/jetbrains-datagrip.svgis excluded by!**/*.svgresources/jetbrains-goland.svgis excluded by!**/*.svgresources/jetbrains-intellijidea.svgis excluded by!**/*.svgresources/jetbrains-phpstorm.svgis excluded by!**/*.svgresources/jetbrains-pycharm.svgis excluded by!**/*.svgresources/jetbrains-rider.svgis excluded by!**/*.svgresources/jetbrains-rubymine.svgis excluded by!**/*.svgresources/jetbrains-rustrover.svgis excluded by!**/*.svgresources/jetbrains-webstorm.svgis excluded by!**/*.svg
📒 Files selected for processing (9)
src/renderer/src/components/settings/OpenInMenuSetting.test.tssrc/renderer/src/components/settings/OpenInMenuSetting.tsxsrc/renderer/src/components/settings/general-search.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/open-in-app-catalog.tsx
A future third group literal on OpenInAppPreset would silently drop its presets from the dropdown; this fails CI instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai Regarding the nitpick on Instead of building submenu-per-group machinery now (nothing needs it yet), |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
git show 731bfb0b0 --stat 2>/dev/null || echo "commit not found"
git show 731bfb0b0 -- src/renderer/src/components/settings/OpenInMenuSetting.test.ts 2>/dev/null | head -100Length of output: 2303
That's a good exhaustiveness check for the cost — no premature submenu-per-group abstraction, but if someone adds a third |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@coderabbitai Which functions in this PR's diff are missing docstrings for the Docstring Coverage check? Please list them by file and line. |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
cd /tmp && rm -rf orca_repo
git clone --depth 50 https://github.com/stablyai/orca.git orca_repo 2>&1 | tail -5
cd orca_repo
git fetch origin pull/7938/head:pr7938 2>&1 | tail -5
git checkout pr7938 2>&1 | tail -5
git diff origin/main...pr7938 -- src/renderer/src/lib/open-in-app-catalog.tsx src/renderer/src/components/settings/OpenInMenuSetting.tsx src/renderer/src/components/settings/OpenInMenuSetting.test.ts src/renderer/src/components/settings/general-search.tsLength of output: 15916
So there's nothing to flag here for this metric — the diff is fully covered. ✅ Action performedReview finished.
|
Summary
Adds the JetBrains IDE suite as built-in presets in Settings → General → Open In Apps → Add app: IntelliJ IDEA, WebStorm, PyCharm, PhpStorm, GoLand, Rider, CLion, RubyMine, DataGrip, and RustRover.
idea,webstorm,pycharm, …), which is the same cross-platform launcher name on macOS, Linux, and Windows.resources/via a new optionaliconSrcfield onOpenInAppPreset. The existing Google favicon lookup can't distinguish JetBrains products (they all sharejetbrains.com), so bundled icons take precedence and the favicon path remains the fallback for the existing presets.jetbrains/intellij/webstormsettings-search keywords so the section is discoverable, plus the corresponding i18n catalog entries for all five locales (brand names, identical across locales).webstorm) automatically get the preset icon/label treatment, since presets are matched by command.Screenshots
Testing
pnpm lint— passes except one pre-existingswitch-exhaustiveness-checkerror insrc/main/ipc/notification-authorization-status.ts:76, reproduced identically on a cleanmaincheckout; this branch does not touch that file.pnpm typecheckpnpm test— all tests in the changed areas pass. The full suite shows ~39–49 environment-sensitive failures (git/relay/ssh/daemon/release-script integration tests) on this machine; the same files fail identically on a cleanmaincheckout, and the count varies between runs, so they are unrelated to this change.pnpm buildcreatePresetOpenInApplication), and that JetBrains presets render their bundled icon rather than the shared favicon fallback (OpenInMenuSetting.test.ts).Also verified end-to-end in the running dev app: opened Settings → General → Open In Apps → Add app, confirmed the JetBrains IDEs submenu renders all ten presets with distinct product icons, and that adding a preset creates the expected row.
AI Review Report
Reviewed with Claude Code. Main risks checked and outcomes:
.cmdshims on Windows); launching goes through the existing Open In command path, unchanged by this PR. No keyboard shortcuts, shortcut labels, file paths, or Electron platform APIs are touched. Icons are bundled static assets, so no platform-dependent network or filesystem behavior.group: 'jetbrains'tostring; fixed by annotating the catalog factory as(): OpenInAppPreset[].iconSrcis optional and the favicon fallback is preserved. Preset matching by command is unchanged.DropdownMenuSubprimitives already present incomponents/ui/dropdown-menu.tsx; item rendering is shared between top-level and submenu entries (extractedrenderPresetItem), including the disabled/"Added" states and the 8-app limit.verify:localization-catalog,verify:localization-coverage, and locale-parity checks pass for all five locales.Security Audit
resources.jetbrains.com) imported at build time; they reduce runtime reliance on the external favicon service for these entries.Notes
OPEN_IN_APPLICATIONS_MAX = 8cap still limits how many apps a user can add in total; the preset list itself is not capped.🤖 Generated with Claude Code