Skip to content

feat(chat): add Antigravity conversation support - #789

Merged
devswha merged 8 commits into
devswha:mainfrom
infowolfe:feat/agy-chat
Oct 11, 2026
Merged

devswha merged 8 commits into
devswha:mainfrom
infowolfe:feat/agy-chat

Conversation

@infowolfe

Copy link
Copy Markdown
Contributor

Change

Closes #784.

Agy panes currently fall back to terminal text in Chat. This adds a native reader for user messages, assistant text, and expandable tool activity, using the existing conversation API, pager, and UI. Terminal remains available for native commands and approvals; reading Chat makes no model call and requires no hook configuration.

The reader resolves the active store from the selected Agy process's held presence lock. It replays the JSONL ledger and checks the database's active step indices to respect saved rewinds without decoding payloads. History changes invalidate cursors and expanded-output references. The transcript monitor watches the ledger, database, and WAL. An authoritative fallback now hides rejected Chat history even if the subsequent terminal read stalls or fails.

Planner calls and exported tool results remain separate rows because the tested format has no shared call ID. Reasoning, images, child-session expansion, and native approval handling are outside this scope.

Linux was exercised with Agy 1.3.3 and Herdr 0.9.3. The macOS lsof path is implemented but not natively tested; Windows retains Terminal fallback. Please report platform/version failures here; I can follow up with fixes. The database and ledger are separate writes: a rewind-and-regrow completed before observation, or after index eviction/reset, can briefly expose old export text until replacement records arrive. Details and bounded-read limits are in docs/agy-chat.md.

This branch is based directly on upstream main; it does not include or depend on Grok PR #777.

Validation

  • Fast checks: workflow syntax, generated types, typecheck, production build, and unit suite passed (2,558 passed, 8 platform skips, 0 failures).
  • Isolated HTTP and conversation-monitor contracts: 117 passed, covering active-lock discovery, missing/empty stores, ETags, paging conflicts, stale output references, database-only rewind invalidation, and existing push lifecycles.
  • Browser checks passed for Agy rendering and for rejected history disappearing while terminal fallback is pending or fails; late output and pane/machine changes remain isolated.
  • Owned native Agy 1.3.3 history replay matched across cold, warm, and reset reads after saved rewind. Earlier bounded native checks exercised /new, /resume, repeated rewind, graceful restart, and a crash while working.
  • Fictional ledger → real API → production browser capture passed, with user/host labels sanitized. No private transcript, model response, or credential is included in the fixtures or image.

API/browser checks ran on 006aa61; the final amendment adds only the screenshot and compatibility notes. Full integration/browser lanes and native macOS/Windows checks were not run.

Fictional demo, using the existing Chat UI:

Antigravity Chat showing fictional messages and separate expandable tool activity

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f4cfa17d-a4ce-4e51-a6d3-dd4b4a96eb35

📥 Commits

Reviewing files that changed from the base of the PR and between b0e996a and ea08f36.


