Skip to content

feat(desktop): add Sublime Text to open in editor dropdown#249

Merged
AviPeltz merged 1 commit into
mainfrom
feat/add-sublime-text-editor
Dec 4, 2025
Merged

feat(desktop): add Sublime Text to open in editor dropdown#249
AviPeltz merged 1 commit into
mainfrom
feat/add-sublime-text-editor

Conversation

@AviPeltz
Copy link
Copy Markdown
Collaborator

@AviPeltz AviPeltz commented Dec 4, 2025

Add Sublime Text as an option in the "Open" dropdown menu in the top bar, allowing users to quickly open workspaces in Sublime Text.

🤖 Generated with Claude Code

Description

Related Issues

Type of Change

  • Bug fix
  • [ x] New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • New Features
    • Added Sublime Text support to the "Open In" functionality, allowing users to open projects and files directly in Sublime Text on macOS.

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

Add Sublime Text as an option in the "Open" dropdown menu in the top bar,
allowing users to quickly open workspaces in Sublime Text.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Dec 4, 2025 4:44am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 4, 2025

Walkthrough

Sublime Text editor support is added to the desktop application across three layers: backend routing logic handles opening Sublime, the schema declares it as a recognized external app, and the UI component presents it as an available option.

Changes

Cohort / File(s) Summary
Backend & Schema
apps/desktop/src/lib/trpc/routers/external/index.ts, apps/desktop/src/main/lib/db/schemas.ts
Adds "sublime" case to getAppCommand router using macOS open -a invocation; adds "sublime" to EXTERNAL_APPS array constant
UI Component
apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx
Introduces sublimeIcon import and new APP_OPTIONS entry for Sublime Text with id, label, and icon

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Homogeneous, repetitive additions across three files following an established pattern
  • No complex logic or control-flow changes; straightforward constant/option additions
  • Minimal risk for inconsistencies given the uniform nature of changes

Possibly related PRs

Poem

🐰 A rabbit hops into Sublime dreams,
Where code flows smoothly in text streams,
From backend whispers to UI's light,
Sublime Text beckons—what a sight!
Our editor menu now complete,
Makes the developer's joy so sweet.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers the main functionality change and includes the required type of change selection (New feature). However, critical sections like Related Issues, Testing, and Additional Notes are unfilled. Fill in the Testing section with verification steps and consider documenting related issues or dependencies if any exist.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding Sublime Text to the editor dropdown, which is the primary focus of all three modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-sublime-text-editor

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa1c06b and 397c01b.

⛔ Files ignored due to path filters (1)
  • apps/desktop/src/renderer/assets/app-icons/sublime.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • apps/desktop/src/lib/trpc/routers/external/index.ts (1 hunks)
  • apps/desktop/src/main/lib/db/schemas.ts (1 hunks)
  • apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
apps/desktop/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc

Files:

  • apps/desktop/src/main/lib/db/schemas.ts
  • apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx
  • apps/desktop/src/lib/trpc/routers/external/index.ts
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: Please use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary

Files:

  • apps/desktop/src/main/lib/db/schemas.ts
  • apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx
  • apps/desktop/src/lib/trpc/routers/external/index.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid using any type - use explicit types instead for type safety
Use camelCase for variable and function names following existing codebase patterns
Keep diffs minimal with targeted edits only - avoid unnecessary changes when making modifications
Follow existing patterns and match the codebase style when writing new code

Files:

  • apps/desktop/src/main/lib/db/schemas.ts
  • apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx
  • apps/desktop/src/lib/trpc/routers/external/index.ts
apps/desktop/src/main/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Node.js modules (fs, path, os, net, etc.) can be used in main process code only

Files:

  • apps/desktop/src/main/lib/db/schemas.ts
**/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/components/**/*.tsx: Create one folder per component with structure: ComponentName/ComponentName.tsx + index.ts for barrel export
Co-locate tests next to the component file they test (e.g., ComponentName.test.tsx)
Co-locate dependencies (utils, hooks, constants, config, stories) next to the file using them
Use nested components/ subdirectory within a parent component only if a sub-component is used 2+ times within that parent; otherwise keep it in the parent's components/ folder
One component per file - avoid multi-component files

Files:

  • apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules (fs, path, os, net, etc.) in renderer process code - browser environment only

Files:

  • apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx
apps/desktop/src/renderer/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Call IPC methods using window.ipcRenderer.invoke() with object parameters - TypeScript will infer the exact response type automatically

Files:

  • apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx
apps/desktop/src/lib/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules in shared code like src/lib/electron-router-dom.ts - this code runs in both main and renderer processes

Files:

  • apps/desktop/src/lib/trpc/routers/external/index.ts
🧠 Learnings (3)
📚 Learning: 2025-11-24T21:33:13.267Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-11-24T21:33:13.267Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : Please use alias as defined in `tsconfig.json` when possible

Applied to files:

  • apps/desktop/src/main/lib/db/schemas.ts
📚 Learning: 2025-11-28T01:03:47.963Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-28T01:03:47.963Z
Learning: Applies to apps/desktop/src/renderer/**/*.{ts,tsx} : Never import Node.js modules (fs, path, os, net, etc.) in renderer process code - browser environment only

Applied to files:

  • apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx
📚 Learning: 2025-11-28T01:03:47.963Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-28T01:03:47.963Z
Learning: Applies to **/*.{ts,tsx} : Keep diffs minimal with targeted edits only - avoid unnecessary changes when making modifications

Applied to files:

  • apps/desktop/src/lib/trpc/routers/external/index.ts
⏰ 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)
  • GitHub Check: Build
🔇 Additional comments (3)
apps/desktop/src/main/lib/db/schemas.ts (1)

65-65: LGTM! Schema correctly expanded.

Adding "sublime" to EXTERNAL_APPS properly extends the ExternalApp type used across the UI and routing layers.

apps/desktop/src/renderer/components/OpenInButton/OpenInButton.tsx (1)

17-17: LGTM! Sublime Text integration follows existing patterns.

The icon import and APP_OPTIONS entry are consistent with other editor integrations. The id "sublime" correctly references the ExternalApp type defined in schemas.ts line 61-72.

apps/desktop/src/lib/trpc/routers/external/index.ts (1)

37-38: Implementation matches existing editor patterns and uses correct macOS application name.

The command structure for opening Sublime Text using open -a "Sublime Text" follows the same convention as other editors (Cursor, Xcode, iTerm, Warp, Terminal) in this file. The application name is correct for macOS.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AviPeltz AviPeltz merged commit d335772 into main Dec 4, 2025
7 checks passed
@Kitenite Kitenite deleted the feat/add-sublime-text-editor branch December 7, 2025 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant