Repository navigation
Browser-only CLI commands move from orca tab to orca browser page/profile - #27619
brennanb2025 wants to merge 2 commits into
Conversation
orca tab create/current/show become orca browser page create/current/show, and orca tab profile * becomes orca browser profile * (delete -> rm). The old spellings stay as aliases, so nothing breaks. This frees orca tab to cover every Orca tab kind in follow-up PRs.
|
Review found and fixed a compatibility regression: Verified: 212 focused CLI tests, a failing-before/passing-after help regression control, ten old/new pairs across 120 syntax/flag cases and exact mocked host requests, focused CLI typecheck, generated guide consistency, and CI static/typecheck on Bun 1.4.3. Remote M4 source CLI verification passed all ten canonical commands and all ten retained spellings. Actual-main source commands passed on the same fresh rig, and the final screenshot shows a loaded local page and its tab strip. Initial black/refused-navigation captures were excluded. Screenshot and terminal comparison are in the PR body; the M4 rig, fixture, named sessions, and QA worktree were cleaned up after saving evidence. CI run 38190933814 passed at |
ELI5
The CLI cannot close a chat tab yet, and the natural
orca tabcommands currently describe browser pages only. This PR gives browser-only operations a browser name while keeping every old spelling working. It is the first step toward commands that can list, switch, and close every Orca tab, including chats; those broader operations remain in the follow-up PRs.What Changed
orca tab createorca browser page createorca tab currentorca browser page currentorca tab show --page <id>orca browser page show --page <id>orca tab profile list/create/set/show/use-default/cloneorca browser profile list/create/set/show/use-default/cloneorca tab profile deleteorca browser profile rmThe existing command alias mechanism resolves each old spelling to the same command, flags, and host request. Command registration, lazy loading, automatic
--pageeligibility, help examples, and the shipped browser guide follow the new names. No host method or network payload changes.tab list/switch/closeand flat browser automation commands stay as they are in this migration.Review found that moving the profile commands made
orca tab profile --helpsucceed with an empty command list. Group help now reads the same canonical and alias paths as command discovery, so both old and new groups list their accepted commands. Hidden commands stay hidden, and multiple matching paths produce one row per command.Why
pagematches the existing--pageselector and browser page ids, leavingtabavailable for Orca tab ids.rmfollows the CLI deletion vocabulary. Reusing aliases and handlers preserves scripts without creating a second implementation or requiring host updates. The rename and compatibility aliases can land safely before the separate generic-tab work.The approved follow-ups are #27639 for listing every tab kind and migration pointer errors, then generic close/switch commands building on #27583. This PR does not implement closing chats.
Linked Issue
None; this implements the first part of the approved CLI tab plan.
Visual Proof
Hidden-CDP proof from an isolated M4 rig at
5334c753dec. The tab created by the source CLI is rendered, and its deterministic local page loaded withloadError: null.Actual
origin/mainsource (65d662e32341) and this PR's source CLI queried the same browser page on the same fresh rig. The terminal excerpts below omit request metadata and unrelated tab fields, and shorten the QA workspace selector; browser page ids are unchanged. The comparison describes the command rename; main's queries were captured after creating the page with this PR's CLI.The canonical page create/current/show and all seven profile operations passed against the isolated host. Every old spelling also passed: tab create/current/show and tab profile list/create/delete/show/set/use-default/clone. Profile creation, assignment, inspection, cloning, restoration to default, and deletion produced the expected host effects; generated ids differ normally between independent creations.
Initial black-renderer and refused-navigation captures are excluded from passing proof. The final loaded-page capture replaces them. All app/fixture processes and named Playwright sessions owned by this QA attempt were stopped after saving evidence outside the worktree.
Testing
Fresh final review: 212 Node Vitest tests passed across ten explicit CLI test files; the generated skill-guide check passed.
Regression control: new group-help tests failed against the pre-fix formatter and passed after the fix.
All ten old/new command pairs passed 120 flag/syntax cases, destructive metadata and discovery checks, and exact host-request comparisons using recording clients.
pnpm tc:clipassed. Workflow static checks passed 24/25; local Bun 1.3 lacksbun check, the sole failure. Supported-runtime CI static analysis and typecheck passed on Bun 1.4.3. CI run 38190933814 passed at5334c753decon attempt 2 after one authorized retry of failed jobs. The first attempt faileddaemon-init-provider-installation.test.ts:65(expected one provider setter call, observed zero), with a consequential verification failure. Seven focused PR/main/branch-base controls passed 14/14, including Bun 1.4.3, and the failed shard plus final verification passed on retry. The first failure's cause remains unproven; no daemon code was changed.Remote M4 source CLI: all ten canonical commands and all ten legacy spellings passed; actual-main source control and loaded-page/tab-strip proof captured above.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Round 1 independently reviewed correctness, discovery, and architecture. The architecture verdict was to keep the existing alias mechanism and migration split. Round 2 confirmed the help fix. Final readiness and a dedicated performance pass found no new P0/P1/P2 issue; matching remains bounded by the shipped command registry and adds no long-lived resource.
Deferred: three existing website examples still teach working old spellings. They must be aligned before the follow-up removes these aliases. The shipped agent guide and generated bundle already teach the new names.
Agent skill upstream boundary
Notes
No persistence, mobile contract, Git-provider behavior, platform-specific operation, or host request changes. Existing selectors continue to handle folder workspaces and remote execution. Windows, WSL, Linux, real SSH failure/recovery, historical host versions, and packaging were reviewed in source but not exercised in this loop.
This PR remains a draft. No merge, ready transition, or main integration was performed.
Checklist