Skip to content

test(launch): pin what the "+" launchers produce on main today - #27691

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/conv-c0a2-plus
Oct 12, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/conv-c0a2-plus

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​78 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​73
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​78 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​75

ELI5

Orca is about to change how a new agent tab starts. Today the "+" button and its siblings (the new-agent shortcut, the dashboard's spawn button and the tab bar's Quick Launch items) build the agent's command line in the window and type it into a fresh terminal. The plan (step C2) moves them onto the same path the AI buttons use.

Before anyone moves them, we need a record of exactly what main does today, so the move can be checked byte for byte. This PR adds that record for the "+" family. It only adds tests. Nothing a user sees changes.

What Changed

User-facing change: none. Tests only; no production file is touched. The size table above counts the two *.test-fixture.ts files as production, but both are test-only modules that no production code imports.

Follows #27189, which has merged. #27189 pinned every other launcher with shared case tables and a test harness. This PR adds the "+" family to those tables and one small planner test.

What it pins, all expectations being what main does today, even where that looks wrong:

  1. The "+" table (row 1), both halves. A new case table, src/shared/launch-parity-plus-cases.test-fixture.ts, joins test(launch): pin what each agent launcher produces on main today #27189's window-tab table. Each row goes through the real store and the real terminal pane to the exact pty:spawn request (renderer half). That request is then fed to main's pty:spawn, and the test checks what reaches the fake terminal provider (main half). One row per entry point:

    • "+" menu, macOS repo. The test passes a hand-built copy of the menu's arguments, because the menu is a React hook with no plain entry point.
    • New-agent shortcut, Windows C:\ repo with the default PowerShell. Also hand-built, for the same reason.
    • Dashboard spawn, Linux repo. This row drives the real launchDashboardAgent.

    Quick Launch items are not a separate row. They omit the launch source, and launchAgentInNewTab defaults it to the menu's (tab_bar_quick_launch, launch-agent-in-new-tab.ts:293). So they send the same request as the menu row, from a different input.

    Every row saves the default argument --append-system-prompt "Bob's rules". The apostrophe shows which shell the command was quoted for: 'Bob'"'"'s rules' is bash, 'Bob''s rules' is PowerShell. Each row checks:

    • the command bytes and the launch config;
    • the environment keys;
    • the shell and WSL distro at the provider;
    • the pane's measured size, and that it is never marked hidden;
    • the working directory and its fallback mode;
    • the agent_started telemetry with each entry point's launch source (tab_bar_quick_launch, shortcut, unknown).
  2. The window planner, before any tab (src/renderer/src/lib/launch-parity-plus-planner.test.ts). Whether saved default arguments stop "+" depends on the shell the window quotes for (Q5 below). Each case checks the outcome: whether a tab and a queued startup exist.

#27189's shared files get small additive hooks only: a plus producer kind and an optional agentArgs fact in the request builder, one producer branch in the window-tab test, and the new cases added to both tables. No existing expectation changed.

Why

C2 replaces the "+" launch path. Without a record of today's bytes, a reviewer of C2 cannot tell a deliberate change from an accident. The bar for each test was: C2 relies on it, one case per rule, nothing main already pins, and nothing that an already-made decision changes. So this PR leaves out:

  • the AI buttons' host route, already pinned on main (agent-launch-through-host.test.ts:110, the agent-launch-caller-* suites);
  • the restart of a never-shown tab, already pinned on main (terminal-startup-queue-restart.test.ts);
  • the \\wsl$ folder, which goes through the same resolver as test(launch): pin what each agent launcher produces on main today #27189's \\wsl$ folder row;
  • an unclosed quote on macOS, already pinned on main (agent-launch-caller-routing.test.ts:395);
  • disabled agents (decided: disabled agents launch everywhere);
  • deleted folders (already pinned by pty-spawn-cwd-fallback.test.ts);
  • SSH spawns (main no longer spawns SSH terminals through this path).

Answers to the open questions about "+"

