Skip to content

Add Antigravity Chat and fix first-send and native-build lifecycle regressions - #24627

Closed
nwparker wants to merge 19 commits into
mainfrom
nwparker/integrations-antigravity-chat-1002
Closed

nwparker wants to merge 19 commits into
mainfrom
nwparker/integrations-antigravity-chat-1002

Conversation

@nwparker

@nwparker nwparker commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 52 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3684 $\color{#cf222e}{\Huge{\mathbf{−}}}$​69 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3615
Prod 47 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1329 $\color{#cf222e}{\Huge{\mathbf{−}}}$​110 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1219

ELI5

Antigravity can show its conversation in Orca’s experimental Chat view while continuing in its terminal. The first sent prompt and a seeded launch prompt now stop showing a duplicate echo when the recorded conversation uses whole-second timestamps. The shared native launcher also stops scheduling descendant cleanup once a compiler has closed, and its regression test waits for the output producer to exit before deciding how many bytes should arrive.

What Changed

Preserve the complete terminal-backed Chat feature: transcript reads and live tails, Chat/Terminal switching, command approval cards, and guarded local Stop. New launches stay in Terminal until the host supplies a real conversation identity. WSL lookup stays in the canonical session’s distro; paired/web/mobile transcript transport checks native-chat.antigravity.v1.

The first-send repair marks observed Antigravity created_at rows with optional source-clock precision. Pending sends and launch prompts use that declaration; precise Claude/Codex clocks and existing authoritative ID/time boundaries remain exact. One additive main merge preserves both recorded step order and main’s split-reasoning order, with a regression for their combination. Repeated sends, pagination, cancellation, rejected writes, approval revisions, and host ownership remain on existing paths.

The native-build change repairs both the shared test oracle and a launcher cleanup defect exposed by the stricter checks. The launcher uses its existing child-ownership map to refuse new reap timers after a compiler closes; a late output-drain resume can no longer restart cleanup for a closed process group. The test counts bytes accepted by synchronous pipe writes, verifies actual producer exit with ESRCH, and checks exact text and ordering after a consumer stall longer than the unchanged reap timeout. Delayed-completion and closed-stream-resume regressions cover both boundaries.

Why

Extend existing transcript, delivery, and canonical status machinery instead of adding a provider or guessing that every timestamp ending in .000 is coarse. Credit @sojiro-o’s #25117 diagnosis and #24141 Chat contribution, and @haoliangli’s original #15773 work. Original objects and credit trailers are retained; the measured sojiro-o email is 53679703+sojiro-o@users.noreply.github.com. No haoliangli email was inferred.

The hosted native job received 1,590 lines while its test expected a premature snapshot of 1,444. The same controlled failure reproduces on this feature head and CI main 58bd15fa3ffa65942d94aee8137e35c27f4368c8; waiting for the output producer fixes it there. Correct the producer-owned byte oracle rather than changing launcher timeouts, discarding output, or accepting a retry. A subsequent stricter run exposed late stream resumes rearming descendant reaping after the compiler had closed. That separate production defect reproduces on both feature and CI main, and the existing ownership-map guard fixes it there. The launcher continues to own compiler groups and cancellation; deadlines and compiler output are unchanged.

Linked Issue

Refs #20157 and #25116. Original #25117 remains open; this draft is not merge approval or a closure request.

Visual Proof

Historical actual authenticated agy 1.2.14 macOS screenshots/video from the earlier accepted builds remain below. Those observations used the separately reviewed POSIX hook companion #24596; they are not new-head native or rendered acceptance. Earlier Allow/Deny used 272a263f6a1514089df064ecaee5b43962216cf5; later Chat/Stop evidence used source 8ce5899dc0e82993027c2d2b352e0900c5db185b composed with that companion as aaa1a949dec67532eba938a290996705f330bba7. No new Electron/CDP before/after comparison was produced for this publication.

https://github.com/user-attachments/assets/2bb0b535-aea2-436a-88a9-4875162c984f

https://github.com/user-attachments/assets/252b2f31-3869-49df-9ac1-d64ee24af451

https://github.com/user-attachments/assets/4f99be7f-283c-441e-905a-99ca8c9db989

https://github.com/user-attachments/assets/b8d4a362-b222-41f3-84e3-aafd14f1f9ce

antigravity-chat-stop-fixed-short.webm

Testing

  • Fresh manual acceptance of this exact published head.
  • Automated regressions added/updated.

Published head: 36304d58bd346967b243403d97033da0153b965d. Two-file shared native launcher/test repair above 0ac1783fc216945aedf7ddc876adcdd90b9fe107, through initial checked test commit b7d38d5d8880cfc9e58e891cedfb45eecaeaba9b; the feature source and 104 accepted assets are unchanged. Prior head: 0ac1783fc216945aedf7ddc876adcdd90b9fe107. Test-only anti-slop correction above 2c64a3289aca39df6b49c075397b8a0d2d863833. Composed once with main 2b3b692d29102b87389042a5614d80b93956d5e0 (fetched 2026-10-04 07:39:43 UTC).

Historical 2c64 macOS source checks: 50 files / 730 tests plus 10 additional files / 150 tests pass, including captured first-send/seeded-launch precision, live and retained sessions, repeated occurrences, PTY queue/cancel/rejection, host routing, approvals, OpenCode reasoning/paging, and full captured transcript serialization. The three-case independent reviewer scaffold was exercised but remains unchanged and uncommitted. Full pnpm tc, changed-code quality, intended-file formatting, and git diff --check pass; normal Husky commit hooks ran. The initial composition failed on a duplicate prompt-registry import; removing only the duplicate fixed typecheck and the affected suite. Raw failure logs are retained locally.

The hosted static-analysis job 111391661369 in PR Checks run 37186900167 failed audit:anti-slop on three reflective test-property reads (synthetic merge source c2d51275aabcb81e422cfa224c9493954dfa456b, merging 2c64 into main 2b3); ordinary lint passed. The same three errors were reproduced locally before correction. Checked object/property narrowing now reads the original production screen reader and validator, preserving callback identity, terminal ownership, timers, stale permission and screen-generation assertions without casts, stubs, suppressions or production changes. On this repair: six focused publication/approval suites / 47 tests, full pnpm tc, normal audit:anti-slop, changed-quality, intended formatting and diff checks pass; normal commit hooks ran and tested/committed patch bytes match. Fresh hosted CI and independent acceptance of this new head remain pending; earlier failed logs remain retained.

Native-build CI causal repair

On macOS / Node 24.20.0 / physical pnpm 12.8.1 with ORCA_BACKGROUND_LAUNCH=1:

  • pnpm test config/scripts/build-native-for-platform.test.mjs config/scripts/macos-computer-helper-owner-loss-processes.test.mjs config/scripts/macos-computer-helper-owner-loss-group-recovery.test.mjs config/scripts/pnpm-cli-invocation.test.mjs: four files / 69 tests pass, including 23 native-launcher cases and the existing 25 owner-loss controls. Counts overlap prior runs.
  • Full pnpm tc, pnpm run check:code-quality:changed, targeted oxlint/format, diff checks, and normal Husky lint-staged hooks pass. Both tested files match the committed bytes.
  • Controlled early-snapshot and closed-stream-resume failures reproduce on the feature candidate and CI main 58bd15fa3ffa65942d94aee8137e35c27f4368c8; their respective repairs pass on that main comparator. Restoring old early-snapshot ordering fails the final exact-byte oracle. Temporarily disabling pause-aware descendant reaping also fails by losing accepted bytes.
  • Original hosted failure, causal red logs, intermediate 67-pass/1-fail late-reap observation, and initial targeted lint/curly findings are retained. The stricter observation led to the production ownership guard; it was not discarded or passed by retries.

No assertions, production deadlines, output volume, existing tests, or platform skips were weakened. The simulated Linux/Windows entry checks run on macOS and do not establish native execution on those platforms. The controlled compiler schedule models the causal ordering, not the hosted machine's exact scheduler. Fresh hosted CI, independent new-head review, actual Swift/native packaging, provider authentication, and rendered acceptance remain pending.

Review

Accepted ed05 author and independent source reviews remain historical evidence. The prior 2c64 review additionally checked the four overlapping files, combined ordering, metadata preservation, strict pending boundaries, live/retained ownership fences, approval incarnation/revision checks, and capability routing. All 104 named accepted capture/census/sidecar assets retain their hashes; they are not 104 raw PTYs. Historical accounting remains 291 paths / 495 fixtures / 162 unique curated paths including that 104 subset.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source or assets copied.

Notes

Protocol 3 / minimum 2 remains unchanged; precision is an optional field on existing JSON messages, with no new opcode. New clients against older hosts retain exact matching and the known coarse-clock limitation. A future producer using precise aligned ISO created_at needs a decoder-contract update; same-second identity without an earlier authoritative boundary still depends on the established session/source association.

Fresh Electron rendering, authenticated provider/native acceptance, Windows, WSL, Linux/glibc or musl, direct SSH, paired runtimes, and mobile devices remain unverified on this head. Direct SSH stays Terminal; paired Stop inference remains unsupported. No real provider credentials, keychain/global profiles, paid calls, or visible/focused apps were used. Full lint/build/packaging and hosted CI remain for ROOT’s review; no workflow rerun, approval, ready transition, auto-merge, merge, or predecessor closure is authorized.

Checklist

  • Preserves the complete Antigravity Chat feature and first-send repair, with the shared native-build output oracle and compiler-cleanup lifecycle corrected.
  • Explained before/after behavior, mechanism, and approach.
  • Fresh exact-head before/after rendered proof; historical media retained with limits.
  • Self-reviewed correctness, security, performance, and execution-host ownership.
  • Considered cross-platform, SSH/remote, folder-workspace, and compatibility behavior.
  • Full lint/build and unavailable-platform acceptance; local tests/types/quality pass, hosted CI remains.

@nwparker
nwparker force-pushed the nwparker/integrations-antigravity-chat-1002 branch from a4f4227 to 67449a7 Compare October 2, 2026 09:28
nwparker and others added 5 commits October 2, 2026 03:02
Recover scoped transcript, terminal approvals, and WSL support on current main.
Keep hook-server authority, captured-grid rules, quiescence, and current journals.
Negotiate Antigravity reads and subscriptions on desktop, web, and mobile.

Credits #15773, #21660, #21776, and #24141.

Co-authored-by: haoliangli <haoliangli@users.noreply.github.com>
Co-authored-by: sojiro-o <53679703+sojiro-o@users.noreply.github.com>
@nwparker
nwparker force-pushed the nwparker/integrations-antigravity-chat-1002 branch from 1d40ab2 to e3c4ff7 Compare October 2, 2026 10:05
@nwparker
nwparker marked this pull request as ready for review October 2, 2026 11:00
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 379e3f8a-c528-46f2-ba81-7daac985c426
📥 Commits

Reviewing files that changed from the base of the PR and between 09169ed and bebdb53.

📒 Files selected for processing (21)
  • docs/reference/antigravity-native-chat.md
  • src/main/daemon/serialize-grid-transcript-replay.test.ts
  • src/main/native-chat/antigravity-execution-namespace-refusal.test.ts
  • src/main/native-chat/native-chat-execution-namespace.test.ts
  • src/main/native-chat/native-chat-execution-namespace.ts
  • src/main/native-chat/native-chat-file-provenance.ts
  • src/main/runtime/antigravity-approval-screen-liveness.test.ts
  • src/main/runtime/antigravity-ruled-screen-publication.test.ts
  • src/main/runtime/antigravity-screen-permission-lifecycle.test.ts
  • src/main/runtime/antigravity-screen-permission-publisher.ts
  • src/main/runtime/orca-runtime-visible-snapshot-preview.ts
  • src/main/startup/main-process-runtime-service.ts
  • src/renderer/src/components/native-chat/native-chat-launch-session-options.ts
  • src/renderer/src/lib/antigravity-session-launch-view.test.ts
  • src/renderer/src/lib/launch-ai-vault-session.ts
  • src/renderer/src/lib/native-chat-initial-view-mode.ts
  • src/renderer/src/lib/sleeping-agent-session-launch.ts
  • src/renderer/src/store/slices/agent-status-live-reducer.ts
  • src/renderer/src/store/slices/antigravity-initial-chat-association.test.ts
  • src/renderer/src/store/slices/antigravity-initial-chat-view.ts
  • src/shared/agent-session-resume.ts

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


📝 Walkthrough

Walkthrough

The changes add Antigravity transcript discovery, decoding, and journal import for native chat, including WSL namespace checks and transcript ordering. Runtime capability checks gate desktop and mobile chat reads and subscriptions. The runtime also recognizes terminal approval screens and publishes validated permission updates. Renderer changes integrate Antigravity into chat view selection, live status, and local cancellation handling. Documentation and fixtures describe transcript formats, terminal captures, readiness results, and verification limits.

Priority: ➖ Normal

Merge Risk: 🟡 Moderate · up to bebdb

The new screen tests are likely to block the PR lint job. Address the anti-slop violations and confirm CI passes before merging.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to bebdb

Session, terminal identity, and freshness checks limit exposure. However, command approval cards now depend on recognized terminal text rather than independently authenticated requests, and the final approval action’s freshness guarantees remain unverified.

Retained concerns

  • Medium · security · inferred: The new screen producer treats matching terminal text as an actionable approval request. If untrusted content can control the current eligible pane’s rendered approval-shaped output, it could supply a misleading command summary. Terminal and revision fences restrict the target but do not authenticate the text to the provider’s pending command. Whether such output is reachable and can cause a mismatched approval action remains unresolved.
Security review details

Security Blast Radius

  • inferred — The inspected approval producer is bounded to an eligible connected local PTY and its canonical Antigravity row; WSL relay rows must match the PTY’s known distro. Non-relay remote rows are excluded. The evidence does not establish cross-pane, cross-host, tenant-wide, or additional credential authority.

Security Findings and Attack Paths

  • inferred — The conditional attack path is control of current eligible terminal output, reproduction of the approval layout, extraction of an attacker-chosen summary, and publication as an actionable card. Structural recognition and canonical identity checks are observed; attacker reachability and a resulting unauthorized execution are not established.

Trust Boundaries and Controls

  • observed — Host ingestion rejects unconfirmed restored rows, wrong agents, unsupported connections, terminal-handle mismatches, and authority/incarnation/revision mismatches. It can create a screen approval only from working state or its own existing prompt, and can clear only a prompt owned by this producer.

Resilience and Maintainability Implications

  • observed — Publication freshness checks include connection state, verifiable liveness, PTY generation, and output sequence. Repeated identical observations are deduplicated without changing canonical status, limiting stale publication and unnecessary control-state churn.

Hardening Proposals

  • proposed — Prefer a provider-authenticated pending-operation identifier for actionable approvals. If screen-derived approvals remain necessary, bind final input delivery to the current terminal incarnation and prompt identity, and reject actions after either changes. These are hardening proposals, not verified missing controls in the uninspected delivery path.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 32.31% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 65 functions across 62 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies the Antigravity Chat feature and the first-send and native-build lifecycle fixes.
Description check ✅ Passed The description covers the change, rationale, testing, visual evidence, review notes, and limitations. It includes issue references, but does not identify a specific issue as the one this PR fixes.
Full details: Docstring Coverage

Explanation

Docstring coverage is 32.31% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 65 functions across 62 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch nwparker/integrations-antigravity-chat-1002
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes

  • Antigravity transcript decoder and readers — a new JSONL decoder (user, planner, tool-step records) wired into full reads, tails, and legacy journal import; transcriptPosition (from step_index) breaks timestamp ties in projection; no turn lifecycle is emitted, so host hook status stays authoritative.
  • Execution-namespace isolation — the canonical provider-session store derives each session's owning WSL distro, and id-based resolution is confined to that guest; guest hook paths stay authoritative and never fall through to a native id match.
  • Command approvals — a runtime publisher recognizes the captured agy menu and publishes Allow/Deny into the canonical agent-status store, fenced by revision, incarnation, terminal handle, and restored-row state; the idle-composer clear is held to three seconds.
  • Chat view, transport, and Stop — capability-negotiated native-chat.antigravity.v1 gating on desktop/web/mobile, guarded local interrupt inference after acknowledged delivery, and initial-view gating that keeps unassociated sessions in Terminal.
  • Docs and recorded fixtures — reference docs plus sanitized macOS 1.2.14 and historical Windows 1.2.7 approval recordings.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: fec2d46c-e94b-4899-879a-ce3d5bae2d0d

📥 Commits

Reviewing files that changed from the base of the PR and between efbf651 and 09169ed.

📒 Files selected for processing (81)
  • docs/reference/antigravity-native-chat.md
  • docs/reference/antigravity-readiness-evidence.md
  • mobile/src/session/mobile-antigravity-chat-capability.test.ts
  • mobile/src/session/mobile-antigravity-chat-capability.ts
  • mobile/src/session/use-mobile-native-chat-session.ts
  • src/main/agent-hooks/server-ingest-antigravity-screen.test.ts
  • src/main/agent-hooks/server/server-ingest-antigravity-screen.ts
  • src/main/agent-hooks/server/server-ingest-terminal.ts
  • src/main/ai-vault/session-scanner-antigravity-parser.ts
  • src/main/ai-vault/session-scanner-antigravity-paths.ts
  • src/main/daemon/serialize-grid-transcript-replay.test.ts
  • src/main/native-chat/__fixtures__/antigravity/README.md
  • src/main/native-chat/__fixtures__/antigravity/live-timestamp-tie.jsonl
  • src/main/native-chat/__fixtures__/antigravity/tool-turn.jsonl
  • src/main/native-chat/agent-session-journal/journal-legacy-import-antigravity.test.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-import.ts
  • src/main/native-chat/antigravity-session-file-resolution.ts
  • src/main/native-chat/host-readable-transcript-path.ts
  • src/main/native-chat/native-chat-execution-namespace.test.ts
  • src/main/native-chat/native-chat-execution-namespace.ts
  • src/main/native-chat/session-file-resolver-antigravity-wsl.test.ts
  • src/main/native-chat/session-file-resolver.ts
  • src/main/native-chat/transcript-line-decoders-antigravity.ts
  • src/main/native-chat/transcript-line-decoders.antigravity.test.ts
  • src/main/native-chat/transcript-line-decoders.ts
  • src/main/native-chat/transcript-reader-antigravity.test.ts
  • src/main/native-chat/transcript-reader.ts
  • src/main/native-chat/transcript-tail-reader.ts
  • src/main/orcad/orcad-entry.ts
  • src/main/runtime/__fixtures__/antigravity-macos-1-2-14-command-approval.meta.json
  • src/main/runtime/__fixtures__/antigravity-macos-1-2-14-command-approval.txt
  • src/main/runtime/__fixtures__/antigravity-windows-approved-command-running.meta.json
  • src/main/runtime/__fixtures__/antigravity-windows-approved-command-running.txt
  • src/main/runtime/__fixtures__/antigravity-windows-command-allow-key.meta.json
  • src/main/runtime/__fixtures__/antigravity-windows-command-allow-key.txt
  • src/main/runtime/__fixtures__/antigravity-windows-command-approval.meta.json
  • src/main/runtime/__fixtures__/antigravity-windows-command-approval.txt
  • src/main/runtime/__fixtures__/antigravity-windows-command-cancelled.meta.json
  • src/main/runtime/__fixtures__/antigravity-windows-command-cancelled.txt
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-macos-1-2-14-command-approval@agent.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-macos-1-2-14-command-approval@unknown.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-approved-command-running@agent.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-approved-command-running@unknown.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-allow-key@agent.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-allow-key@unknown.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-approval@agent.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-approval@unknown.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-cancelled@agent.json
  • src/main/runtime/__fixtures__/readiness-census/transcript--antigravity-windows-command-cancelled@unknown.json
  • src/main/runtime/agent-status-store-wiring.test-fixture.ts
  • src/main/runtime/antigravity-command-approval-screen.ts
  • src/main/runtime/antigravity-command-approval-transcript.test.ts
  • src/main/runtime/antigravity-screen-permission-publisher.test.ts
  • src/main/runtime/antigravity-screen-permission-publisher.ts
  • src/main/runtime/orca-runtime-on-pty-data.ts
  • src/main/runtime/orca-runtime-on-pty-exit.ts
  • src/main/runtime/orca-runtime-preserved-branch-cleanup.ts
  • src/main/runtime/orca-runtime-state-fields.ts
  • src/main/runtime/orca-runtime-visible-snapshot-preview.ts
  • src/main/startup/main-process-runtime-service.ts
  • src/renderer/src/components/native-chat/native-chat-antigravity-capability.test.ts
  • src/renderer/src/components/native-chat/native-chat-antigravity-capability.ts
  • src/renderer/src/components/native-chat/native-chat-antigravity-interrupt.test.ts
  • src/renderer/src/components/native-chat/native-chat-antigravity-interrupt.ts
  • src/renderer/src/components/native-chat/native-chat-availability.test.ts
  • src/renderer/src/components/native-chat/native-chat-live-status.test.ts
  • src/renderer/src/components/native-chat/native-chat-live-status.ts
  • src/renderer/src/components/native-chat/native-chat-runtime-contract.ts
  • src/renderer/src/components/native-chat/native-chat-session-transport.ts
  • src/renderer/src/components/native-chat/use-native-chat-interactive-send.ts
  • src/renderer/src/components/settings/NativeChatSupportedAgents.test.tsx
  • src/renderer/src/lib/native-chat-initial-view-mode.test.ts
  • src/renderer/src/lib/native-chat-initial-view-mode.ts
  • src/shared/agent-session-resume.test.ts
  • src/shared/agent-session-resume.ts
  • src/shared/native-chat-agent-support.test.ts
  • src/shared/native-chat-agent-support.ts
  • src/shared/native-chat-transcript-projection.test.ts
  • src/shared/native-chat-transcript-projection.ts
  • src/shared/native-chat-types.ts
  • src/shared/protocol-version.ts

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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

The only delta since the prior pullfrog review is commit 09169edd, which is test-only CI integration (11 files, +144/−0, no production code):

  • Readiness-census baselines — added the ten missing baselines for the five new Antigravity recordings across the agent and unknown panes, satisfying the catalog's one-baseline-per-pane invariant.
  • Serialize round-trip expectation — recorded antigravity-windows-command-approval in the pre-existing-failure allowlist and pinned its four exact shrink-grow failure signatures, so the tolerated count cannot hide an extra regression.

The four prior review threads (all minor, non-blocking) are anchored to production lines this commit does not touch, so they remain open.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Honor Chat preferences when a CLI conversation becomes associated, refuse
transcript reads for other hosts, and preserve approval and quiet-timer
liveness across terminal replacement and exit.
Check the tab's supplied connection against the existing namespace resolver
before transcript reads, including when no canonical owner row is available.
Keep WSL reads in their guest and reject conflicting ownership constraints.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The three review-repair commits land cleanly — all four prior findings are resolved — but two of the new Antigravity approval tests call Reflect.get to reach private publisher fields, which fails the repo's required audit:anti-slop lint step.

Reviewed changes

The delta since pullfrog's prior review (09169edd, commits fea561e1d0 → 6057c2a39b → merge 907b75fce5 → bebdb53d64) repairs the earlier findings and adapts the approval reader to current main:

  • Refused remote-owned transcript reads — a new antigravityConnectionNamespace throws for any non-WSL, non-null connection id, and the ungated nativeChatTranscriptIncludesPath provenance read now forwards the tab's connection and derived WSL distro, so an SSH/paired-owned id can no longer resolve a same-named native transcript.
  • Fixed the quiet-timer lifecycle — cancelQuietTimer clears an already-armed timer before arming a new one, and pending-read identity guards prevent a forgotten PTY incarnation from publishing or rescheduling for its replacement.
  • Removed the dead screen.headlessWriteChain clause from the approval publisher's isCurrent fence.
  • Made the opt-in Chat preference reachable — providerSessionId is threaded through the AI Vault resume and sleeping-session resume paths, plus a new antigravityInitialChatViewPatch store slice that opens Chat when the host first supplies a CLI conversation id while preserving explicit, unconfirmed-restored, and IDE-reference cases.
  • Reused the ruled-screen reader — readScreenRuledLines was renamed to readRuledScreen (now returning alternateScreen), with captured approval publication and liveness tests.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Comment on lines +24 to +26
const publisher: unknown = Reflect.get(runtime, 'antigravityScreenPermissions')
const deps: unknown =
publisher && typeof publisher === 'object' ? Reflect.get(publisher, 'deps') : null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new tests reach into private publisher fields with Reflect.get, which the repo's anti-slop/no-reflect-get rule rejects (config/oxlint-anti-slop.json), so pnpm run audit:anti-slop — the step the lint job runs in .github/workflows/pr.yml — fails with three errors (here at lines 24 and 26). The same rule fires on src/main/runtime/antigravity-approval-screen-liveness.test.ts:31.

The idiomatic fix in this repo is a line-specific // oxlint-disable-next-line anti-slop/no-reflect-get -- <reason> (see e.g. src/renderer/src/components/tab-bar/terminal-tab-activity-status.test.ts:414), or exposing a typed test accessor on the runtime/publisher instead of reading deps off the instance.

Technical details
# `no-reflect-get` fires on the new approval tests

## Affected sites
- `src/main/runtime/antigravity-ruled-screen-publication.test.ts:24` — `Reflect.get(runtime, 'antigravityScreenPermissions')`
- `src/main/runtime/antigravity-ruled-screen-publication.test.ts:26` — `Reflect.get(publisher, 'deps')`
- `src/main/runtime/antigravity-approval-screen-liveness.test.ts:31` — `Reflect.get(this.antigravityScreenPermissions, 'deps')`

## Evidence
- `oxlint --config config/oxlint-anti-slop.json <files> --deny-warnings` → `Found 0 warnings and 3 errors`.
- The anti-slop test-file override only turns off `no-module-mocking`; `no-reflect-get` stays `error` for `*.test.ts`.
- `audit:anti-slop` scans all of `src config tests mobile` (not changed lines only), so this reds the lint job on the PR head.

## Required outcome
- `pnpm run audit:anti-slop` passes on the PR head, with the test still exercising the production publisher closure.

@sojiro-o

sojiro-o commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Tested #24627 on Windows + WSL2 (Ubuntu 26.04) at head bebdb53, since the PR notes there was no fresh WSL run. agy auto-updated to 1.2.16 (PR proof used 1.2.14).

Works on WSL

  • A brand-new Antigravity session started from the launcher in a WSL folder binds to its transcript; Chat shows the conversation.
  • The command approval card appears in Chat. Allow runs the command; Deny dismisses the card immediately and agy shows Interrupted and returns to its prompt.
  • Stop interrupts the turn. Observation: agy moved the running sleep 20 && echo done to a background task instead of killing it, and later reported done on its own. Probably agy behavior; mentioning it in case Stop is expected to end the command.

Bug: the first message sent from Chat in a new session shows twice
Repro: start a new Antigravity session → send echo hello を実行して from the Chat composer (first message of the session).
Result: the real turn renders, plus a second copy of the user bubble with an empty "completed" turn below it. The extra bubble stays pinned at the bottom as later turns arrive. Only the first send is affected; later sends reconcile normally. agy's history.jsonl and transcript.jsonl contain the prompt once.

First send rendered twice Duplicate bubble pinned below later turns

Likely cause: with no prior messages, record() in use-native-chat-pending-delivery.ts stores afterMessageId: null, so messageIsAfterPendingTimestamp (native-chat-pending.ts) matches only rows with timestamp >= sentAt. Antigravity's created_at has second precision (2026-10-04T00:44:36Z) while sentAt is Date.now() in ms, so the real user row (…36.000) sorts before the send (…36.3xx) and never matches. Later sends use a message-id boundary, so they don't hit this. It isn't WSL-specific; any send that doesn't land right at a second boundary should reproduce it. Host/guest clock skew on WSL could widen the window.

Possible fix: when the boundary is the local send time, allow tolerance for second-granular transcript clocks (e.g. compare against Math.floor(sentAt / 1000) * 1000, or a small skew allowance).

@sojiro-o

sojiro-o commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Filed the duplicate first-message bug as #25116, with a fix against main in #25117 (whole-second transcript rows now match the first send). It's independent of this PR, but this PR is what makes it reachable.

nwparker and others added 3 commits October 3, 2026 18:10
Preserves accepted Antigravity Chat source from @haoliangli (#15773) and @sojiro-o (#24141).
Carries runtime-owned Chat association and authoritative ruled-screen publication onto fixed main 752871b.
Antigravity records first turns at whole seconds, leaving a millisecond
composer echo visible below later turns. Publish optional source precision
and use it when matching local sends and seeded launch prompts; retain strict
transcript boundaries and exact matching when precision is absent.

Credits @sojiro-o/#25117 for the first-send diagnosis and proposed regression.
Retains the Antigravity Chat contributions from @haoliangli/#15773 and
@sojiro-o/#24141 without changing accepted readiness or capture assets.

Co-authored-by: sojiro-o <53679703+sojiro-o@users.noreply.github.com>
Compose main 2b3b692 with the
complete Chat feature and ed05 source-clock repair. Preserve provider step
order and incoming split-reasoning order; remove a duplicated import
introduced by the automatic merge and test the combined ordering contract.

Retains credits for @sojiro-o/#25117 and #24141 and @haoliangli/#15773;
original author objects and measured coauthor trailers remain unchanged.
@nwparker
nwparker marked this pull request as draft October 4, 2026 07:48
@nwparker nwparker changed the title Add terminal-backed Antigravity Chat and command approvals Add terminal-backed Antigravity Chat and reconcile first-send echoes Oct 4, 2026
@nwparker nwparker changed the title Add terminal-backed Antigravity Chat and reconcile first-send echoes Add Antigravity Chat, reconcile first sends, and fix native-build test race Oct 4, 2026
@nwparker nwparker changed the title Add Antigravity Chat, reconcile first sends, and fix native-build test race Add Antigravity Chat and fix first-send and native-build lifecycle regressions Oct 4, 2026
@nwparker

nwparker commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded: Antigravity Chat shipped on the ACP server path (#28595) instead of this terminal-transcript design.

@nwparker nwparker closed this Nov 6, 2026
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.

2 participants