From 9dfbb29a648520368949e9c753a09d1e860c4858 Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Sun, 18 Oct 2026 08:13:34 +0200 Subject: [PATCH] fix(#648): anchor antigravity's working line to the start of a row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _probePaneWorking() tests the pattern against the whole pane, so an answer that quoted the spinner row (an agent explaining this entry: it matches `⣯ Generating...`) kept the session busy for as long as the text was on screen. Anchored like gemini's braille branch; every agy capture draws the spinner at column 0. The prose test now covers the quoted row. Co-Authored-By: Claude Opus 5.5 (1M context) --- src/config/cli-registry/stock.ts | 6 +++++- test/session-activity.test.ts | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config/cli-registry/stock.ts b/src/config/cli-registry/stock.ts index 47a42e02..4ac53019 100644 --- a/src/config/cli-registry/stock.ts +++ b/src/config/cli-registry/stock.ts @@ -1012,9 +1012,13 @@ const ANTIGRAVITY: CliEntry = { // too. The footer hint is drawn only at rest, and the turn's last repaint carries it. // The schema caps a glyph at 8 characters, so this is the head of `? for shortcuts`. It also // keeps the submit verifier inert (no row starts with it and holds prompt text). + // The working line is anchored to the start of a row, like gemini's braille branch: the + // idle probe tests it against the whole pane, and an answer that QUOTES the spinner row + // (an agent explaining this entry) would otherwise hold the tab busy while it is on screen. + // Every `agy` capture draws the spinner at column 0. workDetect: { promptGlyph: '? for sh', - workingLine: String.raw`[⠀-⣿] [A-Z][A-Za-z ]{2,30}(?:\.\.\.|…)`, + workingLine: String.raw`(?:^|\n)[⠀-⣿] [A-Z][A-Za-z ]{2,30}(?:\.\.\.|…)`, }, // Like codex: an ABSENT config already defaults safe (no bypass flag), so only a // SENT config needs the flag forced off — nothing is materialized. diff --git a/test/session-activity.test.ts b/test/session-activity.test.ts index c4148d9a..1c4590bf 100644 --- a/test/session-activity.test.ts +++ b/test/session-activity.test.ts @@ -1018,6 +1018,8 @@ describe("antigravity's work-detection descriptor", () => { expect(working().test(AGY_AT_REST)).toBe(false); expect(working().test(AGY_CONFIRM)).toBe(false); expect(working().test('Loading... is what the spinner label reads\n')).toBe(false); + // An answer that quotes the spinner row mid-line must not hold the tab busy. + expect(working().test(` ok\n it matches \`⣯ Generating...\` in the pane\n${AGY_RULE}\n>\n`)).toBe(false); }); it('names the footer hint the turn end carries, and no working repaint does', () => {