fix(desktop): use full PATH for open in app in production builds

Merged
SA
1y ago
+27-20

Summary

  • Fixed "open in VSCode/Cursor" not working in production builds
  • When Electron apps are launched from Finder/Dock, they don't inherit the user's shell PATH, causing CLI commands like code and cursor to not be found
  • Now uses getSupersetPath() which includes the user's full PATH (same approach as terminal-manager)
  • Improved error messages to be more actionable

Test plan

  • Build production app
  • Launch from Finder/Dock (not terminal)
  • Try "Open in Cursor" / "Open in VSCode" from workspace header
  • Verify it opens correctly

πŸ€– Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Clearer, more descriptive error messages when external processes fail to start or exit with errors.
    • Improved editor-opening behavior: tries app-specific URL schemes first, then falls back to the system default when needed.
  • Chores

    • More reliable execution of external utilities by sourcing and caching the user’s shell PATH, improving binary discovery in production builds.

✏️ Tip: You can customize this high-level summary in your review settings.