Q5. Can "+" fail at the window planner when saved default arguments have an unclosed quote? VERIFIED (test)

Yes. Before it makes a tab, the window re-splits the saved default arguments using the quoting rules of the shell it targets. Pinned on a Windows client:

  • --x it\'s fails for a C:\ repo, where the window quotes for PowerShell, which has no backslash escape. No tab opens and nothing is queued.
  • The same --x it\'s launches for a \\wsl$ repo, which is quoted for bash.

An unbalanced quote fails everywhere; main already pins that (agent-launch-caller-routing.test.ts:395).

The toast the user sees ("Could not build launch command for Claude.") comes from each caller, except the dashboard spawn: it returns a result that its caller (useDashboardPopoutBridge.ts:117) ignores, so a dashboard "+" fails with no message. Read in code, not run.

UNVERIFIED: that this also blocks a "+" that would have opened a chat. The check runs before the route is chosen in launch-agent-in-new-tab.ts, so it should, but no test exercises it.

\\wsl$ folder "+": quoting and terminal shell on main now. VERIFIED (test, #27189)

Since #27259, "+" in a \\wsl$ folder workspace on Windows quotes the command for Linux (bash) and runs wsl.exe with distro Ubuntu, so the quoting and the shell agree. "+" goes through the same resolver as #27189's \\wsl$ folder row, which pins this. An earlier code reading, done before #27259 and not re-checked first-hand, found PowerShell quoting typed into wsl.exe.

B6. A "+" tab that never showed its terminal, across a restart. VERIFIED (main's test)

The queued command is not saved. After a restart the tab comes back as the agent's tab with no terminal and nothing queued, so its pane opens a plain shell. Main's terminal-startup-queue-restart.test.ts pins this with the same createTab and queueTabStartupCommand calls "+" makes.

Still UNVERIFIED (needs a live app):

  • the tab's visible title after the restart;
  • the race between a quick quit and the delayed session write.

§7 item 7. Does any other real "+" fail at the window planner? VERIFIED (code reading; not pinned)

Yes, one more, added by #27259: a workspace whose host has not reported its operating system. Examples are an SSH host that is not connected yet, an Orca server too old to report it, or rival host rows. No tab opens and the user sees two toasts. The planner shows the reason, such as "The SSH host has not reported its operating system yet. Connect to it and try again.", and then the caller adds "Could not build launch command for Claude." (the dashboard spawn adds nothing, so it shows only the first) All three examples come from one check in execution-host-facts.ts, read in code.

An earlier local version of this PR pinned the SSH case. It was dropped once #27189 removed SSH from the shared test model, because SSH is out of scope for this plan.

No other window-planner failure is reachable from a "+" input (read in code; the remaining planner failures need a prompt, and "+" passes none). With chat on, a "+" that would open a chat can also return nothing after routing, when Orca cannot tell which host owns the workspace. That is a route failure, not a planner one, and it is not pinned here.

Floating "Open ". UNVERIFIED (end to end)

Its exact input is pinned on main (FloatingTerminalWindowControls.test.tsx:180), and so is the planner's handling of the floating workspace (launch-agent-in-new-tab.test.ts:217). Its pane request is not pinned, because the shared harness has no floating-workspace model.

C2 should add a floating case. When "+" moves to the host, the host must resolve the floating workspace, which has no repo or folder row. That is where this launch is most likely to break.

Linked Issue

N/A (internal plan step; no issue).

Visual Proof

N/A: tests only, no visual or interaction change.

Testing

This PR's rows pass, 65 of 65 across 5 files, with no production file changed

  • Ablation:
    • Q5 pair: removing the planner's early return turns only the C:\ row red. Making a resolved WSL project use the client's OS turns only the \\wsl$ row red. Both lines were restored by explicit edit, and the tree is clean.
    • "+" table rows: these are unchanged and were ablated before: default-argument resolution turns every "+" row red, the dashboard's launch source turns only the dashboard row red, and main's WSL distro hand-off turns the Windows rows red.

Q5 pair: one production line per row removed, each row fails, lines restored, tree clean

  • tc-gate pnpm tc:node and tc-gate pnpm tc:web pass.

  • orca-ci-checks --no-typecheck passed 24 of 25 locally. The one failure is its bundled typecheck, which stops on a local tooling error ("Script not found check"). The plain typechecks above are the real result.

  • Platforms: the cases model macOS, Linux and Windows clients in unit tests. No live app was run.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Author: Brennan Benson (X: @BrennanKB5)

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Tests only. They cover macOS, Linux and Windows C:\ and \\wsl$ clients for local hosts. SSH "+" rows are out of scope, because main no longer spawns SSH terminals through this path.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…oute produce on main

Row 1 ("+": menu, shortcut, dashboard) joins the window-tab table on both halves;
saved-arg tokenize failures before routing, the restart of a never-mounted "+" tab
and the AI-button host gate are pinned at the window planner.
… internals

Drop the AI-button and restart tests and the duplicate \\wsl$ folder and macOS
unclosed-quote rows; the Q5 pair now checks that no tab or startup was made.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review status (coordinator)

The problem. A planned series of PRs moves every way Orca starts a terminal agent onto one host launch path. Each step must keep each launcher behaving as it does on main today unless a change is decided on purpose. The earlier baseline (#27189) covered every launcher except the "+" new-tab launchers, because their route was being reverted (#27173). This PR records what the "+" launchers produce on main now, plus the answers to the open questions about "+".

The user-facing change. None. Tests only; no production code changes.

Review.

  • Round 1, two fresh reviewers. The first proved each test describes what main does: every row failed when the production line it pins was broken. The second held the PR to the size bar Brennan set: a test stays only if a named later PR relies on it and main doesn't already test it.
  • Round 1 cut the AI-button row and the "+" restart test, because main already pins both. It also cut two rows that duplicated existing tests, replaced a check on an internal function with checks of what the user gets (no tab, nothing queued), and corrected wording that overstated how the rows are built.
  • Result: 281 lines became 156.
  • Final check: confirmed every fix, re-broke the changed checks (each failed and passed again when restored), ran the suites against current main (59/59), and ran the readiness checklist.
  • It found one wording issue in the body, now fixed: when a "+" launch can't be built, the dashboard spawn fails silently with no message. That is noted for the PR that moves "+" (C2).

Live QA. Not applicable: no production change.

CI. Green at 2eb1c44: 14 required checks pass, 18 skipped by path filters, no failures.

Not verified.

  • The floating "Open " button is not pinned end to end. C2 should add a floating case.
  • "A failed '+' also blocks a launch that would have opened a chat" comes from reading the code, not from a test.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 12, 2026 03:11
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 405a9e43-5b72-4e6b-84b5-0b2fb2bec4b7

📥 Commits

Reviewing files that changed from the base of the PR and between cfb63dc and 2eb1c44.


📒 Files selected for processing (5)
  • src/main/ipc/pty-launch-parity.test.ts
  • src/renderer/src/components/terminal-pane/launch-parity-window-tab.test.ts
  • src/renderer/src/lib/launch-parity-plus-planner.test.ts
  • src/shared/launch-parity-plus-cases.test-fixture.ts
  • src/shared/launch-parity-window-request.test-fixture.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.



📝 Walkthrough

Walkthrough

The change adds shared Claude “+” launch cases for menu, shortcut, and dashboard entry points. It extends renderer and IPC parity tests to include those cases. A Windows planner test checks saved-argument launches for WSL and Windows project runtimes.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 2eb1c

No merge-blocking issue is established for these test-only changes; merge after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding tests that pin the current behavior of the "+" launchers.
Description check Passed The description is detailed and mostly complete. It explains the change, rationale, scope, testing, platform coverage, known limitations, and checklist status. It marks the linked issue as N/A for an …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025
brennanb2025 merged commit 3066008 into main Oct 12, 2026
56 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/conv-c0a2-plus branch October 12, 2026 04:48
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