Skip to content

annotator: full command-log store — execute/undo/redo, command grouping, commit-on-release for drags #39

Description

@JArmandoAnaya

Context

Undo/redo is a day-one foundation of the engine store, not a retrofit (vision doc decision
17). The bootstrap left execute/undo/redo signatures with one no-op test.

Deliverables

  • Command interface (apply/invert or do/undo pair — decide, document) + log with
    cursor; redo stack invalidated on new commands.
  • Command grouping/transactions (a polygon vertex drag = one undo step).
  • Commit-on-release: transient drag state lives outside the log; only pointer-up commits a
    command (kills v1's re-render-per-pointer-move).
  • Store is framework-free and subscribable (adapter-agnostic change notifications).

Acceptance criteria

  • Property test: random command sequences + full undo returns the initial document
  • Grouped commands undo atomically
  • No document mutation during simulated drag until release

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendannotator / ui-core / app packagesm4M4 — Headless annotator (0.0.1-alpha.4)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions