Repository navigation
Conversation
The Antigravity ready matcher required a prompt line whose trimmed content was exactly '>' after the CLI header and Gemini model line. CLI 1.1.17 renders its idle composer as a mode banner instead — '> Accept-edits mode: file edits auto-approved (shift+tab to cycle)' — so a signed-in, input-capable terminal never satisfied tui-idle: orchestration worker-start timed out in agent_readiness after 60s and left the Dispatch unassigned while the residual terminal worked perfectly (stablyai#15838). The prompt line now accepts any line whose first non-space character is '>' (the composer prompt) except the shortcuts-hint question line, which stays non-idle. The bare-'>' shape from older builds still matches.
📝 WalkthroughWalkthroughAntigravity composer detection now accepts non-empty Merge Risk: 🔵 Low · up to The matcher now recognizes Antigravity 1.1.17’s composer banner while preserving the existing bare prompt behavior, which should restore readiness for affected terminals. The change is mergeable with owner awareness to add a negative regression test confirming that the shortcuts hint alone cannot signal an idle prompt. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/main/runtime/orca-runtime.ts (1)
39980-39992: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the redundant
.includescheck.
isAntigravityComposerNonIdleLinereturns/\?\s*(for shortcuts|$)/.test(line) || line.includes('? for shortcuts'). The regex is unanchored, so if the literal substring? for shortcutsappears anywhere inline, the regex alone already matches it at that position (via thefor shortcutsalternative). The|| line.includes(...)clause is unreachable given the regex.Simplify to just the regex test.
♻️ Proposed simplification
function isAntigravityComposerNonIdleLine( normalized: string, start: number, end: number ): boolean { const line = normalized.slice(start + 1, end) - return /\?\s*(for shortcuts|$)/.test(line) || line.includes('? for shortcuts') + return /\?\s*(for shortcuts|$)/.test(line) }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d56047dd-d397-4394-b2c7-7a0c55448fb7
📒 Files selected for processing (2)
src/main/runtime/orca-runtime.test.tssrc/main/runtime/orca-runtime.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
| it('resolves tui-idle from the Antigravity 1.1.17 composer-banner prompt (#15838)', async () => { | ||
| const runtime = new OrcaRuntimeService(store) | ||
| runtime.attachWindow(1) | ||
| runtime.setPtyController({ | ||
| spawn: vi.fn().mockResolvedValue({ id: 'pty-agy117' }), | ||
| write: () => true, | ||
| kill: () => true, | ||
| getForegroundProcess: async () => null | ||
| }) | ||
| const { handle } = await runtime.createTerminal(`path:${TEST_WORKTREE_PATH}`) | ||
| runtime.syncWindowGraph(1, { | ||
| tabs: [ | ||
| { | ||
| tabId: 'tab-1', | ||
| worktreeId: TEST_WORKTREE_ID, | ||
| title: 'Terminal', | ||
| activeLeafId: 'pane:1', | ||
| layout: null | ||
| } | ||
| ], | ||
| leaves: [ | ||
| { | ||
| tabId: 'tab-1', | ||
| worktreeId: TEST_WORKTREE_ID, | ||
| leafId: 'pane:1', | ||
| paneRuntimeId: 1, | ||
| ptyId: 'pty-agy117', | ||
| paneTitle: null | ||
| } | ||
| ] | ||
| }) | ||
| runtime.onPtyData('pty-agy117', antigravityComposerBannerReadyScreen(), Date.now()) | ||
| const [terminal] = (await runtime.listTerminals()).terminals | ||
|
|
||
| await expect( | ||
| runtime.waitForTerminal(terminal.handle, { condition: 'tui-idle', timeoutMs: 1_000 }) | ||
| ).resolves.toMatchObject({ | ||
| handle: terminal.handle, | ||
| condition: 'tui-idle', | ||
| status: 'running' | ||
| }) | ||
| }) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Add a negative regression case for the shortcuts hint.
This test includes both the new composer banner and ? for shortcuts. It can pass even if the matcher incorrectly treats ? for shortcuts as an idle prompt. Add a separate screen with only the shortcuts hint and assert that waitForTerminal does not resolve tui-idle.
|
Thanks @yzxcj797 for the detailed repro and fixture! This is already fixed on main by #21705 (eb92222). The Antigravity idle-composer check now accepts either a bare |
Summary
What
findAntigravityReadyPromptIndexnow accepts the idle composer line in either shape: the older bare>line, or CLI 1.1.17's mode banner (> Accept-edits mode: file edits auto-approved (shift+tab to cycle)). The shortcuts-hint line (? for shortcuts) remains non-idle. The model-line requirement (a line beginning withGeminiafter the header) is unchanged.Why
#15838 — the matcher required a prompt line whose trimmed content was exactly
>(trimmedEnd - trimmedStart === 1 && charCode === 62). Antigravity CLI 1.1.17 renders its idle composer as a mode banner instead of a bare>, so a signed-in, fully input-capable terminal never satisfiedtui-idle:orca orchestration worker-start --agent antigravitytimed out inagent_readinessafter 60s, left the Dispatch unassigned (assignee_handle: null,capability_hash: null), and the residual terminal accepted and executed a task perfectly when driven manually — exactly the reporter's reproduction, twice.The acceptance rule keeps the prompt shape anchored on the composer's leading
>(not a substring match), and the one known non-idle>-adjacent line — the shortcuts question — is explicitly excluded, so an interactive question below the composer still refuses readiness.Testing (
orca-runtime.test.ts— 1185/1185, ~39s):antigravityComposerBannerReadyScreenreproducing the reporter's exact 1.1.17 screen (header, account,Gemini 3.7 Flash (High), working directory, mode-banner composer, shortcuts hint), and a newtui-idleresolution test over it. Verified to fail on the pre-change matcher (times out) and pass with the fix.>Antigravity fixture (antigravityReadyScreen) and the pre-model-ready screen, which pin the old shape and the not-yet-ready refusal.pnpm run typecheckclean.Fixes #15838