Skip to content

fix(browser): place CLI-created tabs in the active browser tab's group - #904

Merged
Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/new-browser-tab
Apr 21, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/new-browser-tab

Conversation

@Jinwoo-H

Copy link
Copy Markdown
Contributor

Summary

  • When an agent creates a browser tab via orca tab create, the tab now lands in the same tab group as the active browser tab instead of the terminal's group
  • Adds targetGroupId option to CreateBrowserTabOptions and threads it through to createUnifiedTab
  • Falls back to the active group (current behavior) when no browser tab exists yet

Context

Feedback from Slack: when the AI opens a new browser tab via the CLI, it ends up in the terminal's tab group instead of alongside existing browser tabs.

Root cause: createUnifiedTab defaults to activeGroupIdByWorktree (the UI-focused group), which is the terminal's group when an agent is running.

Fix: In the CLI IPC handler (onRequestTabCreate), look up the active browser tab via activeBrowserTabIdByWorktree and pass its groupId as targetGroupId. Only the CLI path is affected — Cmd+T, right-click open, terminal links, and session restore are unchanged.

Closes #116

Test plan

  • Added 2 unit tests: targetGroupId routes to correct group, omitting it falls back to active group
  • Existing tests pass (12/12)
  • Typecheck clean
  • Manual: run orca tab create --url <url> while terminal group is active → new tab should appear in the browser group

When an agent creates a browser tab via `orca tab create`, it lands in
the terminal's tab group (the UI-active group) instead of alongside
existing browser tabs. Use `activeBrowserTabIdByWorktree` to resolve the
correct group, falling back to the active group when no browser tab exists.

Closes #116
@Jinwoo-H
Jinwoo-H merged commit 2b226ce into main Apr 21, 2026
2 checks passed
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