Skip to content

Feature: Undo (Ctrl+Z) support for manual canvas actions #95

Description

@crewletapp

Problem

When a user manually deletes a component on the canvas, there is no way to undo the action. The canvas currently has no undo/redo stack for manual edits — Ctrl+Z / Cmd+Z is not wired up for canvas interactions.

The only recovery path today is:

  • Roll back via version history (only captures AI-driven changes, not manual edits)
  • Re-describe the component in chat and ask Claude to recreate it

This is a poor UX, especially for accidental deletions.

Proposed Solution

Implement an undo/redo stack for manual canvas actions, with keyboard shortcuts:

  • Ctrl+Z / Cmd+Z → Undo last action
  • Ctrl+Shift+Z / Cmd+Shift+Z → Redo

Actions that should be undoable:

  • Component deletion
  • Component moves / repositioning
  • Any other direct canvas manipulations

Notes

  • The backend already has a robust version history and rollback system (DraftHistoryService) for AI-generated changes — this request is specifically for client-side undo of manual canvas edits
  • The canvas keyboard handler in apps/frontend/components/workspace/canvas/index.tsx is the right place to wire up the shortcut
  • A simple in-memory undo stack (e.g. using a state array of canvas snapshots) would likely be sufficient for a first pass

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions