fix(desktop): add VS Code Insiders as an option in the external programs dropdown#537
Conversation
Added logic to try opening files in VS Code Insiders as a fallback when VS Code is not installed on the system.
📝 WalkthroughWalkthroughThis PR extends the external app integration to support VS Code Insiders. It adds a new app mapping, reorganizes VS Code options into a dedicated option group with display labels, updates UI tooltips and dropdowns to leverage display labels, and registers vscode-insiders in the external apps list. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (5)apps/desktop/**/*.{ts,tsx}📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/**/src/**/**/[A-Z]*.tsx📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/desktop/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/desktop/src/{shared/ipc-channels.ts,main/**/*ipcs.ts,renderer/**/*.tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-12-28T01:56:39.031ZApplied to files:
📚 Learning: 2025-12-21T04:39:28.543ZApplied to files:
🧬 Code graph analysis (1)apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (12)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/desktop/src/lib/trpc/routers/external/index.ts (1)
28-39: Consider adding logging when falling back to VS Code Insiders.For better observability and user awareness, consider logging when the fallback to VS Code Insiders occurs. This helps users understand why Insiders is being used instead of the standard VS Code, and aids in debugging.
🔎 Suggested logging addition
// For VS Code, try to fallback to VS Code Insiders if VS Code is not installed if (app === "vscode") { try { await spawnAsync(cmd.command, cmd.args); return; } catch { // VS Code not installed, try VS Code Insiders + console.log('VS Code not found, falling back to VS Code Insiders'); const insidersCmd = getVscodeInsidersCommand(filePath); await spawnAsync(insidersCmd.command, insidersCmd.args); return; } }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/desktop/src/lib/trpc/routers/external/helpers.tsapps/desktop/src/lib/trpc/routers/external/index.ts
🧰 Additional context used
📓 Path-based instructions (3)
apps/desktop/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)
apps/desktop/**/*.{ts,tsx}: For Electron interprocess communication, ALWAYS use tRPC as defined insrc/lib/trpc
Use alias as defined intsconfig.jsonwhen possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary.
For tRPC subscriptions with trpc-electron, ALWAYS use the observable pattern from@trpc/server/observableinstead of async generators, as the library explicitly checksisObservable(result)and throws an error otherwise
Files:
apps/desktop/src/lib/trpc/routers/external/helpers.tsapps/desktop/src/lib/trpc/routers/external/index.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use type safety and avoid
anytypes unless absolutely necessary in TypeScript files
Files:
apps/desktop/src/lib/trpc/routers/external/helpers.tsapps/desktop/src/lib/trpc/routers/external/index.ts
apps/desktop/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Move Node.js functionality needed in Electron renderer to
src/main/lib/and communicate via IPC
Files:
apps/desktop/src/lib/trpc/routers/external/helpers.tsapps/desktop/src/lib/trpc/routers/external/index.ts
🧠 Learnings (1)
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : For Electron interprocess communication, ALWAYS use tRPC as defined in `src/lib/trpc`
Applied to files:
apps/desktop/src/lib/trpc/routers/external/index.ts
🧬 Code graph analysis (1)
apps/desktop/src/lib/trpc/routers/external/index.ts (1)
apps/desktop/src/lib/trpc/routers/external/helpers.ts (2)
spawnAsync(81-108)getVscodeInsidersCommand(49-53)
🔇 Additional comments (2)
apps/desktop/src/lib/trpc/routers/external/helpers.ts (2)
5-6: LGTM! Well-documented constant.The constant is clearly documented and follows the existing naming conventions.
45-53: LGTM! Helper function follows existing patterns.The helper function is well-structured and consistent with the existing
getAppCommandpattern. The implementation correctly uses macOS'sopen -acommand.
|
@maddada would it make sense to add a new option for vscode insider instead? fallback with try catch might hide issues with vscode itself |
|
@Kitenite modified it to be like this: Shows as "Open in VS Code Insiders" in tooltips. |
|
This works, thanks for making the adjustments @maddada ! Will come out next release :) |

Description
I'm using VS Code Insiders because it's getting more features at as faster pace currently (don't have VS Code installed) superset only opens in normal VS Code.
So I added a fallback to open in insiders if the stable version isn't installed.Edit: Added a new option to the dropdown instead of using fallback.
Type of Change
Testing
Tested this manually and it worked for all the areas where the "open with vs code" option is shown.
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.