Repository navigation
fix(web): label ACP page fetches and workspace searches accurately - #582
Merged
Merged
Conversation
ACP adapters type every search and page fetch as `web_search`, so Antigravity's workspace greps and page fetches all read "Searched web" and counted as web lookups. Fetch rows also lost their URL, because the compact activity projection dropped ACP's `rawInput`. Project identifying `rawInput` fields like other providers' tool input, and use them to present fetches as "Fetched page" with their URL and searches with a `directory_path` as code searches in row labels, group summaries, and turn summaries. Claude's WebFetch reads "Fetched page" too instead of its tool identifier. Thread caches on web and mobile are bumped so already-viewed threads pick up the projection change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ACP adapters type every search and page fetch as
web_search, so in Antigravity threads workspace greps and page fetches all read "Searched web" and counted as web lookups. A turn that grepped the repo five times and fetched three pages showed "9 web lookups". Fetch rows also lost their URL ("Searched web - Fetch URL content"), because the compact activity projection drops ACP'srawInput.What changed
rawInputnow goes through the same allowlisted, length-capped tool-input projection as other providers' input, plusdirectory_path. The projection runs when activities are read, so existing threads pick this up too.web_searchrow with a URL readsFetched page - <url>; one with adirectory_pathreadsSearched code - <query>. Real web searches staySearched web - <query>.WebFetch: now readsFetched page - <url>instead of the tool identifierWebFetch - <url>, so both providers use one name.Before and after
The expanded tool group from a real Antigravity turn. The folded header for the same turn went from "6 terminal commands, 9 web lookups" to "6 terminal commands, 4 web lookups, 5 tool calls".
Scope and upstream
Upstream fixed read and search classification for its V2 rewrite (pingdotgg#13375), but that isn't on upstream
mainyet. Its V1 counterpart doesn't apply to the fork cleanly. This change keeps edits to upstream-shared files small: one input source and one allowlisted key in the projection, two classifier conditions, one mobile icon line, and the cache versions. The label logic lives in the fork-onlytoolRowPresentation.ts. Theinspectable-tool-activityledger entry gains the invariant and tracks that upstream PR for retirement.This is a follow-up to #580. They touch separate parts of the same files, and the branches merge cleanly together.
Validation
WebFetch→Fetched page), 3 Antigravity fetches (now with URLs), and 5 Antigravity workspace greps (nowSearched code, grouped as code searches). The one real Antigravity web search and all Codex/Claude web searches are unchanged.inputcarriesurlanddirectory_path. I also confirmed the stale header came from the cached client snapshot and cleared after the cache version change.directory_pathorurl. Without either, they keep today's labels. Mobile wasn't opened in a simulator; it shares the presentation code and its tests pass.vp test runfor the projection, shared presentation, client-runtime presentation, web timeline logic, session logic, mobile thread activity, and web/mobile cache storage; typecheck for server, web, mobile, shared, and client-runtime (mobile's only error is in a pre-existing installed copy of the local markdown module); ledger validation.Written by an agent (Claude Code, claude-opus-5-5).