fix(windows): Antigravity hook sessions now display correctly#21
Open
23092003e wants to merge 1 commit into
Open
fix(windows): Antigravity hook sessions now display correctly#2123092003e wants to merge 1 commit into
23092003e wants to merge 1 commit into
Conversation
Antigravity sends no event-name field — state must be inferred from discriminator fields (terminationReason/fullyIdle → done, toolCall/invocationNum/stepIdx → working), mirroring the macOS AntigravityHookPayload.makeEvent logic. Before this fix, cli.rs looked for hook_event_name/eventName (absent in Antigravity payloads), so event was always empty and statemap dropped every event silently — the feature was installed but completely broken. Also adds workspacePaths (Antigravity's camelCase array field) as a project fallback alongside workspace_roots. Includes 11 unit tests covering all real payload shapes and edge cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Problem
Antigravity sessions never appeared on Windows despite the feature being
installed and advertised in the hook catalog.
Root cause: cli.rs::run_hook extracted event name from fields
hook_event_name/eventName — none exist in Antigravity payloads.
Antigravity sends no event-name field; state must be inferred from
discriminator fields. Result: event always "", statemap dropped every
event silently.
Secondary issue: project extraction missed workspacePaths (Antigravity's
camelCase array field).
Fix
AntigravityHookPayload.makeEvent:
Tests
11 unit tests: all 4 real payload shapes from macOS test suite, priority
edge case (terminationReason + stepIdx → done wins), None for unknown
payloads, all 3 project extraction paths.
Note: CI-verified only (windows-build.yml). Rust toolchain not available locally.