Undo and multi-window sync (#26) #72

Merged
crowmaki merged 1 commit from issue-26-undo-multi-window into main 2026-10-07 09:56:55 +00:00
Owner

Closes #26. Part of #24.

Stacked PR. Review and merge in order: #26 → #27 → #28 → #29 → #30 → #31 → #32. Each PR targets the branch of the one before it.

What

  • In-memory undo/redo log per Project in studio-core (undo.rs): an Edit trait (apply / revert / changes), redo cleared on a new edit, depth bounded at 200. Append-only operations have no Edit, so they cannot enter the log.
  • Title and aspect ratio edits are undoable. Same-value edits are no-ops.
  • Each mutation records a Change { kind, ids }. The adapter's mutate drains the changes and emits a changed event to every window.
  • open_window opens a second window on the same ProjectSession. The UI refetches on changed.
  • UI: title editing, Undo/Redo buttons with labels and keyboard shortcuts, New window.

Tests

tests/undo.rs and a new adapter smoke test with stub hooks.

Checks

  • cargo test --workspace --all-features, cargo clippy --workspace --all-targets --all-features -- -D warnings and bun run check pass.
  • The Svelte UI is type-checked only. It has not been run in the app.
Closes #26. Part of #24. > **Stacked PR.** Review and merge in order: #26 → #27 → #28 → #29 → #30 → #31 → #32. Each PR targets the branch of the one before it. ## What - In-memory undo/redo log per Project in `studio-core` (`undo.rs`): an `Edit` trait (apply / revert / changes), redo cleared on a new edit, depth bounded at 200. Append-only operations have no `Edit`, so they cannot enter the log. - Title and aspect ratio edits are undoable. Same-value edits are no-ops. - Each mutation records a `Change { kind, ids }`. The adapter's `mutate` drains the changes and emits a `changed` event to every window. - `open_window` opens a second window on the same `ProjectSession`. The UI refetches on `changed`. - UI: title editing, Undo/Redo buttons with labels and keyboard shortcuts, New window. ## Tests `tests/undo.rs` and a new adapter smoke test with stub hooks. ## Checks - `cargo test --workspace --all-features`, `cargo clippy --workspace --all-targets --all-features -- -D warnings` and `bun run check` pass. - The Svelte UI is type-checked only. It has not been run in the app.
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
crowmaki deleted branch issue-26-undo-multi-window 2026-10-07 09:57:02 +00:00
Sign in to join this conversation.
No description provided.