diff --git a/crates/oa-desktop/src/app.rs b/crates/oa-desktop/src/app.rs index a228b69a..e12ccd37 100644 --- a/crates/oa-desktop/src/app.rs +++ b/crates/oa-desktop/src/app.rs @@ -1278,6 +1278,11 @@ impl App { { return Task::none(); } + // A validated preview measurement only retains display state. Do not + // turn each wheel report into source interaction or scan shared boundaries. + if let Message::SourceRename(event @ source_rename::Event::PreviewScrolled(..)) = message { + return self.source_rename_event(event); + } let usage_viewport = self.diagram_reveal_viewport(&message); let window_resized = matches!(&message, Message::WindowResized(_)); // Reject stale measurements before legacy viewport handlers can change diff --git a/crates/oa-desktop/src/app/source_rename/preview_scroll_tests.rs b/crates/oa-desktop/src/app/source_rename/preview_scroll_tests.rs index 0d03c317..98387022 100644 --- a/crates/oa-desktop/src/app/source_rename/preview_scroll_tests.rs +++ b/crates/oa-desktop/src/app/source_rename/preview_scroll_tests.rs @@ -444,10 +444,17 @@ async fn details_remount_restores_wheel_offset_before_any_rescroll() { offset > 10., "real wheel input must move the overflowing fixture" ); + let interaction = app.source_symbols.interaction; + let camera = app.camera_boundary(); + let allocation = app.allocation_boundary(); for message in reports.iter().cloned() { let task = app.update(message); assert_eq!(mounted.execute(&app, task).await, 0); } + assert_eq!(app.source_symbols.interaction, interaction); + assert!(app.camera_boundary() == camera); + assert!(app.allocation_boundary() == allocation); + assert_eq!(evidence(&app), before); assert_eq!( app.source_rename.form.as_ref().unwrap().preview_offset, offset