Editor title-bar auto-expand puts Undo File under the cursor when aiming for Markdown Preview

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Where: Editor, Tab & Chat — editor title bar on Markdown files
What happens: The title-bar action cluster auto-expands and collapses. Preview and Undo File sit next to each other / Undo File appears where Preview was. Clicking Preview often hits Undo File instead, which discards the file.
How often: Multiple times in one session. Latest: reviewing an untracked agent-written pr-*-review-guide.md; intended Preview, hit Undo File, file gone.

Why this is easy to hit: The control set is unstable. Buttons appear/move under the pointer. Preview (safe) and Undo File (destructive) are adjacent. Untracked files have no git history to recover from.
Workaround: Restore from the agent / local history if anything still has the bytes.

Steps to Reproduce

  1. Open an unsaved/untracked Markdown file (agent-created is enough).
  2. Move the pointer toward Preview in the editor title bar.
  3. Wait for (or trigger) the title-bar buttons to expand/collapse.
  4. Click.

Expected Behavior

Preview opens. Layout should not put a destructive action under a click aimed at Preview. Undo File should not be one misclick away from Preview, or should confirm for untracked files.

Actual: Undo File runs. The file is discarded with no useful undo.

Operating System

Linux

Version Information

Linux (WSL2), linux 6.18.33.2-microsoft-standard-WSL2
Cursor 3.20.21 (system setup)

For AI issues: which model did you use?

N/A

Additional Information

Related: preview/review buttons overlapping or shifting

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Phoebus_Chen, thanks for the detailed report, and sorry about the lost file. :frowning:

The Preview / Markdown toggle and the review buttons (Undo File / Keep File, or Keep all changes / Review Next File) share the same row under the tabs. When the agent’s pending changes for that file appear, change, or get resolved, the review buttons are added or removed, and everything in that row shifts, which can put Undo File where Preview was a moment earlier. This is a known issue we’re already tracking, and I’ve added your report to it.

Two things that help in the meantime:

  1. Move the review buttons out of that row entirely: open Cursor Settings, go to General, and set “Review Control Location” to “Island”. Undo File / Keep File then show up in a floating bar inside the editor instead of next to the Markdown toggle.

  2. For a file the agent created, Undo File removes the file itself, so Ctrl+Z won’t bring it back. The content is still in the chat: expand the edit step in the conversation to copy it, or ask the agent to recreate the file. “Local History: Find Entry to Restore” from the Command Palette may also have a snapshot if the file had been saved.

For files that already existed, clicking into the file and pressing Ctrl+Z right after an accidental Undo File restores the changes.