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

**URL:** <https://discuss.ai.google.dev/t/security-ui-bug-composer-undo-stack-leaks-draft-text-across-conversations-cross-chat-ctrl-z/184779>\
**Category:** Google Antigravity\
**Tags:** bug, ui\
**Created:** [September 25, 2026, 4:03am UTC](https://discuss.ai.google.dev/t/security-ui-bug-composer-undo-stack-leaks-draft-text-across-conversations-cross-chat-ctrl-z/184779 "2026-09-25T04:03:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrblackman](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/mrblackman/32/152680_2.png) [@mrblackman](https://discuss.ai.google.dev/u/mrblackman)\
**Post date:** [September 25, 2026, 4:03am UTC](https://discuss.ai.google.dev/t/security-ui-bug-composer-undo-stack-leaks-draft-text-across-conversations-cross-chat-ctrl-z/184779/1 "2026-09-25T04:03:16Z")

</div>

### 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`.

---

<div class="post-metadata">

**Author:** ![Ambati\_Rajendra](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/ambati_rajendra/32/31584_2.png) [@Ambati\_Rajendra](https://discuss.ai.google.dev/u/Ambati_Rajendra)\
**Post date:** [September 25, 2026, 5:44pm UTC](https://discuss.ai.google.dev/t/security-ui-bug-composer-undo-stack-leaks-draft-text-across-conversations-cross-chat-ctrl-z/184779/2 "2026-09-25T17:44:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mrblackman](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/mrblackman/32/152680_2.png) [@mrblackman](https://discuss.ai.google.dev/u/mrblackman)\
**Post date:** [September 25, 2026, 10:34pm UTC](https://discuss.ai.google.dev/t/security-ui-bug-composer-undo-stack-leaks-draft-text-across-conversations-cross-chat-ctrl-z/184779/3 "2026-09-25T22:34:32Z")

</div>

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.

> **[Recording 2026-09-26 011645.mp4](https://drive.google.com/file/d/1yooISVG-a82gKb5cttd4ND-EYRWFSA8I/view?usp=sharing)**
>
> Google Drive file.

### 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.
