From efa3c8758cab856d2dca0558c51a7cb1297108d5 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 27 Nov 2026 06:01:14 +0000 Subject: [PATCH] red-fw-3: framework batch trial fixes Written by a Codex red fixer; committed by the lead (see runs/codex/red-fw-3.md). Co-Authored-By: Claude Opus 5.5 --- crates/ui-canvas/tests/it/canvas/scrollbars.rs | 11 ++++++----- crates/ui-canvas/tests/it/canvas/tools.rs | 2 +- crates/ui-contract/tests/it/runtime/focus.rs | 2 +- crates/ui-widgets/tests/it/notices.rs | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/crates/ui-canvas/tests/it/canvas/scrollbars.rs b/crates/ui-canvas/tests/it/canvas/scrollbars.rs index 0c316effd9..8b3e6c7dbd 100644 --- a/crates/ui-canvas/tests/it/canvas/scrollbars.rs +++ b/crates/ui-canvas/tests/it/canvas/scrollbars.rs @@ -532,7 +532,8 @@ fn a_fitted_document_shows_no_bar_and_a_zoomed_one_shows_its_overflowing_axes() let mut next = view.get(); next.zoom = 0.75; view.set(next); - fixture.frame(vec![]); + // Pointer-only parts are read from the previous pass's shape record. + fixture.idle(2); assert!(fixture.part_rect(id.get(), horizontal).is_some(), "zooming past the width shows the horizontal bar"); assert!(fixture.part_rect(id.get(), vertical).is_none(), "the fitting height has no bar"); assert!(fixture.part_rect(id.get(), corner).is_none(), "one bar has no corner"); @@ -541,7 +542,7 @@ fn a_fitted_document_shows_no_bar_and_a_zoomed_one_shows_its_overflowing_axes() next.zoom = 1.5; next.aspect = 0.25; view.set(next); - fixture.frame(vec![]); + fixture.idle(2); assert!(fixture.part_rect(id.get(), horizontal).is_none(), "the narrow pixel aspect fits horizontally"); assert!(fixture.part_rect(id.get(), vertical).is_some(), "the height alone overflows"); assert!(fixture.part_rect(id.get(), corner).is_none(), "the vertical bar alone has no corner"); @@ -550,7 +551,7 @@ fn a_fitted_document_shows_no_bar_and_a_zoomed_one_shows_its_overflowing_axes() next.aspect = 1.0; next.zoom = 2.0; view.set(next); - fixture.frame(vec![]); + fixture.idle(2); assert!(fixture.part_rect(id.get(), horizontal).is_some() && fixture.part_rect(id.get(), vertical).is_some(), "both overflowing axes show"); assert!(fixture.part_rect(id.get(), corner).is_some(), "two document bars share a corner"); let thumb = fixture.part_rect(id.get(), horizontal.at(THUMB)).expect("the horizontal thumb"); @@ -559,11 +560,11 @@ fn a_fitted_document_shows_no_bar_and_a_zoomed_one_shows_its_overflowing_axes() fitted.zoom = 0.4; fitted.center = doc.center(); view.set(fitted); - fixture.frame(vec![]); + fixture.idle(2); assert!(fixture.part_rect(id.get(), horizontal).is_some(), "the held thumb keeps its bar when the host fits the document"); assert!(fixture.part_rect(id.get(), vertical).is_none(), "an unheld axis follows the fit"); assert!(fixture.part_rect(id.get(), corner).is_none(), "a held bar alone has no corner"); - fixture.frame(vec![pointer::release(thumb.center())]).frame(vec![]); + fixture.frame(vec![pointer::release(thumb.center())]).idle(2); assert!(fixture.by_role(Role::SCROLL_BAR).is_empty(), "releasing the thumb lets the fitted bar disappear"); } diff --git a/crates/ui-canvas/tests/it/canvas/tools.rs b/crates/ui-canvas/tests/it/canvas/tools.rs index 36dfa0b147..d61360713b 100644 --- a/crates/ui-canvas/tests/it/canvas/tools.rs +++ b/crates/ui-canvas/tests/it/canvas/tools.rs @@ -223,7 +223,7 @@ fn edge_to_edge_fitting_fills_within_the_scoped_zoom_room_and_preserves_editor_f }, ); }); - fixture.ctx().set_pixels_per_point(ppp); + fixture.pixels_per_point(ppp); fixture.room(room.size()).settle(); let initial = view.get(); assert!(zoom::device(&initial, ppp) <= scheme.max_device(), "initial fitting stays inside the scope's ceiling"); diff --git a/crates/ui-contract/tests/it/runtime/focus.rs b/crates/ui-contract/tests/it/runtime/focus.rs index 6936b780f3..09c851e217 100644 --- a/crates/ui-contract/tests/it/runtime/focus.rs +++ b/crates/ui-contract/tests/it/runtime/focus.rs @@ -26,7 +26,7 @@ fn any_focus_includes_framework_and_foreign_widgets() { let observed = Cell::new(false); let mut text = String::new(); let mut show = |ui: &mut Ui| { - let response = Probe::new(&seen).sense(Sense::CLICK | Sense::FOCUS).id_salt("control").show(ui); + let response = Probe::new(&seen).sense(Sense::CLICK | Sense::FOCUS | Sense::TAKE_FOCUS).id_salt("control").show(ui); control.set(response.rect); let field = ui.add(egui::TextEdit::singleline(&mut text)); foreign.set(field.rect); diff --git a/crates/ui-widgets/tests/it/notices.rs b/crates/ui-widgets/tests/it/notices.rs index 171db37155..6225f793be 100644 --- a/crates/ui-widgets/tests/it/notices.rs +++ b/crates/ui-widgets/tests/it/notices.rs @@ -257,7 +257,7 @@ fn context_free_notices_wait_for_show_and_use_the_silenced_keys_at_delivery() { ui.ctx().request_discard("deliver notices across two layout passes"); } }); - fixture.room(Vec2::new(800.0, 600.0)).settle(); + fixture.room(Vec2::new(800.0, 600.0)).motion(craft_behavior::MotionMode::Off).settle(); let delivered = "Background export complete"; let suppressed = "Background format reminder";