Skip to content

Comments

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
triage/issue-1732-22330551196
Open

test: reproduce #1732 — browser pane always opens in new tab instead of existing multi-pane window#1733
github-actions[bot] wants to merge 1 commit intomainfrom
triage/issue-1732-22330551196

Conversation

@github-actions
Copy link
Contributor

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_BROWSER hotkey in apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx calls addBrowserTab(workspaceId). That store action delegates to createBrowserTabWithPane in apps/desktop/src/renderer/stores/tabs/utils.ts, which always generates a fresh Tab object 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 equivalent addBrowserPane(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 block issue #1732) sets up an existing tab with 6 terminal panes and calls createBrowserTabWithPane — the function the hotkey ultimately invokes. It then asserts:

  1. The returned tab ID equals the existing tab ID (i.e. no new tab was created).
  2. The returned tab's layout contains the browser pane alongside all 6 original panes (7 panes total).

Both assertions fail, confirming the bug:

Expected: "tab-existing"
Received: "tab-1771892237979-orq6ea5bn"

Closes #1732

…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.
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.

No way to open browser in existing multi-pane window

0 participants