Skip to content

Lock the edit while a video saves - #58

Merged
faetalize merged 1 commit into
masterfrom
fix/54-lock-edit-during-export
Nov 3, 2026
Merged

faetalize merged 1 commit into
masterfrom
fix/54-lock-edit-during-export

Conversation

@faetalize

Copy link
Copy Markdown
Owner

Summary

  • Saving an exported video locks the edit until the export finishes, so changes made meanwhile can't be lost when the editor reopens the replaced video.
  • Locking covers Save, Save & close, Save copy & close and Export a copy. Copy to a new file doesn't lock, since it never replaces the opened video.
  • While locked, the tools and crop mode are off, undo and redo are disabled, and timeline edges and blocks can't be dragged. Playback, scrubbing, selecting and zoom still work.
  • The lock lives in the edit model, so every change path (including undo, redo and drags) is refused, not only the ones the UI disables.
  • Closes edits made during a video export are lost #54

Testing

  • New unit test /video-edit/locked checks that every edit operation, undo and redo are refused while locked, and that the state is unchanged. It also checks that edits work again after unlocking.
  • The new test failed before the fix (a locked edit still offered redo) and passes after it.
  • Full suite: 14 of 14 pass.
  • Not covered by automated tests: the editor locking and unlocking around a real export, and the greyed-out UI. These need a manual check. Start a Save on a longer video, try to edit while it runs, and confirm everything returns when it finishes.
  • Known gap: in Save copy & close, the edit unlocks just before the clipboard step if the copy fails.

When an export replaces the opened video the editor opens it again, so an edit made while it ran was thrown
away. Every export that saves now locks the edit until it is done: the tools are greyed out, crop mode is left,
undo and redo are off, and the timeline's edges and blocks can't be dragged. Playback and selecting still work.

It locks on every saving export rather than only on Save, because Export a copy can land on the opened video
too, picked in the file dialog or through a link to it, and that is only known once the export is in place.
Copy never replaces the opened video, so editing carries on through it.

The lock sits in the edit itself, so every way of changing it is refused, not only the ones the UI greys out.

Closes #54
@faetalize
faetalize merged commit 60257fb into master Nov 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

edits made during a video export are lost

1 participant