Repository navigation
Conversation
There was a problem hiding this comment.
🔇 Additional comments (15)
src/shared/browser-tab-split-direction.ts (1)
1-6: LGTM!src/shared/rpc-contract/browser-tab-create-params.ts (1)
5-5: LGTM!Also applies to: 18-22
src/cli/specs/browser-basic.ts (1)
200-202: LGTM!src/cli/handlers/browser-tab.ts (1)
15-15: LGTM!Also applies to: 73-76, 78-88
src/cli/browser.test.ts (1)
186-229: LGTM!skill-guides/orca-cli/references/browser.md (1)
39-39: LGTM!Also applies to: 54-54
src/main/runtime/runtime-browser-commands-browser-tab-create.ts (1)
5-5: LGTM!Also applies to: 34-35, 57-66, 156-157
src/main/runtime/runtime-browser-commands-list-logical-browser-tabs.ts (1)
5-5: LGTM!Also applies to: 108-109, 144-145
src/preload/api/ui-command-event-api.ts (1)
100-101: LGTM!src/main/runtime/rpc/methods/browser-tab-create-schema.test.ts (1)
4-4: LGTM!Also applies to: 40-53
src/renderer/src/hooks/ipc-events/browser-tab-split-placement.ts (1)
14-33: LGTM!src/renderer/src/hooks/ipc-events/browser-tab-split-placement.test.ts (1)
4-50: LGTM!src/renderer/src/hooks/ipc-events/browser-request-ipc-bridge.ts (1)
10-10: LGTM!Also applies to: 58-78
src/renderer/src/hooks/ipc-events/browser-request-ipc-bridge.split.test.ts (1)
1-124: LGTM!src/preload/api/ui-bridge-state-and-menu-commands.ts (1)
157-158: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.The listener's
datatype omits the new split fields.The
callbacktype now hassplitandsplitFromTabId. The innerlistenerdata type (Lines 163-171) does not. The callcallback(data)still compiles because the fields are optional. The runtime values pass through. But the two types now disagree. This is the duplicated-IPC-type problem from the retrieved learning. Extract one shared payload type and use it in both places, and inui-command-event-api.ts.Source: Learnings
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
43f4c268-fee4-41f0-b44f-c627b2a27677
📥 Commits
Reviewing files that changed from the base of the PR and between 666d990 and 6408afd963b359f636495c1c036e399455002a2e.
📒 Files selected for processing (15)
skill-guides/orca-cli/references/browser.mdsrc/cli/browser.test.tssrc/cli/handlers/browser-tab.tssrc/cli/specs/browser-basic.tssrc/main/runtime/rpc/methods/browser-tab-create-schema.test.tssrc/main/runtime/runtime-browser-commands-browser-tab-create.tssrc/main/runtime/runtime-browser-commands-list-logical-browser-tabs.tssrc/preload/api/ui-bridge-state-and-menu-commands.tssrc/preload/api/ui-command-event-api.tssrc/renderer/src/hooks/ipc-events/browser-request-ipc-bridge.split.test.tssrc/renderer/src/hooks/ipc-events/browser-request-ipc-bridge.tssrc/renderer/src/hooks/ipc-events/browser-tab-split-placement.test.tssrc/renderer/src/hooks/ipc-events/browser-tab-split-placement.tssrc/shared/browser-tab-split-direction.tssrc/shared/rpc-contract/browser-tab-create-params.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
Addressed the CodeRabbit note on the duplicated IPC payload type in 328cd2c: I left the docstring-coverage warning alone on purpose. The repo's AGENTS.md asks for short comments only where something is not obvious, and the touched functions follow the surrounding code. |
|
Could a maintainer approve the CI workflows for this PR when you have a moment? They're waiting for approval because it comes from a fork. The branch merges cleanly with |
328cd2c to
8db17cd
Compare
`orca tab create` could only add a tab to an existing pane, so an agent had no way to put a page beside its terminal. `--split <right|left|down|up>` creates a new pane next to the calling terminal (ORCA_TAB_ID), falling back to the active pane, and opens the page there without taking focus. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01UNtbMA9iVj9T4rBUjn5u6W
The preload listener, its callback, the preload API contract and main's sender each declared the payload separately, and the listener copy had already drifted from the new split fields. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
8db17cd to
d913472
Compare
|
Thanks @kmizzi, this is a great addition. Your branch was ~2,900 commits behind main and conflicted, so I carried it over in #35665 with your two commits rebased as-is. On top: the renderer now uses |
ELI5
An agent in an Orca terminal can now open a web page in a new pane beside itself, instead of as a hidden tab behind the terminal.
What Changed
Before:
orca tab create --url <url>always added the page as another tab in an existing pane. If you wanted the page beside your terminal, you had to drag the tab into a split yourself. The CLI had no way to do it.After:
orca tab create --url <url> --split <right|left|down|up>opens a new pane next to the terminal that ran the command and loads the page there. Keyboard focus stays in the terminal. Without--split, nothing changes, and the request payload is the same shape as before.How it works:
src/cli/handlers/browser-tab.ts): validates--splitand sendssplitplus the caller'sORCA_TAB_IDassplitFromTabIdonbrowser.tabCreate.browser-tab-create-params.ts): two new optional fields.runtime-browser-commands-browser-tab-create.ts): forwards them on the existingbrowser:requestTabCreateIPC. Hosts with no desktop window (headless serve, client-hosted pages) reject--splitwith a clear error instead of silently making a plain tab.browser-tab-split-placement.ts,browser-request-ipc-bridge.ts): resolves the source pane, either the group holding the caller's terminal tab or the active group if that tab is unknown. It calls the existingcreateEmptySplitGroup(..., { activate: false })and creates the browser tab withtargetGroupIdset to the new group. If creating the tab throws, the empty pane is closed again.Why
The building blocks already existed:
createEmptySplitGroupandcreateBrowserTab({ targetGroupId })are what "open preview to the side" uses infile-preview.ts. The CLI just could not reach them. This reuses that path instead of adding a new layout mechanism.Alternatives considered:
tab splitcommand that moves an existing tab. That takes two calls and needs a page id round-trip. Creating the tab in the split covers the common case in one step.ORCA_TAB_IDanchors it to the caller, with the active pane as the fallback.--splitcreates a new pane every time, which matchesterminal split. Callers that want to reuse a pane can keep using a plaintab create.Linked Issue
Fixes #27369
Visual Proof
The screenshots come from one isolated macOS dev session (
ORCA_BACKGROUND_LAUNCH=1, separate user-data directory, driven over CDP). Each command was run from inside an Orca terminal. The page body is blank because the background window does not paint guest contents; the tab title "Example Domain" shows the page loaded.orca tab create --url https://example.comorca tab create --url https://example.com --split rightStore state after the
--split rightrun: the layout issplit / horizontalwith the terminal group first and the new browser group second, andactiveGroupIdByWorktreestill points at the terminal's group.Testing
New tests:
src/cli/browser.test.ts:--splitsendssplitandsplitFromTabId; a plain create leaves both out; an unknown direction is rejected before any RPC.browser-tab-create-schema.test.ts: the new fields are optional, all four directions parse, and a bad direction is rejected.browser-tab-split-placement.test.ts: the split goes beside the caller's terminal, falls back to the active pane, then the root group, and never takes focus.browser-request-ipc-bridge.split.test.ts: the end-to-end renderer handler places the tab in the new group, leaves the layout untouched withoutsplit, and removes the empty pane when creation fails.Ran:
pnpm tc(pass),oxlintandoxfmton changed files (clean),verify:rpc-params-catalog,verify:bundled-skill-guides, and 42 related test files / 322 tests (pass), including the existing browser tab-create runtime, publication, client-hosted and folder-workspace suites.Not tested on Linux, Windows or SSH-backed workspaces. The change is platform-neutral (no paths, shortcuts or processes) and runs only in the renderer that owns the window.
AI Disclosure
Written with Claude Code (Claude Opus 5.5). I reviewed the change and the manual test above.
Review
Agent skill upstream boundary
Notes
--splitexplicitly.splitis only set by the CLI flag.main,pnpm devcrashes the workbench in the renderer withgrowing-byte-buffer.js does not provide an export named 'GrowingByteBuffer'.src/shared/quick-open-listing-limits.ts(viaquick-open-file-list.ts) imports@orca/process-host/growing-byte-buffer, and the renderer resolves it to the CommonJSdistbuild. This looks like a regression from Extract subprocess handling into @orca/process-host #26963. For the screenshots I worked around it locally by adding theorca-sourceresolve condition to the renderer config. That change is not part of this PR.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred). Typecheck and related tests pass locally; the full lint/test/build is left to CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01UNtbMA9iVj9T4rBUjn5u6W