Repository navigation
Conversation
Mac UI agent launch and `terminal create --focus` requested focus even on headless `orca serve`, which has no BrowserWindow and threw "No renderer window available". Fall back to the existing background spawn path whenever there is no authoritative window, matching the rendererBacked headless behavior.
📝 WalkthroughWalkthroughTerminal background-spawn selection is extracted from the runtime into 🚥 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.
🧹 Nitpick comments (1)
src/main/runtime/terminal-create-background-decision.ts (1)
1-8: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCondense the explanatory comments.
The function and conditions already convey most of this behavior; keep only a short headless-fallback rationale.
Also applies to: 28-29
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5e3f3afb-800f-4d48-be16-58337e719f66
📒 Files selected for processing (3)
src/main/runtime/orca-runtime.tssrc/main/runtime/terminal-create-background-decision.test.tssrc/main/runtime/terminal-create-background-decision.ts
|
Thanks for this, and for the diagnosis — it was correct, and it made the fix straightforward to confirm. We reproduced #10333 against a real headless We've opened #12791 with the fix. Two reasons we went with a separate PR rather than merging here, both about test coverage rather than your diagnosis:
One thing worth knowing that neither PR could have anticipated: the Mac UI Genuinely appreciate the work here; the fix in #12791 is the shape you both proposed. Closing these in favour of it, but the credit for finding it is yours. |
|
@Jinwoo-H thanks for digging into this — and for running it on a real headless You're right that this PR's tests mostly exercise the helper, not the call site that actually throws. I don't want to ship something that stays green after the fix is reverted. Closing in favor of #12791; glad the diagnosis held up on your side. |
|
Closing as superseded by #12791. |
Summary
terminal create --focusthrows "No renderer window available" on headlessorca serve— Mac UI + button cannot launch agents on remote servers #10333: Mac UI+agent launch andterminal create --focuson headlessorca serveno longer throwNo renderer window available.rendererBackedheadless fallback).Root cause
shouldCreateInBackgroundonly covered headless whenrendererBacked === true(or when focus was not required). Focus-requested creates still calledgetAuthoritativeWindow(), which throws on serve with no windows.Test plan
pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/terminal-create-background-decision.test.tsorca --environment <remote> terminal create --worktree <wt> --command "echo test" --focus --jsonreturns ok (background surface) instead of runtime_error+→ agent on headless remote server creates a usable terminal handleELI5
Launching an agent or terminal create --focus on headless orca serve crashed with No renderer window available. Headless creates now use the background spawn path when there is no UI window.