Skip to content

Browser-only CLI commands move from orca tab to orca browser page/profile - #27619

Draft
brennanb2025 wants to merge 2 commits into
mainfrom
brennanb2025/cli-browser-page-commands
Draft

brennanb2025 wants to merge 2 commits into
mainfrom
brennanb2025/cli-browser-page-commands

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​145 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​127
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​102 $\color{#cf222e}{\Huge{\mathbf{−}}}$​85 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17

ELI5

The CLI cannot close a chat tab yet, and the natural orca tab commands 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

Existing spelling, still supported New spelling
orca tab create orca browser page create
orca tab current orca browser page current
orca tab show --page <id> orca browser page show --page <id>
orca tab profile list/create/set/show/use-default/clone orca browser profile list/create/set/show/use-default/clone
orca tab profile delete orca browser profile rm

The existing command alias mechanism resolves each old spelling to the same command, flags, and host request. Command registration, lazy loading, automatic --page eligibility, help examples, and the shipped browser guide follow the new names. No host method or network payload changes. tab list/switch/close and flat browser automation commands stay as they are in this migration.

Review found that moving the profile commands made orca tab profile --help succeed 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

page matches the existing --page selector and browser page ids, leaving tab available for Orca tab ids. rm follows 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 with loadError: null.

Browser tab created by the new CLI spelling

Actual origin/main source (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.

Before — actual origin/main source CLI:
$ node_modules/.bin/tsx --conditions=orca-source src/cli/index.ts tab current --json
{"ok":true,"result":{"tab":{"browserPageId":"b99625fe-969b-4154-a7de-c1f59f4f2f2b","url":"http://127.0.0.1:19500/","title":"PR27619 fixture","active":true,"loadError":null,"profileId":"default"}}}

After — PR 5334c753dec source CLI:
$ node_modules/.bin/tsx --conditions=orca-source src/cli/index.ts browser page create --url http://127.0.0.1:19500/ --worktree <QA-worktree> --json
{"ok":true,"result":{"browserPageId":"b99625fe-969b-4154-a7de-c1f59f4f2f2b"}}
$ node_modules/.bin/tsx --conditions=orca-source src/cli/index.ts browser page current --json
{"ok":true,"result":{"tab":{"browserPageId":"b99625fe-969b-4154-a7de-c1f59f4f2f2b","url":"http://127.0.0.1:19500/","title":"PR27619 fixture","active":true,"loadError":null,"profileId":"default"}}}

Actual origin/main source CLI also created another browser page on that rig:
$ node_modules/.bin/tsx --conditions=orca-source src/cli/index.ts tab create --url http://127.0.0.1:19500/ --worktree <QA-worktree> --json
{"ok":true,"result":{"browserPageId":"572bb410-a373-4513-96af-c18ad8d000fe"}}

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:cli passed. Workflow static checks passed 24/25; local Bun 1.3 lacks bun check, the sole failure. Supported-runtime CI static analysis and typecheck passed on Bun 1.4.3. CI run 38190933814 passed at 5334c753dec on attempt 2 after one authorized retry of failed jobs. The first attempt failed daemon-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

  • Not applicable; no upstream skill-installer source or registry material is copied.

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

  • This PR is small and focused
  • I explained what changed and why
  • Behavior proof attached
  • Correctness, security, compatibility, and performance reviewed
  • Final CI and remote QA evidence complete

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.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

orca tab currently describes browser pages, which leaves the natural names unavailable for the planned commands that will handle chats and other Orca tabs. This PR moves browser-only operations to browser page and browser profile while preserving all ten old spellings. It does not implement closing chats yet.

Review found and fixed a compatibility regression: orca tab profile --help succeeded with an empty command list. Commit 5334c753dec makes group help use the existing canonical/alias registry, so old and new groups list their accepted commands once and keep hidden commands hidden. Architecture, correctness, discovery, final readiness, and performance reviews found no further significant issue. Deferred: three website examples still teach valid old aliases; update them before the follow-up removes those names.

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 5334c753dec on attempt 2, after one authorized failed-job retry. The first attempt failed the daemon provider installation test (daemon-init-provider-installation.test.ts:65); seven focused PR/main/branch-base controls passed 14/14, and the failed shard and final verification passed on retry. The first failure's cause remains unproven; no daemon code was changed. Platform/SSH failure recovery, historical host versions, and packaging were considered in source but not exercised. The PR remains draft; no main integration, ready transition, or merge was performed.

This branch has not been deployed

No deployments
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