Fix regression module path and isolate live drawing context admission

This commit is contained in:
2026-09-23 22:30:11 -07:00
parent 44217307f9
commit 72b1bb7aa7
2 changed files with 9 additions and 0 deletions
@@ -2,6 +2,7 @@ use super::*;
use crate::app::multiselect::{self, Choice};
use crate::diagram_usage::Target as SelectionTarget;
#[path = "group/connection_lifetime.rs"]
mod connection_lifetime;
struct Group {
@@ -198,6 +198,14 @@ fn captured_connection_context_mismatches_preserve_the_current_session() {
assert_eq!(g.f.app.connection.as_ref().unwrap().context, current);
assert_captured_noop(&mut g.f.app, captured, g.y);
}
// Captured/session contexts agree, but the rendered view has advanced.
// This isolates the live-route predicate from session ownership.
g.f.app.canvas_epoch += 1;
assert_ne!(g.f.app.route_context(), Some(current));
assert_eq!(g.f.app.connection.as_ref().unwrap().context, current);
assert_captured_noop(&mut g.f.app, current, g.y);
g.f.app.canvas_epoch = current.epoch;
// Conversely, incoming/current contexts agree. Retain obsolete session
// metadata explicitly to isolate the session-context admission branch.
g.f.app.connection.as_mut().unwrap().context.epoch += 1;