fix editor launch fallback when saved editor is unavailable - #681
Closed
baggiiiie wants to merge 1 commit into
Closed
fix editor launch fallback when saved editor is unavailable#681baggiiiie wants to merge 1 commit into
baggiiiie wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Issue: Opening a file could fail when the requested editor command was no longer installed, even if another supported launcher was available in the current environment. Cause: The server launch path resolved the requested editor id directly and only discovered command availability later, so it never reconciled the request against the editors actually available on PATH. Fix: Resolve the requested editor against the current environment before building the launch command. Keep the requested editor when it is available, otherwise fall back to another supported command editor, then to the file manager. When the file manager is the only option for a line-targeted path, strip the line and column suffix and open the base file instead. Add focused server tests for the fallback behavior.
baggiiiie
force-pushed
the
yc/fix/keybinding
branch
from
March 12, 2026 11:01
03e5044 to
46dad54
Compare
This was referenced Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
apps/server/src/open.ts:line[:column], so it opens the base file path instead of failing.apps/server/src/open.test.tsWhy
Issue #209:
Cause:
Fix:
before
before.mp4
after
after.mp4
UI Changes
No UI changes
Checklist
Note
Fix editor launch fallback when saved editor is unavailable on PATH
resolveEditorLaunchin open.ts now checks PATH at runtime to determine which editors are available, falling back to another command-based editor or the file manager when the requested editor is not found.resolveLaunchEditorto encapsulate editor selection logic, andstripLineColumnSuffixto strip:line:columnfrom paths passed to the file manager on fallback.OpenErrorwith a clear message when no supported editor command is available at all.withTempDirEnvhelper to simulate editor binaries on PATH and cover the fallback and suffix-stripping behavior.Macroscope summarized 46dad54.