test: reproduce #1732 — browser pane always opens in new tab instead of existing multi-pane window#1733
Open
github-actions[bot] wants to merge 1 commit intomainfrom
Open
test: reproduce #1732 — browser pane always opens in new tab instead of existing multi-pane window#1733github-actions[bot] wants to merge 1 commit intomainfrom
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
…of existing multi-pane window The NEW_BROWSER hotkey (CMD+SHIFT+B) calls addBrowserTab → createBrowserTabWithPane, which always creates a brand-new tab. Users with an existing multi-pane window expect the browser to be added as a pane within the current tab layout, not opened as a separate new window/tab.
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 the bug is
When a user has a window with multiple panes (e.g. 6 terminal panes) and presses CMD+SHIFT+B to open a browser, the browser opens in a brand-new tab (appearing as a separate window), instead of being added as a pane within the current tab's mosaic layout. Terminal panes can be added to the existing layout via splits, so this is a missing capability for browser panes specifically.
What code is affected and why
The
NEW_BROWSERhotkey inapps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsxcallsaddBrowserTab(workspaceId). That store action delegates tocreateBrowserTabWithPaneinapps/desktop/src/renderer/stores/tabs/utils.ts, which always generates a freshTabobject with a new ID and a single-pane layout — it has no concept of adding to an existing tab.By contrast, terminal panes are added to existing tab layouts via
addPane(tabId)(store) /addPaneToLayout(util), which modify the mosaic layout tree in place. No equivalentaddBrowserPane(tabId)store action exists for browser panes.What the test does and how it proves the bug
The new test in
apps/desktop/src/renderer/stores/tabs/utils.test.ts(describe blockissue #1732) sets up an existing tab with 6 terminal panes and callscreateBrowserTabWithPane— the function the hotkey ultimately invokes. It then asserts:Both assertions fail, confirming the bug:
Closes #1732