Security/UI Bug: Composer undo stack leaks draft text across conversations (Cross-Chat Ctrl+Z)

,

Summary

There is a frontend state leakage issue in the Antigravity composer. When draft text is cut (Ctrl+X) in one conversation and you switch to another conversation, pressing Ctrl+Z (Undo) restores the cut text from the previous conversation into the active conversation’s input field.

Environment

  • Antigravity Version: v2.17.0
  • OS: Windows 10 Pro
  • Client: Desktop App & Web Client

Steps to Reproduce

  1. Open Conversation A.
  2. Type some draft text into the composer input field.
  3. Select the text and cut it with Ctrl+X (input becomes empty).
  4. Switch to Conversation B using the left sidebar.
  5. In Conversation B’s empty input field, press Ctrl+Z (Undo).

Actual Result

The text previously cut from Conversation A is restored directly into Conversation B’s composer!

Impact & Risk

  1. Violation of the Principle of Least Astonishment: Ctrl+Z is universally expected to be local to the current active view/document.
  2. Accidental Prompt / Secret Contamination: If a user drafts proprietary code, database credentials, or private logic in a private project, decides not to submit and cuts it, switching to a public/different conversation and accidentally pressing Ctrl+Z + Enter can inadvertently leak sensitive data into an unrelated session’s model transcript.

Root Cause & Suggested Fix

The editor component (e.g. ProseMirror / Lexical / Monaco) is reused across conversation switches without resetting its internal UndoManager history stack.

Suggested Fix:

  • Call editor.clearHistory() / reset the undo stack on route/conversation switch (onConversationChange), OR
  • Scope the undo/redo history state per conversation_id.

Hi @mrblackman,

I tried on my end, but the issue is not reproducible. If possible, could you please share a screen recording of the issue you are facing?

Hi @Ambati_Rajendra,

Thanks for testing this out!

To eliminate any ambiguity regarding physical keystrokes or accidental paste commands, I recorded a clean 35-second demonstration using the Windows On-Screen Keyboard so every key press (Ctrl, X, Ctrl, Z) is visually transparent.

Key Observations from the Recording:

  1. OS & Client: Windows 11, Antigravity Desktop App (v2.17.0).
  2. Context: Both conversations exist under the same Project Workspace in the left sidebar.
  3. Sequence:
    • In Conversation A, text is selected and cut using Ctrl+X via the on-screen keyboard (input becomes empty).

    • Switched directly to Conversation B via the left sidebar.

    • Without typing anything, pressing double Ctrl+Z (Undo) immediately restores the text cut from Conversation A into Conversation B.

      I hope that has been clear.