Repository navigation
fix(antigravity): stop background agy work for panes and listings that don't need it - #49165
Conversation
…ted work Only a listing with a session to remove waits for its process to exit, by exit event instead of 100 ms polls. agy lists models only when an Antigravity picker asks, so startup and settings warm-up no longer start it. Panes that follow no Antigravity host no longer subscribe to its sign-in and detection stores.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ELI5
Three pieces of Antigravity code were doing work for people who weren't using Antigravity right then. Startup could launch
agyin the background just to refresh its model list. Claude and Codex chat panes were listening for Antigravity sign-in updates. Model lists for other agents waited up to five extra seconds on a check only agy needs. Now each runs only where it's needed.What Changed
discardAcpListingSessions, and only a listing that started a session it has to delete does it. It waits on the process's exit event with one 5 s timer instead of up to 50 polls. agy (and Hermes) still delete a listing's throwaway session only after the process has exited. agy's host compatibility check, the one other caller that needs the exit seen, waits for it the same way (a sharedwaitForProviderExitUntil). A check that agy answered therefore still passes when the exit arrives just after close.listsOnDemandagain. Startup warm-up and Settings warm-up no longer runagy --version,agy acpand a throwaway session. An Antigravity model picker still lists when it asks, and a saved model list still shows straight away.useAntigravityChatAuthDetection,useAntigravityChatSignInand the chat auth provider used to subscribe to the global agy sign-in and detection stores even with no host. That covered every Claude and Codex pane. With no host they now subscribe to nothing, so non-Antigravity panes no longer react to agy sign-in updates.Why
listsOnDemandbecause agy now starts quickly. But a listing still opens a session, and a session makes agy read its login: on Linux with a locked keyring that raises an unlock prompt. With the flag dropped, startup could do that for anyone with saved Antigravity state who hadn't opened an Antigravity chat. Hermes uses the same flag for the same reason.subscribeToNothing).Linked Issue
STA-18110, STA-18113, STA-18114. These are follow-ups to #48305.
Visual Proof
N/A: nothing on screen changes. An Antigravity picker still lists models when opened, and other panes look the same.
Testing
Counted at N and 10N with throwaway harnesses on the real modules (not committed):
pnpm check:changed(format, lint, typecheck, dependent tests, ratchets),pnpm tc:nodeandpnpm tc:webpass. Checked on macOS by reading the code paths; the change has no platform-specific branches.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
No tests are committed. These are work-count changes, which the counts above prove, and the repo keeps perf contracts out of unit tests.
Performance
Less work in all three places, with nothing added in their place:
Risk
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)