Agent apply-edits (Review / Apply / Undo)
ACE applies Agent file mutations through a Review modal and an undo stack.
Flow
- Agent returns structured actions (
create_file,apply_edit,write_full_file,delete_file). - With Auto-apply off, the proposed-change card shows Review & Apply.
- Review modal:
- Apply — every proposed change
- Apply Selected — only checked rows
- Cancel — no disk writes
- After apply, open Monaco tabs reload from disk.
- Undo restores the first pre-apply backup per file (not intermediate rewrites).
Reliability notes
- Undo backups are deduped by absolute path; the first content snapshot wins.
- Review buttons disable while an apply cycle is in flight.
- The Review overlay uses a high z-index so it is not trapped under the Assistant panel.
Sample
See desktop-ide/samples/phase3-apply-edits/.
