Summary
Add a regression test that pins the M7e "recall a Scene does not dirty the document" invariant. The behavior is implemented correctly today, but no test guards it — a future change could silently route recall through the command stack (or add a stray dirty call) without any test failing.
Found during the M7e (v0.2.5) final whole-branch review. Non-blocking.
Detail
Recalling a Scene (MainWindow._on_recall_view) applies tag visibility + render style instantly and tweens only the camera; it deliberately does NOT go through CommandStack and does NOT mark the document dirty (a view change is not a document edit). The final review verified this holds concretely, but tests/test_main_window_scenes.py has no assertion for it.
Suggested test
In tests/test_main_window_scenes.py, add something like:
def test_recall_does_not_dirty_document(qtbot):
win = _make_window(qtbot)
win._on_create_view()
vid = win._model.views.views()[0].id
win._doc_controller.mark_clean() # start from a clean state
undo_before = win._command_stack.can_undo
win._on_recall_view(vid)
assert win._doc_controller.dirty is False # recall must not dirty
assert win._command_stack.can_undo == undo_before # recall must not touch the stack
win._view_animator.cancel()
(Adjust to the actual DocumentController / CommandStack API names.)
Context
- Milestone: M7e (Scenes / saved views), shipped v0.2.5.
- Design:
docs/2026-07-22-M7e-scenes-design.md.
Summary
Add a regression test that pins the M7e "recall a Scene does not dirty the document" invariant. The behavior is implemented correctly today, but no test guards it — a future change could silently route recall through the command stack (or add a stray dirty call) without any test failing.
Found during the M7e (v0.2.5) final whole-branch review. Non-blocking.
Detail
Recalling a Scene (
MainWindow._on_recall_view) applies tag visibility + render style instantly and tweens only the camera; it deliberately does NOT go throughCommandStackand does NOT mark the document dirty (a view change is not a document edit). The final review verified this holds concretely, buttests/test_main_window_scenes.pyhas no assertion for it.Suggested test
In
tests/test_main_window_scenes.py, add something like:(Adjust to the actual
DocumentController/CommandStackAPI names.)Context
docs/2026-07-22-M7e-scenes-design.md.