Skip to content

fix(runtime): hold an agy composer whose draft reads like an edit mode - #39296

Merged
nwparker merged 1 commit into
mainfrom
nwparker/agy-draft-not-idle
Nov 7, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/agy-draft-not-idle

Conversation

@nwparker

@nwparker nwparker commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Split from #23402. Thanks to @seonghobae, who recorded the agy screen this fix is built on. They are credited as co-author.

ELI5

Say you have unsent text in an Antigravity (agy) pane and it happens to read like an edit-mode label, for example dark mode: fix the toggle. Orca could take that pane to be idle and paste a prompt onto the end of your text. Now it waits.

Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​46 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​46
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3

What Changed

composer_ready_custom_status_line in agent-state-rules/antigravity.json no longer accepts agy's own [mode · ]model · effort footer as one of the status rows below the composer.

  • Before: the caret row's edit-mode alternative (^>\s+[a-z][a-z-]*\s+mode:\s) also matched a typed draft shaped like a mode label. When the composer holds text, agy hides ? for shortcuts, so composer_ready correctly refused. The custom-statusLine rule from Read an idle Antigravity composer above a custom statusLine #38930 then read the remaining footer row (plan · Gemini 3.7 Flash · low) as a custom status row and answered idle.
  • After: that footer shape never counts as a status row, so a draft like this falls through to composer_not_shown (hold).

This adds one fixture from #23402: agy 1.2.7 with the plan placeholder typed verbatim as a draft. It also adds one test file that replays the fixture and checks a plain dark mode: … draft.

Why

This is the only screen in #23402 that main's rules engine gets wrong. I replayed all five of that PR's captures, plus every agy capture already on main, through the engine.

  • The 1.2.7 default, plan and accept-edits startups were already idle.
  • The multi-line unsent draft was already hold.
  • The draft case was idle, and should not be.

The PR's other Antigravity changes (a hand-written screen-readiness path) are already covered by the rules engine (#24348, #24222, #38930, #38939), so they are not ported.

Linked Issue

N/A. This is a maintainer split of #23402.

Visual Proof

N/A. There is no UI change, and the replayed PTY capture is the evidence.

Testing

  • Replayed every antigravity-* capture through the rules before and after the change. The only verdict that changed is the draft, from idle to hold. The idle custom-statusLine rows from the [Bug]: Antigravity worker readiness never settles when agy has a custom statusLine #34707 reporter (· Gemini · idle, · capture) still read idle, and the mid-turn spinner still reads hold.
  • Both new tests fail when the rule change is reverted.
  • pnpm check:changed passes (macOS).

Risk

Level: Low.

The rule now refuses only rows shaped like [mode · ]<text> · low|medium|high. Rows are matched trimmed, so a custom statusLine row that happens to end in · high looks the same as agy's footer. Such a pane holds until OSC 7501 reports idle, which is how every custom-statusLine pane behaved before #38930. A mode-shaped draft above a real custom statusLine still reads idle: without colour, the screen cannot tell it apart from the placeholder. This is a plain revert.

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.

A draft such as `dark mode: fix the toggle`, or agy's plan placeholder typed
verbatim, matches the composer caret row's edit-mode alternative. agy hides
`? for shortcuts` while the composer holds text, so composer_ready refused,
but composer_ready_custom_status_line (#38930) took agy's own
`[mode · ]model · effort` footer for a custom status row and answered idle.
Orca would then paste into the operator's unsent text.

Status rows may no longer be agy's built-in footer. The captured agy 1.2.7
screen of the plan placeholder typed as a draft comes from #23402.

Split from #23402.

Co-authored-by: seonghobae <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Antigravity rule now excludes status rows matching the agy mode, model, and effort footer format. The rule description also clarifies how a mode-shaped draft above a custom status line is classified. A captured agy 1.2.7 Plan-mode session and tests cover a plan-placeholder draft and text that resembles an edit mode.

Merge Risk: Minimal · up to ef906

The change protects draft detection. No actionable merge-blocking risk was established.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the main change: the Antigravity (agy) composer is now held, not treated as idle, when its unsent draft reads like an edit-mode label. It matches the rule change in antigravity.json an…
Description check Passed The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue (N/A with a maintainer-split reason), Visual Proof (N/A with reason), Testing with checked items, …
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Title check

Explanation

The title names the main change: the Antigravity (agy) composer is now held, not treated as idle, when its unsent draft reads like an edit-mode label. It matches the rule change in antigravity.json and the new draft test, and it uses the fix(runtime) form. The title is specific and concise.

Full details: Description check

Explanation

The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue (N/A with a maintainer-split reason), Visual Proof (N/A with reason), Testing with checked items, Risk with level Low and a rollback note, and the Agent skill upstream boundary section. The AI Disclosure section is left blank, which the template allows for StablyAI team members. The description gives a clear before and after, the mechanism, and the alternatives considered. The Linked Issue section does not contain a 'Fixes #' issue reference, which the template asks for; the author explains that this is a maintainer split of #23402 and that no new issue is needed. This is a minor gap that does not make the description incomplete.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (3 skipped: 3 unsupported.)

Finishing Touches

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3769dc37-e2b6-4d48-bee0-2b9d8f47580c
Commits

Reviewing files that changed from the base of the PR and between df38124 and ef90605.

Files selected for processing: 4

  • src/main/runtime/__fixtures__/antigravity-plan-hint-as-draft-127.meta.json
  • src/main/runtime/__fixtures__/antigravity-plan-hint-as-draft-127.txt
  • src/main/runtime/agent-state-rules/antigravity-composer-draft.test.ts
  • src/main/runtime/agent-state-rules/antigravity.json

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

@nwparker
nwparker merged commit 0fd39be into main Nov 7, 2026
47 checks passed
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