Undo/redo module

Aperta
#33 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
typescript

Direzione di ricerca

This issue names no files or tests. Start by reading the kernel module API in blocked issue #28 and tracing the write pipeline's undo-snapshot/emit stage. Done means atomic batches, including dependency cascades, undo and redo together; stack state updates reactively; and removing the module lets its code tree-shake from the bundle.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Parent

https://github.com/TanStack/time/issues/25

What to build

Extract undo/redo into a proper module that wraps atomic write batches, not individual field mutations. A single user action (e.g. move event + cascaded dependent shifts) is undone as one step — not as a sequence of individual commits.

Acceptance criteria

  • `UndoRedoModule` plugs into the kernel via the module API (#28), hooking the `undo-snapshot/emit` stage of the write pipeline
  • `undo()` reverses the most recent atomic batch (all events in the batch revert together)
  • `redo()` re-applies a reversed batch
  • `canUndo()` / `canRedo()` reflect the current stack state reactively
  • A dependency cascade (move + N propagated dependents) is treated as one batch — one `undo()` call reverses it entirely
  • Removing the `UndoRedoModule` causes undo/redo code to tree-shake out of the bundle

Blocked by

https://github.com/TanStack/time/issues/28

Lingua principale
TypeScript
Stelle
620
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/time

Tutte le issue di TanStack/time

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.