Repository navigation
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📥 CommitsReviewing files that changed from the base of the PR and between 42ea8d160bdd86aeb6a0255991d750bd41fc1acc and 160f81a. 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughCLI flag help now includes shared descriptions for Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The help updates are mergeable after normal checks; no actionable behavior regression is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Flag descriptions —
FLAG_HELP_TEXTgains one-line entries for--environment,--pairing-code(global, matching the rootorca --helpwording),--wait-submit, and--retry-request, fixing the bare-name rendering reported in #19016. - Scoped overrides —
command-scoped-flag-help.tsnow gives the 15 commands whose handlers callrejectRemoteSelectionFlagsa "Rejected; this command only runs on this machine" pair, and givesenvironment add/show/rma local meaning for the flag each reads plus "Not used" for the flag it ignores. - Tests — new
flag-help-text.test.ts(8 tests) pins every global flag's description, the four new rows verbatim, their value placeholders, and the scoped meanings; it would fail onmain, where those rows render bare.
The mechanism is right: formatCommandHelp resolves scoped → inline → FLAG_HELP_TEXT → bare, and the four flags had no map entry. I verified every command in the rejecting list actually throws via rejectRemoteSelectionFlags (artifacts.ts:165/178/187/196/207, account.ts:319/326, profile-state.ts:97/102, agent-hooks.ts:200/225/237/242, environment.ts:68/106), that the global wording matches the root help (root-help-text-secondary.ts:107-108, :95-96), and that the new plus related spec/flag tests pass locally.
The two boundaries the PR calls out — the SSH shim's static linear help copy and the three silently-pinned commands (serve, vm recipe doctor, agent-context) that still show the general "Connect…" row — are accurately described as follow-ups and out of scope here.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
fdb9940 to
42ea8d1
Compare
|
Re: greptile summary Thanks. Both findings are fixed in 42ea8d1; the details are in the two inline threads. |
|
Re: coderabbit summary, pre-merge check "Docstring Coverage" Thanks. Orca doesn't set a docstring threshold: AGENTS.md asks for short comments only where the code isn't obvious, and the three functions here are small test helpers, so we're leaving them as they are. |
|
Re: pullfrog review, "No new issues" Thanks for checking the handler list. One update since this review: the three commands you noted as a follow-up ( |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Scoped selection-flag help for the pinned commands —
command-scoped-flag-help.tsnow derives one shared "Rejected; this command only runs on this machine" pair for all 15 handlers that callrejectRemoteSelectionFlags, and a "Not used; …" pair for the three commands (serve,vm recipe doctor,agent-context) thatshouldIgnoreRemoteSelectiondrops the flags for without an error. The lists match the pinned families exactly, and no other pinned command is left on the global "Connect …" wording. - Verbatim row pinning — the test now asserts the four new descriptions with
toBeinstead of substring matches, so a row that keeps a keyword but states the opposite fails. - Placeholder-only rows read as undescribed —
optionDescriptionno longer lets--environment <selector>capture<selector>as a description, with a self-test covering the bare, trailing-space, and described cases.
This addresses both greptile-apps threads from the prior round (misleading global rows on the silently-pinned commands; the placeholder passing the description check), and the new test passes at head 42ea8d16.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…mit and --retry-request These four flags rendered as bare names in per-command --help. Add descriptions to the shared flag help map, and give environment add, show and rm their own wording for the selection flags, which those commands read from or ignore rather than route with. Part of stablyai#19016 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- environment list and host list reject --environment and --pairing-code;
say so in their Options rows instead of the global "Connect ..." text.
- Reword --wait-submit after the root help ("without resending it") and
name its cap and conditions; reword --retry-request so it is true for
every command that accepts it, not only transport failures.
- Pin the facts each description rests on (3600 cap, no resend,
idempotent retry, selector kind), so a row stating the opposite fails.
Part of stablyai#19016
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xactly - account, artifacts, profile state and agent hooks commands throw on --environment and --pairing-code, like environment list and host list; give all fifteen one shared "Rejected" row instead of the global "Connect ..." text. - serve, vm recipe doctor and agent-context drop both flags without an error and run on this machine; give them a "Not used" row. - Assert the four new descriptions verbatim, so a row that keeps a keyword but states the opposite fails, and stop the test helper from reading a value placeholder as a description. Part of stablyai#19016 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed-server commands Upstream added account select and account rm, which throw on --environment and --pairing-code, and the environment status/update/rollback/recover/stop/cancel-stop commands, where --environment names the managed server to act on and --pairing-code is dropped. Their --help still showed the global "Connect ..." rows; give them the same rejected row as the other account commands, and a managed-server row for the six environment commands. Part of stablyai#19016 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42ea8d1 to
160f81a
Compare

ELI5
When you asked the Orca CLI for help on a command like
orca terminal send --help, four of the options were listed as bare names, with nothing after them saying what they do or what value they take. This change gives each of them a one-line description, so--helpalone tells you what to pass.What Changed
Before,
orca terminal send --help:After:
--pairing-codeand--environmentare global flags, so every command's--helplisted them bare. They now carry a description in every command's local--help.--retry-requestgains one onterminal sendand on everyorchestrationcommand that accepts it.The SSH remote CLI shim keeps its own static copy of the help for
linear issueandlinear search(src/main/ssh/ssh-remote-linear-read-help.ts). That copy still prints the two selection flags bare. It is generated separately and is left for a follow-up.Mechanism. Per-command help is rendered by
formatCommandHelpinsrc/cli/help.ts. For each allowed flag it first checks per-command overrides (src/cli/command-scoped-flag-help.tsand the inline chain inhelp.ts), then falls back to the shared mapFLAG_HELP_TEXTinsrc/cli/flag-help-text.ts, and prints just--<flag>when the flag is in neither. None of these four flags had an entry, so they hit that bare fallback.src/cli/flag-help-text.ts: four new entries, each checked against the code.--pairing-codeand--environmentuse the same wording as the rootorca --help, so the two help screens agree.--wait-submitstarts from the root help's phrase ("Observe this accepted prompt without resending it"). It adds whatsrc/cli/handlers/terminal-send.tsenforces: at most 3600 seconds, and only with--textand--enter, without--interrupt.--retry-requestdoes not reuse the root help's wording ("Resume the same durable prompt request after an ambiguous transport failure"). That wording names only one of the cases where Orca asks for the flag. The CLI also asks for it when a submitted prompt was not observed (src/cli/terminal-format.ts), and the orchestration commands share the flag. The new row says what holds in every case: it resumes the request Orca issued the ID for, idempotently (src/cli/retry-request-flag.ts,src/shared/orchestration-retry-request-id.ts).src/cli/command-scoped-flag-help.ts: some commands only ever run on this machine and never route to a remote runtime, so the global "Connect ..." wording would be wrong there.environment add,showandrm: the flag the command reads gets its own meaning.--pairing-codeonaddis the code to save;--environmentonshow/rmis the saved environment to show or remove. The flag the command ignores says "Not used".rejectRemoteSelectionFlags, so they share one pair of rows that says "Rejected; this command only runs on this machine":environment list,host list,account add/list,artifacts list/share/update/unshare/delete,profile state exports/rollbackandagent hooks prepare-codex/status/off/on. For example,orca account list --helpused to print the global "Connect using a saved environment id or name" row next to Notes saying the flag is rejected.serve,vm recipe doctorandagent-context, drop both flags without an error (src/cli/index.tsturns them tonullfor these commands) and run on this machine. They share one pair of rows that says "Not used; this command only runs on this machine".No parsing, validation, routing or RPC behaviour changes; this is help text only.
Why
The linked issue reports that a user whose
terminal sendto another server failed could not learn from--helpthat--environmentwas the missing piece, because the flag was printed with no description. The same bare rendering applied to--pairing-code,--wait-submitand--retry-request.Adding entries to the existing
FLAG_HELP_TEXTmap is the smallest change that follows how every other flag is described today. A larger alternative, moving per-flag descriptions into each command spec, is a design change of its own and is not needed to fix these four rows. Scoped overrides are used only where a global description would be untrue.Linked Issue
Part of #19016 (part 1: the missing
--helpdescriptions). The issue also suggests showing--environmentin the usage line. That half is left out on purpose: usage lines across the CLI list[--json]but none of the global selection flags, so adding them is a separate, CLI-wide change. The other parts of the issue are not addressed here: theterminal_handle_staleerror wording, andterminal createreturning before the shell accepts input.Related open PR: #17403 moves per-flag help into the command specs and backfills the
orchestrationcommands. The two PRs change different files: this one touches neitherhelp.tsnor any spec file, and #17403 touches neither file changed here. Whichever lands second only needs to check that each flag keeps one description.Visual Proof
N/A: CLI help text only, no UI. The before/after
--helpoutput is shown above.Testing
New
src/cli/flag-help-text.test.ts(10 tests). 9 of them fail onmain(every row above rendered bare); the tenth checks the test's own row reader. All 10 pass with this change:--help,--json,--pairing-code,--environment) has a description;terminal send --helpdescribes all four flags, with the value placeholders its usage line uses;--text/--enter/--interruptconditions for--wait-submit; idempotent resume for--retry-request; the selector kind for--environment; and the code format for--pairing-code. Any change to what a row states fails the test and has to be made on purpose;environment add,showandrmshow their own meaning for the flag they read, and "Not used" for the one they ignore;serve,vm recipe doctorandagent-contextsay "Not used" in both rows;--environment <selector>), so a row like that cannot pass as described.For the latest revision (the "Not used" rows and the row-reader fix), on the same machine and limits as below: the test file passes (10 of 10); the "Not used" test fails on the previous revision, and the row-reader test fails with the previous reader. The type check of the three changed files passes, as does
pnpm run typecheck:cli. oxlint with each of the repo's lint configs (default, react-doctor, code-quality native, anti-slop, type-aware code-quality),oxfmt --checkon the changed files, andcheck:max-lines-ratchetall pass. That revision only touchessrc/cli/command-scoped-flag-help.tsand the test file. The wider runs below were made on the revision before it.Verified on Linux with Node 24 and pnpm 12, on a shared machine where every command ran under a 4 GB memory and 580 s time limit. Two pieces did not fit, and both need more than 4 GB: the full node/web typecheck (the repo's own runner budgets 7 GiB for the node project) and the whole-repo type-aware lint. The narrowed runs below cover everything this change touches.
pnpm lint: all 16 sub-steps pass. The type-aware oxlint step was run on all ofsrc/cliwith the repo's config, because the whole-repo run needs more than 4 GB.pnpm typecheck:pnpm run typecheck:clipasses. That is the only TypeScript project that includessrc/cli, and nothing outsidesrc/cliimports the changed modules.pnpm test: all ofsrc/clipasses (134 files, 1423 passed, 4 skipped), as dosrc/main/sshandsrc/main/cli, which cover the SSH remote CLI shim (212 files, 2982 passed, 37 skipped). The full suite does not finish within the 4 GB / 580 s limits here. The only failures it reported were in unrelated test files. Account-auth, skills and relay tests fail identically onmainon this machine because of local host configuration. A few load-sensitive timing tests (which ones varies by run) timed out under load and pass when run alone.pnpm build: every step except its opening full typecheck passes:build:relay,build:cli,build:electron-vite,verify:built-skills-cli,build:web-from-renderer,build:mobile-web(after installingmobile/) andbuild:native.build:electron-vitesits at the 4 GB edge on this machine: one run was stopped by the memory limit while other work was running, and the retries passed. The built CLI prints the help shown above.CI runs the full commands.
AI Disclosure
Claude Opus 5.5 (claude-opus-5-5), Anthropic. The change, the tests and this description were written by the model in an automation session.
Review
AI coding-agent review summary:
--environmentand--pairing-codepick the runtime that answers). Commands pinned to the local runtime keep their current behaviour. Where such a command throws on either flag, drops both without an error (serve,vm recipe doctor,agent-context), or on theenvironmentcommands ignores one, the help now says so.--wait-submitand--retry-requestapply to any agent prompt sent throughterminal send, and--retry-requestto the orchestration mutations that already accept it.--helpis rendered.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No impact on security, cross-platform support, remote SSH, mobile, backwards compatibility or performance: the change is limited to help text and a unit test.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) (locally: the parts that fit this machine, listed under Testing; CI covers the rest)🤖 Generated with Claude Code