⛔ Files ignored due to path filters (1)
  • docs/agy-chat.png is excluded by !**/*.png

📒 Files selected for processing (7)
  • CHANGELOG.md
  • docs/guide.md
  • server/api.contract.test.ts
  • server/conversation-monitor.ts
  • server/conversation.ts
  • shared/protocol.ts
  • src/components/ChatView.tsx

🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/guide.md
  • CHANGELOG.md

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



📝 Summary

Summary by CodeRabbit

  • New Features
    • Added experimental native Antigravity chat support, including prompts, responses, expandable tool activity, active-conversation tracking, and rewind-aware history.
    • Falls back to terminal history when native conversation data is unavailable. Windows uses terminal text; macOS support has not been tested.
  • Bug Fixes
    • Chat now clears a rejected conversation immediately while switching to terminal history, even if loading that history is delayed or fails.
  • Documentation
    • Added Antigravity support details, platform behavior, and limitations to the guides.

Walkthrough

Chat can read Antigravity conversations from the active process’s transcript, including paged history and expandable tool output. It also clears rejected conversation history before requesting terminal fallback text.

Changes

Antigravity transcript support

Layer / File(s) Summary
Resolve the active Agy store
server/agy-store.ts, server/conversation.test.ts, docs/agy-chat.md, docs/guide.md
The server identifies the active Agy store from a foreground process and its held presence lock. Tests cover lock selection. Documentation describes identity discovery and platform support.
Project and parse the ledger
server/agy.ts, server/conversation.test.ts, server/conversation-metadata.ts, server/conversation-monitor.ts, docs/agy-chat.md
The reader projects ledger records against active database step indices, parses completed entries, and retrieves generic tool output. Tests cover paging, rewind behavior, incomplete rows, and bounded scans. Monitoring includes database and WAL identities.
Serve Agy conversation pages
server/conversation.ts, shared/protocol.ts, server/api.contract.test.ts, scripts/chat-history-browser-qa.ts, docs/agy-chat.md, docs/guide.md, CHANGELOG.md
The conversation endpoint resolves and pages Agy transcripts, validates the store, and retrieves tool output. API and browser tests cover endpoint responses and rendering. The guide and changelog document the support and its limits.

Rejected conversation fallback

Layer / File(s) Summary
Clear history before terminal fallback
src/components/ChatView.tsx, scripts/chat-history-browser-qa.ts, CHANGELOG.md
When Chat switches from transcript history to scrollback, it clears the old turns and cached response before requesting terminal text. Browser checks cover delayed, successful, and failed reads, stale output requests, recovery, and new-message indicators.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature · Severity of issue fixed: Low

Suggested reviewers: devswha


Merge Risk: ⚪ Minimal · up to ea08f

No merge-blocking issue is established for this change; it is ready for normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 44.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 10 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding Antigravity conversation support to Chat.
Description check Passed The description includes the required Change and Validation sections. It explains the behavior, scope, platform coverage, known limitations, contract tests, browser checks, native testing, and UI evid…
Linked Issues check Passed The changes satisfy the coding requirements in [#784]. resolveAgyStore uses the selected process-held presence lock and rejects ambiguous identity. agy.ts replays the ledger, applies active databa…
Out of Scope Changes check Passed The changes remain within [#784]. Server code implements Agy store discovery, transcript replay, rewind boundaries, paging, output retrieval, monitoring, and fallback behavior. Tests exercise those pa…

Full details: Docstring Coverage

Explanation

Docstring coverage is 44.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 10 files. (2 skipped: 2 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@devswha
devswha merged commit 5280dbe into devswha:main Oct 11, 2026
17 checks passed
devswha added a commit that referenced this pull request Oct 11, 2026
## Change

Supplemental fix for Grok (#777) and Antigravity (#789). Both agents can
write native activity while Herdr reports ready or done, leaving Chat
looking idle and keeping tool rows folded. Chat now shows native turn
activity and opens live tool rows independently of that pane status.
Missing native history gets an explicit notice for either agent.

Grok shows Thinking from thought events and Working from prompts,
messages and tools, clearing on native turn completion. Antigravity
shows Working from the current prompt/tool sequence and clears on a
completed tool-free planner answer. Its individual `DONE` steps are not
mistaken for turn completion; saved reasoning is not presented as live
thinking. Late tool results do not restart completed activity. The Agy
boundaries follow the captured native 1.3.3 sequence, without
interpreting numeric database statuses or decoding payloads.

The shared activity field controls display only. Input delivery, queue
authority, supported builds, process/session binding and Hako's helper
removal remain unchanged. Interrupted or errored turns without a saved
completion can retain the indicator until another native turn or rewind;
Agy completion patterns other than a tool-free planner answer have the
same limitation. See [Grok
limits](https://github.com/infowolfe/herdr-web-ui/blob/fix/grok-native-activity/docs/grok-chat.md)
and [Agy
limits](https://github.com/infowolfe/herdr-web-ui/blob/fix/grok-native-activity/docs/agy-chat.md).

## Validation

- `bun run check fast` on `fa05ac7`: passed workflow syntax, generated
types, application/tooling typecheck, build and 2,695 unit tests (8
skips, 0 failures).

- Isolated Grok and Agy conversation API contracts: 2 passed, covering
activity transitions and HTTP validators alongside existing
session/history/output-reference checks.
- Built-client desktop/mobile checks for both agents: passed, including
activity while Herdr never reports working, live tool rows, completion
and unavailable-history notices. Agy also covers late tool results and a
database-only rewind.
- Agy unit cases follow the native
prompt/context/planner-call/tool-result/final-answer sequence, plus
partial records, unfinished answers, database/export lag, rewind and
cold-cache replay. The new browser script is included in the CI lane.
- The combined API/browser run verified unchanged source; the subsequent
commit adds only the screenshot to that tested source. Full
integration/browser lanes and native Windows checks were not run.

Mobile screenshots from isolated test sessions with fictional messages:

![Grok mobile
activity](https://raw.githubusercontent.com/infowolfe/herdr-web-ui/fix/grok-native-activity/docs/grok-mobile-activity.png)

![Antigravity mobile
activity](https://raw.githubusercontent.com/infowolfe/herdr-web-ui/fix/grok-native-activity/docs/agy-mobile-activity.png)

---------

Co-authored-by: Hako <devswha@gmail.com>
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.

feat(chat): support native Antigravity conversations

2 participants