Repository navigation
fix(editor): open files in the focused pane when it is a browser (#6891) - #8014
Merged
nwparker merged 1 commit intoJul 24, 2026
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughUpdated 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
Contributor
|
Taking a look! |
resolveEditorOpenTargetGroupId only kept a file in the focused group when its active tab was an editor/diff; terminal, browser, and simulator panes all fell through to the "reuse an existing editor pane" path. That path is only meant for a focused agent terminal, so focusing a browser split and opening a file stole it into a stale editor pane instead of the focused group (stablyai#6891). Constraint: focused agent terminals still defer to an existing editor pane. Rejected: match every non-terminal to the editor case implicitly | explicit contentType check keeps the intent Confidence: high Scope-risk: narrow Tested: vitest editor.test.ts (166 passed, incl. new stablyai#6891 regression); typecheck:web; oxlint Not-tested: packaged desktop e2e / live build
nwparker
force-pushed
the
fix/file-open-focused-browser-pane-6891
branch
from
July 23, 2026 11:48
6f74ea9 to
6cc453c
Compare
Contributor
|
Thanks so much for this, @westkite1201 — open files in the focused pane when it is a browser (#6891). Reviewed, rebased on latest |
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 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.
Summary
Opening a file while a browser (or simulator) split pane is focused now routes the file into that focused pane instead of stealing an unrelated, stale editor pane.
ELI5
If you were looking at a browser panel and opened a file, the file used to pop up in some other editor panel off to the side. Now it opens right where you're looking.
Root cause & fix
resolveEditorOpenTargetGroupIddeferred to an existing editor pane whenever the focused group's active tab was any editor-family tab or when there was no active tab (if (!activeTab || isEditorTabContentType(activeTab.contentType))). That "reuse an existing editor pane" path is only meant for a focused agent terminal, so a focused non-terminal, non-editor pane (browser/simulator) fell through and the file was routed to a stale editor pane. The fix narrows the condition to defer only when the focused pane is a terminal (if (!activeTab || activeTab.contentType !== 'terminal')), so browser and simulator panes now open the file in the focused group.Evidence
Validated & rebased onto latest main during a bug-bash triage on 2026-07-23. Clean rebase onto
origin/main(base7ab601487c, head6f74ea9ef6).src/renderer/src/store/slices/editor.test.ts(npx vitest run --config config/vitest.config.ts).origin/main, test kept: 1 failed | 182 passed — the regression testopens implicit files in a focused browser split group instead of stealing an editor pane (#6891)fails.npx oxlint src/renderer/src/store/slices/editor.tsreports no warnings/errors.Trade-offs
None — pure fix.
Regression risk
Zero-regression by construction: the terminal-focused case is byte-identical (still defers to an existing editor pane). The only changed path is focused non-terminal, non-editor panes (browser/simulator), which now route to the focused group — the intended behavior, proven by the passing regression test.
Credit to original author @westkite1201 (SeoYeonKim). Validated, rebased, and (where applicable) hardened via automated bug-bash review; original fix design preserved.