Repository navigation
Show the Source Control AI CLI arguments box only where it actually works - #21149
Conversation
|
Warning Review limit reachedNext included review available in 38 seconds. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (16)
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.
Important
The new applicability predicate resolves a repo-only launch as local, so on a remote (SSH) repo it hides the CLI arguments field and replaces saved per-action arguments with the global default on a launch that would have applied them. The fix is small and anchored below.
Reviewed changes
- Per-launch CLI-argument applicability — new
sourceControlLaunchAppliesAgentArgsdecides whether arguments reach the agent this launch would start;agentArgsApplyflows into the start hook, the start runner, and the delivery preview. - Field extraction and hiding — the CLI arguments input moved into
SourceControlAgentCliArgsField, which renders nothing whenappliesis false (absent, not disabled). - Global-arguments fallback — when the field is hidden,
runSourceControlAgentActionStartsendsagentArgs: undefinedrather than'', so the launch falls back to Settings → Agents → Arguments; the saved recipe still stores the raw value. - Capability settling on open — dialog open now awaits
ensureLocalRuntimeCapabilities()alongside agent detection;buildSourceControlAgentScopeNotewas extracted to the dialog support module. - Coverage — new tests for the predicate, field presence/absence, argument omission and recipe retention, and the global-arguments fallback in
buildDirectWorkItemAgentStartupPlan.
ℹ️ Nitpicks
useSourceControlAgentActionDialog.ts:116-118claims settling capabilities alongside detection "keeps the field from appearing for a frame on a launch that turns out to be structured". An effect cannot affect the first paint: with a cold capability cache the first render still readshostCapabilities === null, soappliesistrueand the field paints for a frame before the next render corrects it. Usually moot because the boot probe has already populated the cache — this is a comment-accuracy nit, not a defect worth restructuring.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — incremental review of 589e184 against the prior Pullfrog review at 8ef6d0c.
- Resolved the launch route with
planAgentSessionLaunchinstead of the feasibility query, so applicability now matches the route this launch will really take. - Threaded the repo's execution host into the predicate, so a repo-only remote launch (e.g. Fix Broken Checks, which passes
repoId+connectionIdand noworktreeId) keeps the CLI arguments field and passes savedagentArgsthrough. - Aligned the delivery preview to omit per-action arguments when they do not apply.
- Added a behavioral SSH-versus-structured launch regression test and a repo-host forwarding test.
The prior [!IMPORTANT] remote-host finding is resolved and its thread was retired this run. All 47 tests across the five affected test files pass and typecheck:web is clean.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Rendered QA evidence (PR 21149 @ 589e184)App identity matched this worktree and branch ( Local structured Claude — CLI arguments hiddenOpened Resolve Conflicts With AI with native chat + structured chat + open-in-chat defaults, agent Claude. The dialog showed Agent and Prompt template only. Local terminal — field present, saved value reappearsSaved per-action arguments SSH terminal — field visible; saved args reached remote startupThrowaway Linux Docker SSH host with a real Remaining gapThe GitHub Checks composer for a repo with no attached workspace could not be opened through GitHub details (synthetic PR details did not load over SSH). SSH field proof used the same Source Control AI dialog on the SSH host; the no-attached-workspace create+start path was still exercised by the direct launch above. Relay deployed ( |
Additional rendered QA — prospective SSH (demo-project PR #22)Used the real open PR with a failed check ( Fix Broken Checks With AI opened from the Checks tab. CLI arguments were visible with the saved per-action value Direct start after the orca.yaml trust prompt created
Earlier local structured-hidden and local terminal-reappear screenshots remain valid. MaxListenersExceededWarning on BrowserWindow during hidden Electron launch is unrelated to this change. |
Review status: cleanThe review found and repaired one meaningful issue in Two senior review loops and both the initial and final readiness audits found no remaining functional, architectural, compatibility, performance, security, or organizational blockers. The change adds no polling, listener, timer, or subprocess fanout. Validation: 47/47 directly changed tests independently rerun in the final audit; 82 focused tests recorded earlier in this review; Hidden Electron/CDP checks confirmed that local structured launches hide the field and local terminal launches restore the saved value. A real prospective SSH PR launch displayed the saved argument, created its remote worktree, and ran
A |
Additional Electron verification: structured native chat settingIn an isolated local Orca instance, I opened the real Resolve Conflicts With AI dialog for a merge-conflicted repository with Chat UI enabled and Default view: Chat UI. With Use updated structured native chat switched off, the CLI arguments field was visible: I then switched Use updated structured native chat on through Settings and reopened the same dialog with the same agent and repository. The CLI arguments field was absent: The renderer settings and dialog DOM agreed in both states ( |
… default applies stablyai#21149 established that `undefined` is what lets a launch fall back to the global Agents arguments, and that an empty string beats that fallback. The dialog seeds its arguments field from the saved recipe, and an untouched field is stored as '' -- so every launch action still strips the agent's configured arguments: Gemini launches without --yolo, Codex without its bypass flag. Report a blank field as absent at the three places a launch action starts an agent: the dialog path, the one-click commit/push failure notice, and both fix-checks call sites. Those two read the saved recipe directly, so a recipe saved once keeps stripping the default there even after the dialog is fixed. The saved recipe still stores the raw field, so an untouched one compares equal to a stored blank and the auto-start path does not rewrite settings. Fixes stablyai#19379 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01T6zUCU6cyicLSBNzHWQnh4
…orks (stablyai#21149) * Show the Source Control AI CLI arguments field only where it applies * Fix Source Control arguments on remote launches







ELI5
The Source Control AI dialogs (like "Fix Broken Checks") have a box where you can type command-line arguments for the agent. Depending on how you've set Orca up, those arguments sometimes reach the agent and sometimes vanish without a trace. This makes the box appear only when it will actually do something.
What Changed
Before: every Source Control AI launch dialog showed a "CLI arguments" box. If your agent tabs open as structured native chat, that launch talks to the agent over a protocol that reads no command-line arguments at all — so whatever you typed was silently discarded. Nothing told you.
After: the box appears only on launches that really pass arguments to the agent. If this particular launch would open as structured native chat, the box is gone — not greyed out, just absent. Structured chat uses its own settings instead. If you launch into a terminal, nothing changes: the box is there and behaves exactly as before, including any value saved in your Source Control AI recipe.
The mechanism: the dialog now resolves the route this specific launch would take, rather than reading your default view setting alone. That distinction matters, because a user whose default is chat still gets a real terminal when the agent has no structured session, when the workspace runs on a remote SSH host, or in a floating workspace. In each of those the arguments genuinely work, so the field stays.
When the field is hidden, the dialog sends no per-action arguments at all rather than an empty string. That is the load-bearing detail: the launch path falls back to your global Settings → Agents → Arguments only when the value is absent, and an empty string would have counted as an explicit "no arguments" and suppressed your global setting.
Two files were split to stay under the repo's max-lines limit: the arguments input moved into its own component, and a pure label-building helper moved into the existing dialog support module. No behavior change in either.
Why
Merged #20944 established deliberately that structured native chat reads no CLI arguments. That left the dialogs promising something one of their routes cannot deliver.
An earlier attempt (#21103) fixed this by routing such launches to a terminal so the field would keep working. That was closed: it preserved the input at the cost of pulling users off structured chat.
Deleting the field outright was the other option considered. It was rejected because the field is not useless — it is useless on one route. Terminal launches apply these arguments verbatim, and per-action overrides there are a real capability. Removing it would have taken that away from terminal users and made saved recipe values stop working, including where they work today. Showing the field exactly where it has an effect keeps the capability and removes the false promise.
Resolving the real route rather than just the default setting was chosen over the simpler predicate because the simpler one is wrong in the cases users actually hit — remote hosts and agents without a structured session are terminal launches where the arguments work.
No saved value is lost or rewritten. Launching with the field hidden still saves your recipe with the arguments you had stored, so switching back to a terminal launch brings them back. Nothing is migrated or deleted, and the global Settings → Agents → Arguments field is untouched.
The per-action arguments in the commit message / PR description / branch name dialogs are also untouched: that path always builds a command line and splices the arguments into it, so they always apply there.
Linked Issue
Fixes #
Visual Proof
Not attached. The change is the presence or absence of one input, and which state you see depends on your own agent/host/settings combination rather than on anything a screenshot of my machine would establish. The two states are pinned by tests instead: the field renders when arguments apply and is absent from the markup when they do not (
SourceControlAgentActionDialogForm.test.tsx).Testing
Reviewer steps:
--model sonnet).Automated (macOS):
origin/main: 3 fail identically there (a real-CLI handshake test, a cross-version release-checkout test whose harness runsgit rev-parse ~2, and a recipe-shell cleanup test), and the fourth passes in isolation on this branch — a timeout flake under full-suite load. None touch this code.origin/main: 1,399 files / 13,137 tests, all passing.pnpm tcandpnpm run check:code-quality:changedboth clean.New coverage: the applicability predicate (terminal default, structured launch, and the chat-default-but-terminal-launch case), the field's presence/absence in the rendered form, and — as requested — a pin that a launch naming no per-action arguments resolves the user's global Arguments setting, plus that an explicit per-action value still wins over it.
Manual testing was limited to the automated runs above; I did not exercise the dialog in a running app, and did not test on Linux, Windows, or against a live SSH host.
AI Disclosure
Claude Opus 5.
Review
Agent skill upstream boundary
Notes
agentArgs.Checklist
N/Awith reason given abovepnpm typecheck, changed-code quality gate, and the full test suite run locally