Skip to content

feat(antigravity): history/delete/mark-read + model read/switch#1800

Merged
jackwener merged 2 commits into
jackwener:mainfrom
LeoLin990405:feat/antigravity-mgmt
May 31, 2026
Merged

feat(antigravity): history/delete/mark-read + model read/switch#1800
jackwener merged 2 commits into
jackwener:mainfrom
LeoLin990405:feat/antigravity-mgmt

Conversation

@LeoLin990405
Copy link
Copy Markdown
Contributor

Split from #1797. This PR contains all antigravity-adapter changes.

New commands:

  • opencli antigravity history — list visible conversations from sidebar (data-testid="convo-pill-<uuid>")
  • opencli antigravity mark-read <uuid> — toggle read/unread
  • opencli antigravity delete <uuid> --yes — delete (clicks through confirm dialog)
  • opencli antigravity rename — stub (destructive side effect on incomplete eval; followup needed)

Fix:

  • opencli antigravity model — now supports read (parses aria-label^="Select model, current:") + --list + switch (previously required <name> and could only switch)

Key gotcha: Antigravity menu click triggers a sidebar re-render that destroys eval replies ("Promise was collected" / 30s timeout). The click DOES fire — we catch those specific errors and treat as success-with-note. Verified live by toggling mark-read repeatedly.

Verified live on macOS, Chrome 146, Antigravity Desktop.

@LeoLin990405
Copy link
Copy Markdown
Contributor Author

Antigravity deep-audit summary (commits 42b9d5e6 + 09b6f4a7 + ac35acff)

Live-snapshot of Antigravity (port 9234) revealed 49 visible interactive elements / 28 unique labels on the chat view. After the deep audit pass this PR now ships 22 commands across 4 layers.

Layer Commands
Conversation mgmt send read new history delete rename mark-read watch status dump
Models model (read / list / switch via composer dialog)
Diffs / files extract-code serve (asset/file server) copy-code (per-block, --index pickable)
Per-message actions react (good/bad) copy-message revert
Global UI settings sidebar-toggle nav (back/forward) toggle-aux display-options add-context

Safety patterns:

  • delete --yes, revert --yes gated (workspace-mutating)
  • mark-read toggles based on current state

Known limitation: display-options click fires correctly but Antigravity's menu is a custom Popover (not [role="menu"]), so item enumeration returns EMPTY_RESULT. Click side-effect still happens.

E2E verified: copy-message (real Swift Testing assistant text), copy-code (11 blocks detected, default picks last "./Scripts/lint.sh lint"), all dry-runs clean.

LeoLin990405 added a commit to LeoLin990405/OpenCLI that referenced this pull request May 31, 2026
Cross-surface naming harmonization (matches PR jackwener#1798 Grok / jackwener#1799 Codex /
jackwener#1800 Antigravity):
  storage-* → renderer-side localStorage / sessionStorage (via CDP)
  state-*   → on-disk VSCode state.vscdb (via sqlite3)

Changes:
  - Renamed storage-keys → state-keys + storage-get → state-get
    (these query state.vscdb, kept their behavior 100% identical)
  - Added renderer-storage.js: storage-keys / storage-get / cookies / idb-list
    (CDP-based, query the Electron renderer's LS/SS/cookies/IDB)
  - Added settings.js: settings-read (parse User/settings.json, JSONC-aware)

E2E verified against Leo's Trae SOLO:
  state-keys --filter "AI.agent"  → 3 AI.agent.* keys (renamed, same behavior)
  settings-read                   → 1 key: AI.toolcall.v2.command.allowList

Known limitation: renderer storage-keys / storage-get / cookies / idb-list
return SecurityError on Trae SOLO because Trae's renderer runs under
vscode-file:// scheme with strict sandboxing — opencli's eval context
hits an isolated world without access to the main page's
localStorage/cookies/IndexedDB. Direct CDP probes (bypassing opencli's
session manager) CAN see the data (22 LS keys + @byted/ve-rtc IDB),
but the standard adapter pathway is blocked. Documented as a structural
limitation; the commands are wired correctly and will work on any Trae
build that relaxes the sandbox.

Brings Trae SOLO to 44 commands (38 + 1 settings-read + 4 renderer + 1
state-* alias gap).
@LeoLin990405
Copy link
Copy Markdown
Contributor Author

Update — 9 storage commands (commit `2b61b6f9`) — renderer + VSCode FS state + settings

Antigravity is VSCode-derived, so it has BOTH renderer-side (CDP) state AND the full VSCode FS state.vscdb on disk. This commit wraps both:

Layer Commands
Renderer (4) storage-keys storage-get cookies idb-list
FS state.vscdb (4) state-keys [--workspace] state-get [--workspace] recent-paths workspaces-list
Settings (1) settings-read (JSONC-aware)

E2E verified: state-keys --filter antigravity → 5+ antigravity.notification.* keys (out of 202 in state.vscdb). recent-paths → 5+ folders/files. workspaces-list → 7 workspaces. settings-read → Solarized Light theme, http.proxy, agCockpit.displayMode, tfa.system.autoAccept.

Brings Antigravity to 31 commands.

jackwener pushed a commit to LeoLin990405/OpenCLI that referenced this pull request May 31, 2026
Cross-surface naming harmonization (matches PR jackwener#1798 Grok / jackwener#1799 Codex /
jackwener#1800 Antigravity):
  storage-* → renderer-side localStorage / sessionStorage (via CDP)
  state-*   → on-disk VSCode state.vscdb (via sqlite3)

Changes:
  - Renamed storage-keys → state-keys + storage-get → state-get
    (these query state.vscdb, kept their behavior 100% identical)
  - Added renderer-storage.js: storage-keys / storage-get / cookies / idb-list
    (CDP-based, query the Electron renderer's LS/SS/cookies/IDB)
  - Added settings.js: settings-read (parse User/settings.json, JSONC-aware)

E2E verified against Leo's Trae SOLO:
  state-keys --filter "AI.agent"  → 3 AI.agent.* keys (renamed, same behavior)
  settings-read                   → 1 key: AI.toolcall.v2.command.allowList

Known limitation: renderer storage-keys / storage-get / cookies / idb-list
return SecurityError on Trae SOLO because Trae's renderer runs under
vscode-file:// scheme with strict sandboxing — opencli's eval context
hits an isolated world without access to the main page's
localStorage/cookies/IndexedDB. Direct CDP probes (bypassing opencli's
session manager) CAN see the data (22 LS keys + @byted/ve-rtc IDB),
but the standard adapter pathway is blocked. Documented as a structural
limitation; the commands are wired correctly and will work on any Trae
build that relaxes the sandbox.

Brings Trae SOLO to 44 commands (38 + 1 settings-read + 4 renderer + 1
state-* alias gap).
@jackwener jackwener force-pushed the feat/antigravity-mgmt branch from a69f039 to 526efbd Compare May 31, 2026 14:40
@jackwener jackwener merged commit 203ff56 into jackwener:main May 31, 2026
jackwener pushed a commit to LeoLin990405/OpenCLI that referenced this pull request May 31, 2026
Cross-surface naming harmonization (matches PR jackwener#1798 Grok / jackwener#1799 Codex /
jackwener#1800 Antigravity):
  storage-* → renderer-side localStorage / sessionStorage (via CDP)
  state-*   → on-disk VSCode state.vscdb (via sqlite3)

Changes:
  - Renamed storage-keys → state-keys + storage-get → state-get
    (these query state.vscdb, kept their behavior 100% identical)
  - Added renderer-storage.js: storage-keys / storage-get / cookies / idb-list
    (CDP-based, query the Electron renderer's LS/SS/cookies/IDB)
  - Added settings.js: settings-read (parse User/settings.json, JSONC-aware)

E2E verified against Leo's Trae SOLO:
  state-keys --filter "AI.agent"  → 3 AI.agent.* keys (renamed, same behavior)
  settings-read                   → 1 key: AI.toolcall.v2.command.allowList

Known limitation: renderer storage-keys / storage-get / cookies / idb-list
return SecurityError on Trae SOLO because Trae's renderer runs under
vscode-file:// scheme with strict sandboxing — opencli's eval context
hits an isolated world without access to the main page's
localStorage/cookies/IndexedDB. Direct CDP probes (bypassing opencli's
session manager) CAN see the data (22 LS keys + @byted/ve-rtc IDB),
but the standard adapter pathway is blocked. Documented as a structural
limitation; the commands are wired correctly and will work on any Trae
build that relaxes the sandbox.

Brings Trae SOLO to 44 commands (38 + 1 settings-read + 4 renderer + 1
state-* alias gap).
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