Compare commits

..
300 changed files with 34597 additions and 6904 deletions
+4 -54
View File
@@ -210,6 +210,7 @@ impl SemanticPlan {
pub fn project(&self) -> &Project {
&self.candidate
}
#[cfg(test)]
pub fn index(&self) -> &ViewIndex {
&self.index
}
@@ -484,57 +485,6 @@ pub struct PresentationContext {
pub target: Option<TargetPresentation>,
}
impl PresentationContext {
fn header_visible(self, header: Rect, outgoing: bool) -> bool {
if !outgoing {
return self.viewport.contains(header);
}
// Leaving a performer must not require fitting the entire work card
// inside the camera. Retain a 24px grab region so the result stays
// directly reachable; geometry/model admission is independent.
let width = (header.position.x + header.size.width)
.min(self.viewport.position.x + self.viewport.size.width)
- header.position.x.max(self.viewport.position.x);
let height = (header.position.y + header.size.height)
.min(self.viewport.position.y + self.viewport.size.height)
- header.position.y.max(self.viewport.position.y);
width * self.zoom >= 24. && height * self.zoom >= 24.
}
}
#[test]
fn outgoing_header_retains_a_grab_region_without_requiring_full_camera_containment() {
let context = PresentationContext {
viewport: Rect {
position: Position { x: 0., y: 0. },
size: Size {
width: 800.,
height: 400.,
},
},
zoom: 0.75,
target: None,
};
let mut header = Rect {
position: Position { x: -100., y: 30. },
size: Size {
width: 224.,
height: 62.,
},
};
assert!(context.header_visible(header, true));
assert!(!context.header_visible(header, false));
header.position.x = -192.; // exactly 32 world pixels = 24 logical pixels
assert!(context.header_visible(header, true));
header.position.x -= 1.;
assert!(!context.header_visible(header, true));
header.position.x = 0.;
header.position.y = 368.;
assert!(context.header_visible(header, true));
header.position.y += 1.;
assert!(!context.header_visible(header, true));
}
#[derive(Debug)]
pub struct PlacementPlan {
pub diagram: Diagram,
@@ -546,8 +496,8 @@ pub struct PlacementPlan {
commands: Vec<Command>,
}
/// `requested` preserves the frozen pointer offset unless the caller proposes
/// bounded outward clearance for an outgoing drop. Snap only
/// `requested` is the original selected placement position plus pointer motion
/// in the frozen transform (therefore preserving the press offset). Snap only
/// this root; apply the resulting identical delta to captured Q and its routes.
/// No whole Project clone, validator or semantic ViewIndex rebuild occurs here.
pub fn place(
@@ -627,7 +577,7 @@ pub fn place(
height: selected.size.height.min(62.),
},
};
if !presentation.header_visible(header, plan.destination == Destination::OutsidePerformers) {
if !presentation.viewport.contains(header) {
return Err(Refusal::LayoutRequired(
"Make room or adjust the view, then drag again.".into(),
));
@@ -188,7 +188,7 @@ pub fn place(
};
geometry::check_rigid(&plan.before_expanded, &expanded, &plan.placements, delta)?;
scenes?;
geometry::check_headers(&view, &plan.selected, presentation, false)?;
geometry::check_headers(&view, &plan.selected, presentation.viewport)?;
Ok(PlacementPlan {
diagram,
view,
@@ -398,12 +398,7 @@ pub fn place(
&expanded,
)?;
geometry::check_rigid(&scope.0.before_expanded, &expanded, scope.affected(), delta)?;
geometry::check_headers(
&view,
scope.selected(),
presentation,
plan.destination == Destination::OutsidePerformers,
)?;
geometry::check_headers(&view, scope.selected(), presentation.viewport)?;
Ok(PlacementPlan {
diagram,
view,
@@ -170,8 +170,7 @@ pub(super) fn check_rigid(
pub(super) fn check_headers(
view: &ProjectedView,
selected: &BTreeMap<Id, Id>,
presentation: PresentationContext,
outgoing: bool,
viewport: Rect,
) -> Result<(), Refusal> {
for (id, element) in selected {
let node = view
@@ -186,7 +185,7 @@ pub(super) fn check_headers(
height: node.size.height.min(62.),
},
};
if !presentation.header_visible(header, outgoing) {
if !viewport.contains(header) {
return Err(Refusal::LayoutRequired(
"Make room or adjust the view, then drag again.".into(),
));
+97 -1
View File
@@ -6,6 +6,8 @@ mod architecture_authoring_tests;
mod behavior_removal_tests;
mod checkpoints;
#[cfg(test)]
mod context_help_tests;
#[cfg(test)]
mod diagram_focus_tests;
pub(crate) mod diagram_removal;
#[cfg(test)]
@@ -376,6 +378,10 @@ pub enum Message {
ExactStrings(bool),
Page(Page),
Guide(crate::guide::Event),
ContextHelp(crate::guide::Topic),
CloseContextHelp,
ContextHelpScroll(crate::guide::ContextScroll),
Help,
Traceability(crate::views::traceability::Event),
ReviewLayerTraces,
Behavior(crate::behavior::Event),
@@ -521,6 +527,7 @@ pub struct App {
/// Home resumes this page; explicit Architecture navigation remains separate.
last_workspace_page: Page,
pub guide: crate::guide::State,
pub context_help: bool,
pub traceability: crate::views::traceability::State,
pub behavior: crate::behavior::State,
pub data_state: crate::data_view::State,
@@ -643,6 +650,7 @@ impl App {
page: Page::Diagram,
last_workspace_page: Page::Diagram,
guide: crate::guide::State::default(),
context_help: false,
traceability: Default::default(),
behavior: Default::default(),
data_state: Default::default(),
@@ -1294,6 +1302,11 @@ impl App {
iced::time::every(std::time::Duration::from_secs(10)).map(|_| Message::CheckpointTick),
window::close_requests().map(|id| Message::Request(Pending::Close(id))),
window::resize_events().map(|(_, size)| Message::WindowResized(size)),
if self.context_help {
iced::event::listen_with(crate::guide::context_scroll_key)
} else {
Subscription::none()
},
iced::event::listen_with(|event, _, _| {
matches!(
event,
@@ -1320,7 +1333,7 @@ impl App {
return Some(Message::Escape);
}
if key == keyboard::Key::Named(keyboard::key::Named::F1) {
return Some(Message::Page(Page::Guide));
return Some(Message::Help);
}
if key == keyboard::Key::Named(keyboard::key::Named::F3) {
return Some(Message::SourceNavigation(
@@ -1348,6 +1361,55 @@ impl App {
])
}
pub fn update(&mut self, message: Message) -> Task<Message> {
if let Message::ContextHelpScroll(scroll) = message {
return if self.context_help {
crate::guide::context_scroll_task(scroll)
} else {
Task::none()
};
}
// Help owns user input before any canvas/reference fast path can act.
// Passive results may finish; they retain their normal lifetime checks.
if self.context_help
&& !matches!(
message,
Message::Guide(_)
| Message::CloseContextHelp
| Message::Escape
| Message::Request(Pending::Close(_))
| Message::CheckpointWritten(..)
| Message::CheckpointTick
| Message::CheckpointLoaded(..)
| Message::WindowResized(_)
| Message::CanvasResized(_)
| Message::DiagramRevealViewport(..)
| Message::SourceViewport(_)
| Message::Lint(_)
| Message::Linted(..)
| Message::Saved(_)
| Message::Hosted(crate::hosted::Event::Completed(..))
| Message::Loaded(_)
| Message::IncludesLoaded(..)
| Message::SavePath(_)
| Message::SourceRecovered(_)
| Message::Exported(_)
| Message::SourceSymbolsReady(_)
| Message::SourceRenameReady(_)
| Message::DiagramUsagesReady(_)
| Message::ScenarioCanvas(
behavior::scenario::CanvasEvent::Scrolled(..)
| behavior::scenario::CanvasEvent::Restored(..)
| behavior::scenario::CanvasEvent::Viewport(..)
)
| Message::TopologyCanvas(
behavior::topology::CanvasEvent::Scrolled(..)
| behavior::topology::CanvasEvent::Viewport(..)
)
| Message::StateDiagram(behavior::state_edit::Event::Viewport(..))
)
{
return Task::none();
}
let preview_read_only = self.process_preview_primary().is_some();
let selection_boundary = self.multiselect_boundary();
// Reject delayed gestures before they can retire newer input ownership.
@@ -1900,6 +1962,10 @@ impl App {
message,
Message::Escape | Message::Request(Pending::Close(_))
) {
if self.context_help {
self.context_help = false;
return Task::none();
}
if self.hosted.visible {
self.hosted.visible = false;
return Task::none();
@@ -2091,6 +2157,7 @@ impl App {
}
pub(crate) fn scenario_focus_owner(&self) -> Option<crate::behavior::scenario::focus::Stamp> {
if self.busy
|| self.context_help
|| self.hosted.visible
|| self.workflow.is_some()
|| self.architecture.is_some()
@@ -2787,6 +2854,35 @@ impl App {
);
}
}
Message::ContextHelp(topic) => {
self.guide.update(crate::guide::Event::Topic(topic));
self.context_help = true;
return iced::widget::operation::snap_to(
crate::guide::ARTICLE_SCROLL_ID,
iced::widget::scrollable::RelativeOffset::START,
);
}
Message::CloseContextHelp => {
self.context_help = false;
}
Message::ContextHelpScroll(_) => {}
Message::Help => {
let topic = match self.page {
Page::Diagram => Some(crate::guide::Topic::Nesting),
Page::Behavior => self.behavior.active_owner.and_then(|id| {
self.project()
.elements
.get(&id)
.map(|element| match element.kind() {
Kind::StateMachine => crate::guide::Topic::States,
Kind::Scenario => crate::guide::Topic::Scenarios,
_ => crate::guide::Topic::Chains,
})
}),
_ => None,
};
return self.update(topic.map_or(Message::Page(Page::Guide), Message::ContextHelp));
}
Message::ExactStrings(enabled) => {
if let Some(d) = &mut self.draft {
match d.set_exact(enabled) {
+13 -42
View File
@@ -14,10 +14,9 @@ use std::{
sync::Arc,
};
mod clearance;
pub const FINISH_EDIT: &str =
"Finish or cancel the current edit before selecting or moving elements.";
const ARRANGE_ARMED: &str = "Arrange next drag armed · presentation only · Esc cancels";
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Stamp {
@@ -58,7 +57,6 @@ pub struct Target {
#[derive(Debug, Clone)]
pub struct Frozen {
pub targets: Vec<Target>,
pub moving: Vec<Rectangle>,
cards: Vec<Rectangle>,
controls: Vec<Rectangle>,
edges: Vec<(Point, Point)>,
@@ -85,16 +83,14 @@ impl Frozen {
) -> Self {
let mut targets = Vec::new();
let mut cards = Vec::new();
let mut moving = Vec::new();
for n in &view.nodes {
if affected.contains_key(&n.id) {
continue;
}
let region = Rectangle::new(
Point::new(n.position.x, n.position.y),
iced::Size::new(n.size.width, n.size.height),
);
if affected.contains_key(&n.id) {
moving.push(region);
continue;
}
let Some(e) = project.elements.get(&n.element) else {
cards.push(region);
continue;
@@ -177,7 +173,6 @@ impl Frozen {
}
Self {
targets,
moving,
cards,
controls,
edges,
@@ -413,6 +408,7 @@ impl Candidate {
Self::Performers(p) => &p.accepted,
}
}
#[cfg(test)]
pub fn index(&self) -> &view_options::ViewIndex {
match self {
Self::Singleton(p) => p.index(),
@@ -530,8 +526,6 @@ pub(crate) struct Feedback {
pub inspection_targets: Vec<usize>,
pub text: String,
pub refused: bool,
/// Pointer-following outline only; it never authorizes a model change.
pub ghost_delta: Option<Vector>,
}
impl Feedback {
pub fn inspection_identity(&self) -> String {
@@ -642,6 +636,7 @@ impl App {
}
pub(crate) fn allocation_input_owner(&self) -> bool {
self.page == Page::Diagram
&& !self.context_help
&& self
.active_diagram
.and_then(|id| self.project().diagrams.get(&id))
@@ -706,7 +701,12 @@ impl App {
| Message::DiagramUsagesReady(_)
| Message::DiagramRevealViewport(..)
) {
let clear_armed_status =
self.allocation_drag.arrange_next && self.status == ARRANGE_ARMED;
self.allocation_drag.retire();
if clear_armed_status {
self.status = "Arrange cancelled".into();
}
}
}
pub(super) fn allocation_boundary(&self) -> impl PartialEq + use<> {
@@ -848,8 +848,7 @@ impl App {
self.allocation_drag.retire();
if self.allocation_drag_clean() {
self.allocation_drag.arrange_next = true;
self.status =
"Arrange next drag armed · presentation only · Esc cancels".into();
self.status = ARRANGE_ARMED.into();
} else {
self.status = FINISH_EDIT.into();
}
@@ -1062,26 +1061,7 @@ impl App {
viewport: stamp.viewport(), zoom: stamp.zoom,
target: target.map(|i| plan::TargetPresentation { placement: active.frozen.as_ref().unwrap().targets[i].placement }),
};
let exact = candidate.place(requested, presentation);
let placed = if destination == plan::Destination::OutsidePerformers
&& matches!(&exact, Err(plan::Refusal::LayoutRequired(_)))
{
let affected = match &active.prepared {
Prepared::Singleton(scope) => Some(&scope.placements),
Prepared::Assignment(scope) => Some(scope.affected()),
_ => None,
};
affected.and_then(|affected| {
clearance::requests(
(self.project(), self.document.view_index()),
(candidate.project(), candidate.index()), stamp.context.diagram,
affected, *anchor, requested,
(stamp.world(press.start), stamp.world(pointer.unwrap())),
).into_iter().find_map(|position| candidate.place(position, presentation).ok())
}).map_or(exact, Ok)
} else {
exact
}.map_err(|r| refusal(&r))?;
let placed = candidate.place(requested, presentation).map_err(|r| refusal(&r))?;
let label = candidate.label();
if release {
if let Some(command) = candidate.finish(self.project(), &placed).map_err(|r| refusal(&r))? {
@@ -1108,14 +1088,6 @@ impl App {
} else {
let inspection_targets = active.inspection_targets.clone();
let frozen = active.frozen.clone();
// A rejected intermediate position is not a return gesture. Keep the
// last admitted scene and show current motion separately; release
// always recomputes admission and never commits this retained view.
if refused && in_bounds && preview.is_none() {
preview = self.allocation_drag.preview.take();
}
let ghost_delta = (refused && in_bounds)
.then(|| (pointer.unwrap() - press.start) * (1. / stamp.zoom));
self.allocation_drag.active = Some(active);
self.allocation_drag.preview = preview;
self.allocation_drag.feedback = Some(Feedback {
@@ -1126,7 +1098,6 @@ impl App {
inspection_targets,
text,
refused,
ghost_delta,
});
}
}
@@ -1,595 +0,0 @@
//! Bounded outgoing clearance proposals. The ordinary placement and semantic
//! validators still decide whether any proposal may be previewed or committed.
use iced::Point;
use oa_core::{Id, NodePlacement, Position, Project, projection, view_options::ViewIndex};
use std::collections::{BTreeMap, BTreeSet};
const GRID: f32 = 10.;
const GAP: f32 = 10.;
#[derive(Clone, Copy)]
struct Bounds {
left: f32,
top: f32,
right: f32,
bottom: f32,
}
impl Bounds {
fn node(node: &projection::ProjectedNode) -> Option<Self> {
let result = Self {
left: node.position.x,
top: node.position.y,
right: node.position.x + node.size.width,
bottom: node.position.y + node.size.height,
};
([result.left, result.top, result.right, result.bottom]
.iter()
.all(|value| value.is_finite())
&& result.right > result.left
&& result.bottom > result.top)
.then_some(result)
}
fn union(self, other: Self) -> Self {
Self {
left: self.left.min(other.left),
top: self.top.min(other.top),
right: self.right.max(other.right),
bottom: self.bottom.max(other.bottom),
}
}
fn overlaps(self, other: Self) -> bool {
self.left < other.right
&& other.left < self.right
&& self.top < other.bottom
&& other.top < self.bottom
}
}
/// Called only after an OutsidePerformers candidate fails ordinary placement.
/// Coordinates use the frozen world transform. The entire affected footprint
/// receives one anchor translation; this never moves or packs other cards.
pub(super) fn requests(
accepted: (&Project, &ViewIndex),
candidate: (&Project, &ViewIndex),
diagram: Id,
affected: &BTreeMap<Id, NodePlacement>,
anchor: Id,
requested: Position,
motion: (Point, Point),
) -> Vec<Position> {
let (accepted, accepted_index) = accepted;
let (candidate, candidate_index) = candidate;
let (start, pointer) = motion;
if ![
requested.x,
requested.y,
start.x,
start.y,
pointer.x,
pointer.y,
]
.iter()
.all(|value| value.is_finite())
{
return Vec::new();
}
let (Some(original), Some(base), Some(anchor)) = (
accepted.diagrams.get(&diagram),
candidate.diagrams.get(&diagram),
affected.get(&anchor),
) else {
return Vec::new();
};
let snapped = Position {
x: (requested.x / GRID).round() * GRID,
y: (requested.y / GRID).round() * GRID,
};
let delta = Position {
x: snapped.x - anchor.position.x,
y: snapped.y - anchor.position.y,
};
let before = projection::project_diagram_with_index(accepted, original, accepted_index);
let before_nodes: BTreeMap<_, _> = before.nodes.iter().map(|node| (node.id, node)).collect();
let mut sources = BTreeSet::new();
for node in before
.nodes
.iter()
.filter(|node| affected.contains_key(&node.id))
{
let mut parent = node.visual_parent;
let mut seen = BTreeSet::new();
while let Some(id) = parent {
if !seen.insert(id) {
return Vec::new();
}
let Some(node) = before_nodes.get(&id) else {
break;
};
if !affected.contains_key(&id)
&& accepted
.elements
.get(&node.element)
.is_some_and(|element| element.kind().is_performer())
{
sources.insert(id);
}
parent = node.visual_parent;
}
}
if sources.is_empty() {
return Vec::new();
}
// Projection after responsibility removal supplies the former performer's
// remaining enclosure, including other allocated work. Projecting the moved
// block also includes the full visible descendant enclosure of every root.
let mut moved = base.clone();
for (id, captured) in affected {
let Some(node) = moved.nodes.get_mut(id) else {
return Vec::new();
};
node.position = Position {
x: captured.position.x + delta.x,
y: captured.position.y + delta.y,
};
if ![
node.position.x,
node.position.y,
node.size.width,
node.size.height,
]
.iter()
.all(|value| value.is_finite())
{
return Vec::new();
}
}
let after = projection::project_diagram_with_index(candidate, &moved, candidate_index);
let mut footprint: Option<Bounds> = None;
for node in after
.nodes
.iter()
.filter(|node| affected.contains_key(&node.id))
{
let Some(bounds) = Bounds::node(node) else {
return Vec::new();
};
footprint = Some(footprint.map_or(bounds, |previous| previous.union(bounds)));
}
let Some(footprint) = footprint else {
return Vec::new();
};
let mut overlaps = Vec::new();
for node in after.nodes.iter().filter(|node| sources.contains(&node.id)) {
let (Some(old), Some(current)) = (Bounds::node(before_nodes[&node.id]), Bounds::node(node))
else {
return Vec::new();
};
if footprint.overlaps(current) {
overlaps.push((old, current));
}
}
if overlaps.is_empty() {
return Vec::new();
}
// Each entry is a half-plane actually crossed by the pointer. At a corner,
// prefer the boundary reached first on the press-to-pointer segment. The
// direction index is a stable tie-break, independent of placement UUIDs.
let mut crossings = [None::<f32>; 4];
for (old, _) in &overlaps {
for (direction, initial, final_, boundary, outward) in [
(
0,
start.x,
pointer.x,
old.left,
pointer.x < old.left && start.x >= old.left,
),
(
1,
start.x,
pointer.x,
old.right,
pointer.x >= old.right && start.x < old.right,
),
(
2,
start.y,
pointer.y,
old.top,
pointer.y < old.top && start.y >= old.top,
),
(
3,
start.y,
pointer.y,
old.bottom,
pointer.y >= old.bottom && start.y < old.bottom,
),
] {
if outward {
let fraction = (boundary - initial) / (final_ - initial);
if fraction.is_finite() && (0. ..=1.).contains(&fraction) {
crossings[direction] =
Some(crossings[direction].map_or(fraction, |old| old.min(fraction)));
}
}
}
}
let mut directions: Vec<_> = crossings
.into_iter()
.enumerate()
.filter_map(|(direction, fraction)| fraction.map(|fraction| (direction, fraction)))
.collect();
directions.sort_by(|a, b| a.1.total_cmp(&b.1).then(a.0.cmp(&b.0)));
let mut result = Vec::new();
for (direction, _) in directions {
let mut corrected = snapped;
match direction {
0 => {
let edge = overlaps
.iter()
.map(|(_, current)| current.left)
.fold(f32::INFINITY, f32::min);
corrected.x = ((snapped.x + edge - GAP - footprint.right) / GRID).floor() * GRID;
}
1 => {
let edge = overlaps
.iter()
.map(|(_, current)| current.right)
.fold(f32::NEG_INFINITY, f32::max);
corrected.x = ((snapped.x + edge + GAP - footprint.left) / GRID).ceil() * GRID;
}
2 => {
let edge = overlaps
.iter()
.map(|(_, current)| current.top)
.fold(f32::INFINITY, f32::min);
corrected.y = ((snapped.y + edge - GAP - footprint.bottom) / GRID).floor() * GRID;
}
3 => {
let edge = overlaps
.iter()
.map(|(_, current)| current.bottom)
.fold(f32::NEG_INFINITY, f32::max);
corrected.y = ((snapped.y + edge + GAP - footprint.top) / GRID).ceil() * GRID;
}
_ => unreachable!(),
}
if corrected.x.is_finite() && corrected.y.is_finite() && !result.contains(&corrected) {
result.push(corrected);
}
}
result
}
#[cfg(test)]
mod tests {
use super::*;
use crate::allocation_drag as plan;
use oa_core::{Kind, Layer, ProjectionKind, RelationKind, Size};
struct Fixture {
project: Project,
diagram: Id,
performer: Id,
work: Id,
node: Id,
}
fn xy(x: f32, y: f32) -> Position {
Position { x, y }
}
fn fixture(layer: Layer) -> Fixture {
let mut project = Project::empty();
let (performer, work) = match layer {
Layer::Oa => (Kind::Entity, Kind::Activity),
Layer::Sa => (Kind::System, Kind::Function),
};
let performer = project
.add_element(performer, layer, "Performer", None)
.unwrap();
let work = project.add_element(work, layer, "Work", None).unwrap();
let diagram = project.ensure_diagram(layer);
project.diagrams.get_mut(&diagram).unwrap().projection = ProjectionKind::Allocation;
let performer = project.place(diagram, performer, xy(100., 100.));
project
.diagrams
.get_mut(&diagram)
.unwrap()
.nodes
.get_mut(&performer)
.unwrap()
.size = Size {
width: 400.,
height: 250.,
};
let node = project.place(diagram, work, xy(160., 180.));
let owner = project.diagrams[&diagram].nodes[&performer].element;
project.relate(RelationKind::Allocation, "Responsibility", owner, work);
Fixture {
project,
diagram,
performer,
work,
node,
}
}
fn semantic(f: &Fixture) -> (plan::Scope, plan::SemanticPlan) {
let scope = plan::capture(&f.project, f.diagram, f.work, f.node).unwrap();
let semantic = plan::plan_semantics(
&f.project,
&scope,
plan::Destination::OutsidePerformers,
&BTreeMap::new(),
)
.unwrap();
(scope, semantic)
}
fn presentation() -> plan::PresentationContext {
plan::PresentationContext {
viewport: plan::Rect {
position: xy(-2000., -2000.),
size: Size {
width: 5000.,
height: 5000.,
},
},
zoom: 1.,
target: None,
}
}
#[test]
fn each_outgoing_edge_clears_the_source_and_passes_ordinary_placement() {
for layer in [Layer::Oa, Layer::Sa] {
let f = fixture(layer);
let (scope, semantic) = semantic(&f);
for (start, pointer, requested, expected) in [
(
Point::new(170., 210.),
Point::new(99., 210.),
xy(89., 180.),
xy(-140., 180.),
),
(
Point::new(340., 210.),
Point::new(501., 210.),
xy(321., 180.),
xy(510., 180.),
),
(
Point::new(200., 190.),
Point::new(200., 99.),
xy(160., 89.),
xy(160., -10.),
),
(
Point::new(200., 260.),
Point::new(200., 351.),
xy(160., 271.),
xy(160., 360.),
),
] {
assert!(matches!(
plan::place(&semantic, requested, presentation()),
Err(plan::Refusal::LayoutRequired(_))
));
let proposed = requests(
(&f.project, &ViewIndex::new(&f.project)),
(semantic.project(), semantic.index()),
f.diagram,
&scope.placements,
f.node,
requested,
(start, pointer),
);
assert_eq!(proposed, vec![expected]);
let placed = plan::place(&semantic, proposed[0], presentation()).unwrap();
assert!(
plan::finish(&semantic, &f.project, &placed)
.unwrap()
.is_some()
);
}
}
}
#[test]
fn source_shrink_uses_candidate_enclosure_not_frozen_target() {
let mut f = fixture(Layer::Oa);
f.project
.diagrams
.get_mut(&f.diagram)
.unwrap()
.nodes
.get_mut(&f.performer)
.unwrap()
.size = Size {
width: 224.,
height: 94.,
};
let (scope, semantic) = semantic(&f);
let proposed = requests(
(&f.project, &ViewIndex::new(&f.project)),
(semantic.project(), semantic.index()),
f.diagram,
&scope.placements,
f.node,
xy(229., 180.),
(Point::new(340., 210.), Point::new(409., 210.)),
);
assert_eq!(proposed, vec![xy(340., 180.)]);
plan::place(&semantic, proposed[0], presentation()).unwrap();
}
#[test]
fn corner_order_follows_boundary_crossing_and_is_deterministic() {
let f = fixture(Layer::Sa);
let (scope, semantic) = semantic(&f);
// Right crossed at 160/161 of the segment; bottom at 90/91.
let args = (
xy(321., 271.),
Point::new(340., 260.),
Point::new(501., 351.),
);
let proposed = requests(
(&f.project, &ViewIndex::new(&f.project)),
(semantic.project(), semantic.index()),
f.diagram,
&scope.placements,
f.node,
args.0,
(args.1, args.2),
);
assert_eq!(proposed, vec![xy(320., 360.), xy(510., 270.)]);
assert_eq!(
proposed,
requests(
(&f.project, &ViewIndex::new(&f.project)),
(semantic.project(), semantic.index()),
f.diagram,
&scope.placements,
f.node,
args.0,
(args.1, args.2)
)
);
}
#[test]
fn no_crossing_no_overlap_no_source_and_nonfinite_requests_are_empty() {
let f = fixture(Layer::Oa);
let (scope, semantic) = semantic(&f);
for (requested, pointer) in [
(xy(170., 180.), Point::new(210., 210.)),
(xy(700., 180.), Point::new(740., 210.)),
(xy(f32::NAN, 180.), Point::new(99., 210.)),
(xy(89., 180.), Point::new(f32::INFINITY, 210.)),
] {
assert!(
requests(
(&f.project, &ViewIndex::new(&f.project)),
(semantic.project(), semantic.index()),
f.diagram,
&scope.placements,
f.node,
requested,
(Point::new(200., 210.), pointer)
)
.is_empty()
);
}
assert!(
requests(
(semantic.project(), semantic.index()),
(semantic.project(), semantic.index()),
f.diagram,
&scope.placements,
f.node,
xy(89., 180.),
(Point::new(200., 210.), Point::new(99., 210.))
)
.is_empty()
);
}
#[test]
fn descendant_footprint_controls_clearance_without_mutating_projects() {
for layer in [Layer::Oa, Layer::Sa] {
let mut f = fixture(layer);
let kind = f.project.elements[&f.work].kind();
let child = f
.project
.add_element(kind, layer, "Child", Some(f.work))
.unwrap();
let child_node = f.project.place(f.diagram, child, xy(240., 270.));
// First-child allocation transfer is normally performed by commands;
// this fixture expresses the resulting leaf allocation directly.
f.project.relations.clear();
let owner = f.project.diagrams[&f.diagram].nodes[&f.performer].element;
f.project.relate(
RelationKind::Allocation,
"Leaf responsibility",
owner,
child,
);
let (scope, semantic) = semantic(&f);
assert!(scope.placements.contains_key(&child_node));
let before = f.project.clone();
let candidate = semantic.project().clone();
let proposed = requests(
(&f.project, &ViewIndex::new(&f.project)),
(&candidate, semantic.index()),
f.diagram,
&scope.placements,
f.node,
xy(89., 180.),
(Point::new(170., 210.), Point::new(99., 210.)),
);
assert_eq!(proposed, vec![xy(-240., 180.)]);
let placed = plan::place(&semantic, proposed[0], presentation()).unwrap();
let root = &placed.diagram.nodes[&f.node];
let child = &placed.diagram.nodes[&child_node];
assert_eq!(child.position.x - root.position.x, 80.);
assert_eq!(child.position.y - root.position.y, 90.);
assert_eq!(f.project, before);
assert_eq!(semantic.project(), &candidate);
}
}
#[test]
fn independent_selected_roots_keep_one_rigid_group_translation() {
for layer in [Layer::Oa, Layer::Sa] {
let mut f = fixture(layer);
let kind = f.project.elements[&f.work].kind();
let second = f
.project
.add_element(kind, layer, "Second work", None)
.unwrap();
let second_node = f.project.place(f.diagram, second, xy(240., 300.));
let owner = f.project.diagrams[&f.diagram].nodes[&f.performer].element;
f.project.relate(
RelationKind::Allocation,
"Second responsibility",
owner,
second,
);
let selected = BTreeMap::from([(f.node, f.work), (second_node, second)]);
let scope =
plan::assignment::capture(&f.project, f.diagram, &selected, f.node).unwrap();
let semantic = plan::assignment::plan_semantics(
&scope,
plan::Destination::OutsidePerformers,
&BTreeMap::new(),
)
.unwrap();
let proposed = requests(
(&f.project, &ViewIndex::new(&f.project)),
(semantic.project(), semantic.index()),
f.diagram,
scope.affected(),
f.node,
xy(89., 180.),
(Point::new(170., 210.), Point::new(99., 210.)),
);
assert_eq!(proposed, vec![xy(-220., 180.)]);
let placed = plan::assignment::place(&semantic, proposed[0], presentation()).unwrap();
let root = &placed.diagram.nodes[&f.node];
let second = &placed.diagram.nodes[&second_node];
assert_eq!(second.position.x - root.position.x, 80.);
assert_eq!(second.position.y - root.position.y, 120.);
assert!(
plan::assignment::finish(&semantic, &f.project, &placed)
.unwrap()
.is_some()
);
}
}
}
@@ -30,117 +30,6 @@ async fn mount() -> (Fixture, Mounted) {
mounted.settle(&mut f.app).await;
(f, mounted)
}
#[tokio::test]
async fn actual_tree_outgoing_boundary_motion_preview_release_and_cancel() {
for layer in [Layer::Oa, Layer::Sa] {
let mut f = outgoing_fixture(layer);
f.app.layer = layer;
f.app.window_size = iced::Size::new(1440., 900.);
let _ = f.app.update(Message::Select(f.work));
let mut mounted = Mounted::new(&mut f.app).await;
f.app.zoom = 0.75;
f.app.pan = Vector::new(20., 15.);
f.app.fit_to_view = false;
mounted.settle(&mut f.app).await;
let original = f.app.project().clone();
let source = f.app.document.bundle().clone();
let from = at(&mut mounted, &f, xy(660., 225.));
mounted
.batch(
&mut f.app,
&[
Input::Mouse(mouse::Event::CursorMoved { position: from }),
Input::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)),
],
mouse::Cursor::Available(from),
)
.await;
// Separate input/update/layout turns expose the held boundary transition
// that a one-batch distant drop cannot exercise.
for x in [620., 560., 510., 499., 490.] {
let to = at(&mut mounted, &f, xy(x, 225.));
mounted
.batch(
&mut f.app,
&[Input::Mouse(mouse::Event::CursorMoved { position: to })],
mouse::Cursor::Available(to),
)
.await;
assert_eq!(f.app.project(), &original);
assert_eq!(f.app.document.bundle(), &source);
assert!(
!f.app.allocation_drag.feedback.as_ref().unwrap().refused,
"{layer:?} x={x}: {}",
f.app.status
);
assert!(f.app.allocation_drag.preview.is_some());
let _ = mounted.pixels(&f.app);
}
let expected = f
.app
.allocation_drag
.preview
.as_ref()
.unwrap()
.placement
.diagram
.clone();
let to = at(&mut mounted, &f, xy(490., 225.));
mounted
.batch(
&mut f.app,
&[Input::Mouse(mouse::Event::ButtonReleased(
mouse::Button::Left,
))],
mouse::Cursor::Available(to),
)
.await;
assert_eq!(&f.app.project().diagrams[&f.diagram], &expected);
assert!(
!f.app
.project()
.relations
.values()
.any(|r| r.kind() == RelationKind::Allocation && r.target() == f.work)
);
let _ = f.app.update(Message::Undo);
mounted.settle(&mut f.app).await;
assert_eq!(f.app.document.bundle(), &source);
let from = at(&mut mounted, &f, xy(660., 225.));
let to = at(&mut mounted, &f, xy(490., 225.));
mounted
.batch(
&mut f.app,
&[
Input::Mouse(mouse::Event::CursorMoved { position: from }),
Input::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)),
Input::Mouse(mouse::Event::CursorMoved { position: to }),
],
mouse::Cursor::Available(to),
)
.await;
mounted
.batch(
&mut f.app,
&[key(keyboard::key::Named::Escape)],
mouse::Cursor::Available(to),
)
.await;
mounted
.batch(
&mut f.app,
&[Input::Mouse(mouse::Event::ButtonReleased(
mouse::Button::Left,
))],
mouse::Cursor::Available(to),
)
.await;
assert_eq!(f.app.document.bundle(), &source);
assert!(f.app.allocation_drag.preview.is_none());
assert!(!f.app.document.can_undo());
}
}
fn canvas_bounds(mounted: &mut Mounted, app: &App) -> Rectangle {
mounted
.geometry(app)
@@ -301,6 +190,7 @@ async fn actual_keyboard_arrange_shortcut_consumes_once_escape_cancels_and_dirty
)
.await;
assert!(!f.app.allocation_drag.arrange_next);
assert_eq!(f.app.status, "Arrange cancelled");
mounted
.batch(
&mut f.app,
@@ -592,7 +482,6 @@ async fn actual_app_tree_exact_incoming_drag_keeps_destination_visible_and_canva
if pan.y == -100. {
// A genuine clipping refusal in the same held gesture, then
// recovery at the original exact point: no camera rebasing.
let retained = f.app.allocation_drag.preview.clone().unwrap();
let clipped = at(&mut mounted, &f, xy(160., 110.));
mounted
.batch(
@@ -604,19 +493,7 @@ async fn actual_app_tree_exact_incoming_drag_keeps_destination_visible_and_canva
)
.await;
assert!(f.app.allocation_drag.feedback.as_ref().unwrap().refused);
assert!(Arc::ptr_eq(
f.app.allocation_drag.preview.as_ref().unwrap(),
&retained
));
assert!(
f.app
.allocation_drag
.feedback
.as_ref()
.unwrap()
.ghost_delta
.is_some()
);
assert!(f.app.allocation_drag.preview.is_none());
assert_eq!(canvas_bounds(&mut mounted, &f.app), canvas);
assert_eq!(destination_bounds(&mut mounted, &f.app), slot);
assert_eq!(f.app.project(), &before);
@@ -1239,7 +1239,6 @@ fn destination_identity_does_not_describe_blocked_or_outside_viewport_as_unalloc
inspection_targets: vec![],
text: "A card blocks this drop".into(),
refused: true,
ghost_delta: None,
};
assert_eq!(feedback.destination_identity(), "No eligible destination");
feedback.text = "Release inside the captured canvas".into();
@@ -1247,361 +1246,3 @@ fn destination_identity_does_not_describe_blocked_or_outside_viewport_as_unalloc
feedback.refused = false;
assert_eq!(feedback.destination_identity(), "Outside performers");
}
fn outgoing_fixture(layer: Layer) -> Fixture {
let mut f = fixture(layer);
drag(&mut f, screen(xy(160., 190.)));
let mut project = f.app.project().clone();
let d = project.diagrams.get_mut(&f.diagram).unwrap();
let performer = d.nodes.values_mut().find(|n| n.element == f.a).unwrap();
performer.position = xy(500., 100.);
performer.size = Size {
width: 300.,
height: 300.,
};
d.nodes.get_mut(&f.node).unwrap().position = xy(540., 190.);
replace(&mut f, project);
f
}
#[test]
fn outgoing_boundary_drop_clears_source_without_changing_other_placements() {
for layer in [Layer::Oa, Layer::Sa] {
let mut f = outgoing_fixture(layer);
let before = f.app.project().clone();
let source = f.app.document.bundle().clone();
let from = screen(xy(660., 225.));
let to = screen(xy(490., 225.));
let mut events = batch(&f.app, from, to);
let release = events.pop().unwrap();
send(&mut f.app, events);
let feedback = f.app.allocation_drag.feedback.as_ref().unwrap();
assert!(!feedback.refused, "{}", feedback.text);
let preview = f.app.allocation_drag.preview.as_ref().unwrap();
let expected_diagram = preview.placement.diagram.clone();
let work = &expected_diagram.nodes[&f.node];
assert!(work.position.x + work.size.width <= 490.);
assert_eq!(work.position.y, 190.);
for (id, node) in &before.diagrams[&f.diagram].nodes {
if *id != f.node {
assert_eq!(&expected_diagram.nodes[id], node);
}
}
assert_eq!(f.app.project(), &before);
assert_eq!(f.app.document.bundle(), &source);
let _ = f.app.update(release);
assert_eq!(&f.app.project().diagrams[&f.diagram], &expected_diagram);
assert!(
!f.app
.project()
.relations
.values()
.any(|r| r.kind() == RelationKind::Allocation && r.target() == f.work)
);
let after = f.app.project().clone();
let saved = f.app.document.bundle().clone();
let _ = f.app.update(Message::Undo);
assert_eq!(f.app.project(), &before);
assert_eq!(f.app.document.bundle(), &source);
assert!(!f.app.document.can_undo());
let _ = f.app.update(Message::Redo);
assert_eq!(f.app.project(), &after);
assert_eq!(f.app.document.bundle(), &saved);
}
}
#[test]
fn outgoing_clearance_collision_refuses_release_without_source_or_history_mutation() {
for layer in [Layer::Oa, Layer::Sa] {
let mut f = outgoing_fixture(layer);
let mut project = f.app.project().clone();
let obstacle = project
.add_element(
project.elements[&f.work].kind(),
layer,
"Unrelated work",
None,
)
.unwrap();
let obstacle_node = project.place(f.diagram, obstacle, xy(240., 190.));
replace(&mut f, project);
// A refused release must preserve an existing redo branch, too.
let _ = f.app.update(Message::Command(Command::Rename(
f.work,
"Temporary".into(),
)));
let _ = f.app.update(Message::Undo);
let before = f.app.project().clone();
let source = f.app.document.bundle().clone();
let snapshot = f.app.document.snapshot();
let revision = f.app.document.revision();
let from = screen(xy(660., 225.));
let to = screen(xy(490., 225.));
let mut events = batch(&f.app, from, to);
let release = events.pop().unwrap();
send(&mut f.app, events);
let active = f.app.allocation_drag.active.as_ref().unwrap();
let p = &active.press;
let frozen = active.frozen.as_ref().unwrap();
let owner = frozen.targets.iter().find(|t| t.element == f.a).unwrap();
assert_eq!(p.start, from);
assert!(contains(owner.region, p.stamp.world(from)));
assert!(p.stamp.world(to).x < owner.region.x);
assert_eq!(
frozen.resolve(p.stamp, Some(to), false),
Hit::Destination(plan::Destination::OutsidePerformers, None),
"The pointer must reach empty canvas, not be occluded by the obstacle"
);
let candidate = active
.cache
.iter()
.find(|(destination, _)| *destination == plan::Destination::OutsidePerformers)
.unwrap()
.1
.as_ref()
.unwrap();
let affected = match &active.prepared {
Prepared::Singleton(scope) => &scope.placements,
Prepared::Assignment(scope) => scope.affected(),
_ => panic!("expected assignment gesture"),
};
let requested = xy(370., 190.);
let presentation = plan::PresentationContext {
viewport: p.stamp.viewport(),
zoom: p.stamp.zoom,
target: None,
};
assert!(matches!(
candidate.place(requested, presentation),
Err(plan::Refusal::LayoutRequired(_))
));
let proposed = clearance::requests(
(f.app.project(), f.app.document.view_index()),
(candidate.project(), candidate.index()),
f.diagram,
affected,
f.node,
requested,
(p.stamp.world(from), p.stamp.world(to)),
);
assert_eq!(
proposed.len(),
1,
"a genuine left crossing must propose clearance"
);
assert!(proposed[0].x < requested.x);
let work = &before.diagrams[&f.diagram].nodes[&f.node];
let obstacle = &before.diagrams[&f.diagram].nodes[&obstacle_node];
assert!(obstacle.position.x + obstacle.size.width < 490.);
assert!(proposed[0].x + work.size.width <= owner.region.x - 10.);
assert!(proposed[0].x < obstacle.position.x + obstacle.size.width);
assert!(obstacle.position.x < proposed[0].x + work.size.width);
assert_eq!(proposed[0].y, obstacle.position.y);
assert!(matches!(
candidate.place(proposed[0], presentation),
Err(plan::Refusal::LayoutRequired(message)) if message.contains("overlapping cards")
));
let feedback = f.app.allocation_drag.feedback.as_ref().unwrap();
assert!(feedback.refused, "{}", feedback.text);
assert!(feedback.ghost_delta.is_some());
assert!(f.app.allocation_drag.preview.is_none());
assert_eq!(f.app.project(), &before);
assert_eq!(f.app.document.bundle(), &source);
assert!(Arc::ptr_eq(&snapshot, &f.app.document.snapshot()));
let _ = f.app.update(release);
assert!(
f.app.status.contains("overlapping cards"),
"{}",
f.app.status
);
assert!(f.app.allocation_drag.active.is_none());
assert!(f.app.allocation_drag.preview.is_none());
assert_eq!(f.app.project(), &before);
assert_eq!(f.app.document.bundle(), &source);
assert_eq!(f.app.document.revision(), revision);
assert!(Arc::ptr_eq(&snapshot, &f.app.document.snapshot()));
assert!(!f.app.document.can_undo());
assert!(f.app.document.can_redo());
}
}
#[test]
fn outgoing_clearance_preserves_source_enclosure_and_allocated_sibling() {
for layer in [Layer::Oa, Layer::Sa] {
let mut f = outgoing_fixture(layer);
let mut project = f.app.project().clone();
let sibling = project
.add_element(
project.elements[&f.work].kind(),
layer,
"Remaining work",
None,
)
.unwrap();
let sibling_node = project.place(f.diagram, sibling, xy(540., 450.));
let allocation = project.relate(
RelationKind::Allocation,
"Keep responsibility",
f.a,
sibling,
);
replace(&mut f, project);
let before = f.app.project().clone();
let source = f.app.document.bundle().clone();
let view = projection::project_view(&before, f.diagram);
let owner = view.nodes.iter().find(|n| n.element == f.a).unwrap();
let bottom = owner.position.y + owner.size.height;
let stored_owner = &before.diagrams[&f.diagram].nodes[&owner.id];
assert!(
bottom > stored_owner.position.y + stored_owner.size.height,
"The retained sibling must enlarge the projected source enclosure"
);
let from = screen(xy(660., 225.));
let to = screen(xy(660., bottom + 1.));
let mut events = batch(&f.app, from, to);
let release = events.pop().unwrap();
send(&mut f.app, events);
let active = f.app.allocation_drag.active.as_ref().unwrap();
let p = &active.press;
let frozen = active.frozen.as_ref().unwrap();
let target = frozen.targets.iter().find(|t| t.element == f.a).unwrap();
assert_eq!(p.start, from);
assert!(contains(target.region, p.stamp.world(from)));
assert!(p.stamp.world(to).y >= target.region.y + target.region.height);
assert_eq!(
frozen.resolve(p.stamp, Some(to), false),
Hit::Destination(plan::Destination::OutsidePerformers, None)
);
let preview = f.app.allocation_drag.preview.as_ref().expect(&f.app.status);
assert!(!f.app.allocation_drag.feedback.as_ref().unwrap().refused);
let requested = xy(540., 190. + to.y - from.y);
assert!(matches!(
preview.candidate.place(
requested,
plan::PresentationContext {
viewport: p.stamp.viewport(),
zoom: p.stamp.zoom,
target: None,
}
),
Err(plan::Refusal::LayoutRequired(_))
));
let moved = &preview.placement.diagram.nodes[&f.node];
assert_eq!(moved.position.x, 540.);
assert!(moved.position.y >= bottom + 10.);
assert!(moved.position.y > requested.y);
assert_eq!(
preview
.placement
.view
.nodes
.iter()
.find(|n| n.id == owner.id)
.unwrap(),
owner
);
let remaining = preview
.placement
.view
.nodes
.iter()
.find(|n| n.id == sibling_node)
.unwrap();
assert_eq!(remaining.visual_parent, Some(owner.id));
assert_eq!(
remaining.position,
before.diagrams[&f.diagram].nodes[&sibling_node].position
);
assert_eq!(
&preview.project().relations[&allocation],
&before.relations[&allocation]
);
for (id, node) in &before.diagrams[&f.diagram].nodes {
if *id != f.node {
assert_eq!(&preview.placement.diagram.nodes[id], node);
}
}
let mut expected = preview.project().clone();
expected
.diagrams
.insert(f.diagram, preview.placement.diagram.clone());
assert_eq!(f.app.project(), &before);
assert_eq!(f.app.document.bundle(), &source);
let _ = f.app.update(release);
assert_eq!(f.app.project(), &expected, "{}", f.app.status);
assert_eq!(f.app.document.revision(), 1);
assert_eq!(
validation::effective_performer(f.app.project(), f.work),
None
);
assert_eq!(
validation::effective_performer(f.app.project(), sibling),
Some(f.a)
);
assert_eq!(
&f.app.project().relations[&allocation],
&before.relations[&allocation]
);
let after = f.app.document.bundle().clone();
let _ = f.app.update(Message::Undo);
assert_eq!(f.app.project(), &before);
assert_eq!(f.app.document.bundle(), &source);
assert!(!f.app.document.can_undo());
let _ = f.app.update(Message::Redo);
assert_eq!(f.app.project(), &expected);
assert_eq!(f.app.document.bundle(), &after);
}
}
#[test]
fn refused_motion_retains_last_scene_but_release_never_commits_it() {
let mut f = outgoing_fixture(Layer::Sa);
let mut project = f.app.project().clone();
let obstacle = project
.add_element(Kind::Function, Layer::Sa, "Unrelated work", None)
.unwrap();
project.place(f.diagram, obstacle, xy(1250., 120.));
replace(&mut f, project);
let original = f.app.project().clone();
let source = f.app.document.bundle().clone();
let p = admit_press(&mut f);
let clear = screen(xy(450., 225.));
let _ = f.app.update(Message::WorkDrag(Event::Preview(
p.stamp,
p.token,
Some(clear),
)));
let last = f.app.allocation_drag.preview.clone().expect(&f.app.status);
// Another work card blocks this location: the prior legal outgoing scene is display
// state only, and must not become a fallback command on release.
let blocked = screen(xy(1260., 130.));
let _ = f.app.update(Message::WorkDrag(Event::Preview(
p.stamp,
p.token,
Some(blocked),
)));
assert!(f.app.allocation_drag.feedback.as_ref().unwrap().refused);
assert!(
f.app
.allocation_drag
.feedback
.as_ref()
.unwrap()
.ghost_delta
.is_some()
);
assert!(Arc::ptr_eq(
f.app.allocation_drag.preview.as_ref().unwrap(),
&last
));
let _ = f.app.update(Message::WorkDrag(Event::Release(
p.stamp,
p.token,
Some(blocked),
)));
assert_eq!(f.app.project(), &original);
assert_eq!(f.app.document.bundle(), &source);
assert!(!f.app.document.can_undo());
assert!(f.app.allocation_drag.preview.is_none());
}
@@ -0,0 +1,723 @@
//! Context help is a reading overlay, not a workspace navigation or edit.
use super::*;
use crate::diagram_usage::Target;
use crate::guide::Topic;
fn send(app: &mut App, message: Message) {
// Do not poll I/O tasks: exercise the same admission boundary as the UI.
let _ = app.update(message);
}
fn architecture() -> (App, Id, Id, Id) {
let mut project = Project::empty();
let a = project
.add_element(Kind::Function, Layer::Sa, "Send", None)
.unwrap();
let b = project
.add_element(Kind::Function, Layer::Sa, "Receive", None)
.unwrap();
let diagram = project.ensure_diagram(Layer::Sa);
project.diagrams.get_mut(&diagram).unwrap().projection = ProjectionKind::FunctionalDataflow;
let a = project.place(diagram, a, Position { x: 20., y: 20. });
let b = project.place(diagram, b, Position { x: 400., y: 20. });
let mut app = App::with_project(project);
app.page = Page::Diagram;
app.layer = Layer::Sa;
app.active_diagram = Some(diagram);
app.selected = diagram;
app.refresh_draft();
app.reconcile_multiselect();
(app, diagram, a, b)
}
fn choose(app: &mut App, placement: Id, choice: multiselect::Choice) {
let context = app.multiselect_context().unwrap();
send(
app,
Message::DiagramSelection(multiselect::Event::Choose(
context,
Target::Placement(placement),
choice,
)),
);
}
#[test]
fn context_help_preserves_group_property_draft_camera_and_model() {
let (mut app, diagram, a, b) = architecture();
choose(&mut app, a, multiselect::Choice::Replace);
choose(&mut app, b, multiselect::Choice::Toggle);
send(
&mut app,
Message::Field("/name".into(), "Uncommitted name 雨".into()),
);
assert!(app.draft_dirty());
app.zoom = 0.73;
app.pan = iced::Vector::new(31., -57.);
let selected = app.selected;
let selection = app.multiselect_snapshot().unwrap().targets().to_vec();
assert_eq!(selection.len(), 2);
let draft = serde_json::to_value(app.draft.as_ref().unwrap().recovery_snapshot()).unwrap();
let before = app.document.snapshot();
let camera = (app.zoom, app.pan);
send(&mut app, Message::ContextHelp(Topic::Nesting));
assert!(app.context_help);
for message in [
Message::Page(Page::Catalog),
Message::Select(diagram),
Message::Apply,
Message::RevertProperties,
Message::Undo,
Message::Delete,
Message::Field("/name".into(), "Background mutation".into()),
] {
send(&mut app, message);
}
assert!(app.context_help);
send(
&mut app,
Message::Guide(crate::guide::Event::Topic(Topic::Exchanges)),
);
assert_eq!(app.guide.topic, Topic::Exchanges);
send(&mut app, Message::CloseContextHelp);
assert!(!app.context_help);
assert_eq!(app.page, Page::Diagram);
assert_eq!(app.active_diagram, Some(diagram));
assert_eq!(app.selected, selected);
assert_eq!(
app.multiselect_snapshot().unwrap().targets(),
selection.as_slice()
);
assert_eq!((app.zoom, app.pan), camera);
assert_eq!(
serde_json::to_value(app.draft.as_ref().unwrap().recovery_snapshot()).unwrap(),
draft
);
assert!(Arc::ptr_eq(&before, &app.document.snapshot()));
assert!(!app.document.can_undo());
}
#[test]
fn context_help_escape_preserves_pending_behavior_form_and_blocks_submit() {
use crate::behavior::states;
let mut project = Project::empty();
let system = project
.add_element(Kind::System, Layer::Sa, "System", None)
.unwrap();
let machine = project
.add_element(Kind::StateMachine, Layer::Sa, "Modes", Some(system))
.unwrap();
let region = project
.add_element(Kind::Region, Layer::Sa, "Main", Some(machine))
.unwrap();
let state = project
.add_element(Kind::State, Layer::Sa, "Ready", Some(region))
.unwrap();
let mut app = App::with_project(project);
send(&mut app, Message::Select(state));
send(&mut app, Message::Page(Page::Behavior));
send(
&mut app,
Message::Behavior(behavior::Event::States(states::Event::Start(
machine,
states::Tool::Transition,
state,
))),
);
send(
&mut app,
Message::Behavior(behavior::Event::States(states::Event::Name(
"Pending transition 雨".into(),
))),
);
assert!(app.behavior.has_pending());
let draft = app.behavior.recovery_snapshot().unwrap();
let before = app.document.snapshot();
let selected = app.selected;
send(&mut app, Message::Help);
assert!(app.context_help);
assert_eq!(app.guide.topic, Topic::States);
for event in [
states::Event::Cancel,
states::Event::Submit,
states::Event::Name("Lost".into()),
] {
send(&mut app, Message::Behavior(behavior::Event::States(event)));
}
send(&mut app, Message::Page(Page::Catalog));
send(&mut app, Message::Escape);
assert!(!app.context_help);
assert_eq!(app.page, Page::Behavior);
assert_eq!(app.selected, selected);
assert_eq!(app.behavior.active_owner, Some(machine));
assert!(app.behavior.has_pending());
assert_eq!(app.behavior.recovery_snapshot().unwrap(), draft);
assert!(Arc::ptr_eq(&before, &app.document.snapshot()));
}
#[test]
fn context_help_retains_source_draft_and_rejects_background_source_input() {
let (mut app, diagram, _, _) = architecture();
send(&mut app, Message::Page(Page::Text));
send(
&mut app,
Message::SourceEdit(text_editor::Action::SelectAll),
);
send(
&mut app,
Message::SourceEdit(text_editor::Action::Edit(text_editor::Edit::Paste(
Arc::new("invalid unfinished source 雨".into()),
))),
);
assert!(app.source_dirty());
send(&mut app, Message::Page(Page::Diagram));
let source = app.source_editor.text();
let version = app.source_version;
let before = app.document.snapshot();
send(&mut app, Message::Help);
assert!(app.context_help);
assert_eq!(app.guide.topic, Topic::Nesting);
for message in [
Message::ApplySource,
Message::RevertSource,
Message::SourceEdit(text_editor::Action::Edit(text_editor::Edit::Paste(
Arc::new("overwrite".into()),
))),
] {
send(&mut app, message);
}
send(&mut app, Message::Escape);
assert_eq!(app.page, Page::Diagram);
assert_eq!(app.active_diagram, Some(diagram));
assert!(app.source_dirty());
assert_eq!(app.source_editor.text(), source);
assert_eq!(app.source_version, version);
assert!(Arc::ptr_eq(&before, &app.document.snapshot()));
}
#[test]
fn context_help_f1_selects_scenario_topic_without_leaving_the_workspace() {
let fixture = behavior::scenario::direct_tests::fixture();
let mut app = App::with_project(fixture.project);
send(&mut app, Message::Select(fixture.owner));
send(&mut app, Message::Page(Page::Behavior));
let before = app.document.snapshot();
send(&mut app, Message::Help);
assert!(app.context_help);
assert_eq!(app.guide.topic, Topic::Scenarios);
assert_eq!(app.page, Page::Behavior);
assert!(app.scenario_focus_owner().is_none());
assert!(!behavior::canvas_workspace::keyboard_owner_enabled(&app));
send(&mut app, Message::Escape);
assert!(!app.context_help);
assert_eq!(app.selected, fixture.owner);
assert_eq!(app.behavior.active_owner, Some(fixture.owner));
assert!(Arc::ptr_eq(&before, &app.document.snapshot()));
}
#[test]
fn context_help_disables_allocation_input_including_early_work_drag_dispatch() {
let mut project = Project::empty();
let diagram = project.ensure_diagram(Layer::Oa);
project.diagrams.get_mut(&diagram).unwrap().projection = ProjectionKind::Allocation;
let mut app = App::with_project(project);
assert!(app.allocation_input_owner());
send(
&mut app,
Message::WorkDrag(allocation_drag::Event::ArrangeNext),
);
assert!(app.allocation_drag.arrange_next);
send(&mut app, Message::Help);
assert!(app.context_help);
assert!(!app.allocation_input_owner());
assert!(!app.allocation_drag.arrange_next);
assert_eq!(app.status, "Arrange cancelled");
let before = app.document.snapshot();
send(
&mut app,
Message::WorkDrag(allocation_drag::Event::ArrangeNext),
);
assert!(!app.allocation_drag.arrange_next);
assert!(Arc::ptr_eq(&before, &app.document.snapshot()));
send(&mut app, Message::Escape);
assert!(app.allocation_input_owner());
}
#[test]
fn context_help_rejects_a_reference_picker_open_queued_from_the_inspector() {
let mut project = Project::empty();
let owner = project
.add_element(Kind::DataType, Layer::Oa, "Record", None)
.unwrap();
if let Some(SharedBody::DataType { definition, .. }) =
project.elements.get_mut(&owner).unwrap().shared_mut()
{
*definition = DataTypeDefinition::Record { supertype: None };
}
let mut app = App::with_project(project);
send(&mut app, Message::Select(owner));
let request = app.draft.as_ref().unwrap().reference_open(
app.project(),
"/body/Oa/Shared/DataType/definition/Record/supertype",
iced::Rectangle {
x: 790.,
y: 400.,
width: 278.,
height: 32.,
},
);
let before = serde_json::to_value(app.draft.as_ref().unwrap().recovery_snapshot()).unwrap();
send(&mut app, Message::ContextHelp(Topic::Nesting));
assert!(app.context_help);
send(&mut app, Message::FieldReferenceOpen(request));
assert!(!app.reference_input_active());
send(&mut app, Message::Escape);
assert!(!app.context_help);
assert_eq!(
serde_json::to_value(app.draft.as_ref().unwrap().recovery_snapshot()).unwrap(),
before
);
}
#[test]
fn context_help_accepts_live_process_viewport_and_rejects_stale_measurements() {
use crate::behavior::topology::CanvasEvent;
let mut project = Project::empty();
let owner = project
.add_element(Kind::Process, Layer::Oa, "Response process", None)
.unwrap();
let mut app = App::with_project(project);
send(&mut app, Message::Select(owner));
send(&mut app, Message::Page(Page::Behavior));
let context = app.topology_context().unwrap();
send(
&mut app,
Message::TopologyCanvas(CanvasEvent::Viewport(context, iced::Size::new(640., 480.))),
);
let initial = app.behavior.topology.camera_boundary();
let before = app.document.snapshot();
send(&mut app, Message::Help);
assert!(app.context_help);
assert_eq!(app.guide.topic, Topic::Chains);
let resized = iced::Size::new(420., 330.);
let context = app.topology_context().unwrap();
send(
&mut app,
Message::TopologyCanvas(CanvasEvent::Viewport(context, resized)),
);
let measured = app.behavior.topology.camera_boundary();
assert!(
measured != initial,
"Help must admit passive viewport measurements"
);
assert!(app.context_help);
let epoch = app.canvas_epoch;
for field in 0..3 {
let mut stale = app.topology_context().unwrap();
match field {
0 => stale.document = Id::new_v4(),
1 => stale.owner = Id::new_v4(),
_ => stale.revision += 1,
}
send(
&mut app,
Message::TopologyCanvas(CanvasEvent::Viewport(stale, iced::Size::new(999., 777.))),
);
assert!(app.behavior.topology.camera_boundary() == measured);
assert_eq!(app.canvas_epoch, epoch);
}
send(&mut app, Message::CloseContextHelp);
assert!(!app.context_help);
assert!(app.behavior.topology.camera_boundary() == measured);
let context = app.topology_context().unwrap();
let epoch = app.canvas_epoch;
send(
&mut app,
Message::TopologyCanvas(CanvasEvent::Viewport(context, resized)),
);
assert_eq!(
app.canvas_epoch, epoch,
"The size observed behind Help is already current"
);
let context = app.topology_context().unwrap();
send(
&mut app,
Message::TopologyCanvas(CanvasEvent::Viewport(context, iced::Size::new(700., 500.))),
);
assert!(app.behavior.topology.camera_boundary() != measured);
assert_eq!(app.page, Page::Behavior);
assert_eq!(app.selected, owner);
assert!(Arc::ptr_eq(&before, &app.document.snapshot()));
assert!(!app.document.can_undo());
}
async fn help_key(
mounted: &mut crate::behavior::canvas_workspace::tests::Mounted,
app: &mut App,
event: iced::Event,
) -> Vec<Message> {
let (mut messages, statuses) = mounted.input_with_status(
app,
std::slice::from_ref(&event),
iced::mouse::Cursor::Unavailable,
);
super::escape::tests::subscriptions(app, event, statuses[0], &mut messages);
for message in messages.iter().cloned() {
let task = app.update(message);
mounted.perform(app, task).await;
}
messages
}
#[tokio::test]
async fn mounted_context_help_keyboard_scroll_preserves_inspector_focus_and_exact_caret() {
use crate::behavior::canvas_workspace::tests::{Mounted, character, key};
use iced::keyboard::key::Named;
let (mut app, diagram, a, _) = architecture();
let element = app.project().diagrams[&diagram].nodes[&a].element;
send(&mut app, Message::Select(element));
let before = app.document.snapshot();
let mut mounted = Mounted::new(&mut app).await;
let field = mounted
.geometry(&app)
.text_inputs
.into_iter()
.filter(|bounds| bounds.x > app.window_size.width - 320.)
.min_by(|a, b| a.y.total_cmp(&b.y))
.expect("visible Inspector Name input");
mounted.click(&mut app, field.center()).await;
help_key(&mut mounted, &mut app, key(Named::Home)).await;
for character_value in "DRAFT ".chars() {
help_key(
&mut mounted,
&mut app,
character(&character_value.to_string()),
)
.await;
}
help_key(&mut mounted, &mut app, key(Named::ArrowLeft)).await;
assert_eq!(
app.draft.as_ref().unwrap().inputs["/name"].raw,
"DRAFT Send"
);
let camera = (app.zoom, app.pan);
help_key(&mut mounted, &mut app, key(Named::F1)).await;
assert!(app.context_help);
let article = iced::advanced::widget::Id::new(crate::guide::ARTICLE_SCROLL_ID);
let geometry = mounted.geometry(&app);
let background_scrolls = geometry
.scrolls
.iter()
.filter(|(id, _)| **id != article)
.map(|(id, (_, offset))| (id.clone(), *offset))
.collect::<Vec<_>>();
assert_eq!(geometry.scrolls[&article].1.y, 0.);
help_key(&mut mounted, &mut app, key(Named::PageDown)).await;
let down = mounted.geometry(&app).scrolls[&article].1.y;
assert!(down > 0., "PageDown scrolls the mounted Help article");
help_key(&mut mounted, &mut app, key(Named::End)).await;
let end = mounted.geometry(&app).scrolls[&article].1.y;
assert!(end > down);
help_key(&mut mounted, &mut app, key(Named::PageDown)).await;
assert_eq!(mounted.geometry(&app).scrolls[&article].1.y, end);
help_key(&mut mounted, &mut app, key(Named::PageUp)).await;
assert!(mounted.geometry(&app).scrolls[&article].1.y < end);
help_key(&mut mounted, &mut app, key(Named::Home)).await;
assert_eq!(mounted.geometry(&app).scrolls[&article].1.y, 0.);
help_key(&mut mounted, &mut app, key(Named::ArrowDown)).await;
assert_eq!(mounted.geometry(&app).scrolls[&article].1.y, 40.);
help_key(&mut mounted, &mut app, key(Named::ArrowUp)).await;
help_key(&mut mounted, &mut app, key(Named::PageUp)).await;
let geometry = mounted.geometry(&app);
assert_eq!(geometry.scrolls[&article].1.y, 0.);
for (id, offset) in background_scrolls {
assert_eq!(
geometry.scrolls[&id].1, offset,
"Help only scrolls its own article"
);
}
for character_value in "IGNORED".chars() {
help_key(
&mut mounted,
&mut app,
character(&character_value.to_string()),
)
.await;
}
let messages = mounted
.batch(
&mut app,
&[
iced::Event::InputMethod(iced::advanced::input_method::Event::Preedit(
"雨".into(),
None,
)),
iced::Event::InputMethod(iced::advanced::input_method::Event::Commit("雨".into())),
],
iced::mouse::Cursor::Unavailable,
)
.await;
assert!(!messages.iter().any(|m| matches!(m, Message::Field(..))));
assert_eq!(
app.draft.as_ref().unwrap().inputs["/name"].raw,
"DRAFT Send"
);
help_key(&mut mounted, &mut app, key(Named::Escape)).await;
assert!(!app.context_help);
help_key(&mut mounted, &mut app, character("X")).await;
assert_eq!(
app.draft.as_ref().unwrap().inputs["/name"].raw,
"DRAFTX Send",
"Return keeps the actual mid-string caret without refocusing a guessed field"
);
assert_eq!((app.zoom, app.pan), camera);
assert!(Arc::ptr_eq(&before, &app.document.snapshot()));
let messages = help_key(&mut mounted, &mut app, key(Named::PageDown)).await;
assert!(
!messages
.iter()
.any(|m| matches!(m, Message::ContextHelpScroll(_)))
);
assert!(
iced_runtime::task::into_stream(
app.update(Message::ContextHelpScroll(crate::guide::ContextScroll::End,))
)
.is_none(),
"A late Help scroll cannot operate after closing"
);
}
#[tokio::test]
async fn mounted_context_help_observes_modifier_release_before_plain_canvas_click() {
use crate::behavior::canvas_workspace::tests::{Mounted, key};
use iced::{
keyboard::{Event, Modifiers, key::Named},
mouse,
};
let (mut app, diagram, a, b) = architecture();
choose(&mut app, a, multiselect::Choice::Replace);
app.window_size = iced::Size::new(2000., 1400.);
let mut mounted = Mounted::new(&mut app).await;
app.zoom = 1.;
app.pan = iced::Vector::ZERO;
app.fit_to_view = false;
mounted.settle(&mut app).await;
mounted
.batch(
&mut app,
&[iced::Event::Keyboard(Event::ModifiersChanged(
Modifiers::SHIFT,
))],
mouse::Cursor::Unavailable,
)
.await;
help_key(&mut mounted, &mut app, key(Named::F1)).await;
assert!(app.context_help);
mounted
.batch(
&mut app,
&[iced::Event::Keyboard(Event::ModifiersChanged(
Modifiers::empty(),
))],
mouse::Cursor::Unavailable,
)
.await;
help_key(&mut mounted, &mut app, key(Named::Escape)).await;
let bounds = mounted
.geometry(&app)
.bounds(crate::allocation_input::CANVAS_ID);
let node = projection::project_view(app.project(), diagram)
.nodes
.into_iter()
.find(|node| node.id == b)
.unwrap();
let at = iced::Point::new(
bounds.x + node.position.x + 40.,
bounds.y + node.position.y + 35.,
);
mounted.click(&mut app, at).await;
assert_eq!(
app.multiselect_snapshot().unwrap().targets(),
&[Target::Placement(b)],
"Shift released during Help must not add the next card to the previous selection"
);
}
#[tokio::test]
async fn mounted_context_help_retires_held_pan_without_replaying_its_release() {
use crate::behavior::canvas_workspace::tests::{Mounted, key};
use iced::{keyboard::key::Named, mouse};
let (mut app, _, _, _) = architecture();
let mut mounted = Mounted::new(&mut app).await;
let canvas = mounted
.geometry(&app)
.bounds(crate::allocation_input::CANVAS_ID);
let start = canvas.center();
let moved = start + iced::Vector::new(20., 10.);
mounted
.batch(
&mut app,
&[
iced::Event::Mouse(mouse::Event::CursorMoved { position: start }),
iced::Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Middle)),
iced::Event::Mouse(mouse::Event::CursorMoved { position: moved }),
],
mouse::Cursor::Available(moved),
)
.await;
let camera = (app.zoom, app.pan);
let before = app.document.snapshot();
help_key(&mut mounted, &mut app, key(Named::F1)).await;
assert!(app.context_help);
mounted
.batch(
&mut app,
&[iced::Event::Mouse(mouse::Event::ButtonReleased(
mouse::Button::Middle,
))],
mouse::Cursor::Unavailable,
)
.await;
help_key(&mut mounted, &mut app, key(Named::Escape)).await;
let next = moved + iced::Vector::new(90., 50.);
let messages = mounted
.batch(
&mut app,
&[iced::Event::Mouse(mouse::Event::CursorMoved {
position: next,
})],
mouse::Cursor::Available(next),
)
.await;
assert!(!messages.iter().any(|m| matches!(m, Message::Pan(_))));
assert_eq!(
(app.zoom, app.pan),
camera,
"Moving without a held button cannot resume the pre-Help pan"
);
assert!(Arc::ptr_eq(&before, &app.document.snapshot()));
}
#[tokio::test]
async fn context_help_barrier_retires_text_selection_drag_without_changing_the_caret() {
use iced::advanced::{Layout, layout, widget};
use iced::{Element, Event, Rectangle, mouse};
type InputState = iced::widget::text_input::State<
<iced::Renderer as iced::advanced::text::Renderer>::Paragraph,
>;
fn input(open: bool) -> Element<'static, Message> {
crate::guide::protect_workspace(
open,
iced::widget::text_input("Name", "A long retained property name")
.on_input(|value| Message::Field("/name".into(), value))
.width(400)
.padding(8)
.into(),
)
}
fn dispatch(
root: &mut Element<'_, Message>,
tree: &mut widget::Tree,
node: &layout::Node,
renderer: &iced::Renderer,
event: Event,
cursor: mouse::Cursor,
) -> Vec<Message> {
let mut messages = Vec::new();
root.as_widget_mut().update(
tree,
&event,
Layout::new(node),
cursor,
renderer,
&mut iced::advanced::clipboard::Null,
&mut iced::advanced::Shell::new(&mut messages),
&Rectangle::new(iced::Point::ORIGIN, iced::Size::new(400., 60.)),
);
messages
}
let mounted = crate::behavior::canvas_workspace::tests::Mounted::unshown().await;
let renderer = &mounted.renderer;
let mut root = input(false);
let mut tree = widget::Tree::new(root.as_widget());
let node = root.as_widget_mut().layout(
&mut tree,
renderer,
&layout::Limits::new(iced::Size::ZERO, iced::Size::new(400., 60.)),
);
let start = iced::Point::new(20., 18.);
let end = iced::Point::new(110., 18.);
for event in [
mouse::Event::CursorMoved { position: start },
mouse::Event::ButtonPressed(mouse::Button::Left),
mouse::Event::CursorMoved { position: end },
] {
let cursor = if matches!(event, mouse::Event::CursorMoved { position } if position == end) {
mouse::Cursor::Available(end)
} else {
mouse::Cursor::Available(start)
};
dispatch(
&mut root,
&mut tree,
&node,
renderer,
Event::Mouse(event),
cursor,
);
}
let caret = tree.children[0].state.downcast_ref::<InputState>().cursor();
assert!(
tree.children[0]
.state
.downcast_ref::<InputState>()
.is_focused()
);
root = input(true);
tree.diff(root.as_widget());
let messages = dispatch(
&mut root,
&mut tree,
&node,
renderer,
Event::Window(iced::window::Event::RedrawRequested(
std::time::Instant::now(),
)),
mouse::Cursor::Unavailable,
);
assert!(
messages.is_empty(),
"Gesture retirement discards release actions"
);
dispatch(
&mut root,
&mut tree,
&node,
renderer,
Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)),
mouse::Cursor::Unavailable,
);
root = input(false);
tree.diff(root.as_widget());
let later = iced::Point::new(300., 18.);
dispatch(
&mut root,
&mut tree,
&node,
renderer,
Event::Mouse(mouse::Event::CursorMoved { position: later }),
mouse::Cursor::Available(later),
);
let state = tree.children[0].state.downcast_ref::<InputState>();
assert!(state.is_focused());
assert_eq!(
state.cursor(),
caret,
"An unheld pointer no longer extends the pre-Help text selection"
);
}
+2 -1
View File
@@ -14,7 +14,8 @@ pub(crate) fn root<'a, R: renderer::Renderer + 'a>(
content: Element<'a, Message, Theme, R>,
) -> Element<'a, Message, Theme, R> {
let modal = app.text_workspace.menu().is_none()
&& (app.behavior.creation.has_pending()
&& (app.context_help
|| app.behavior.creation.has_pending()
|| app.diagram_usages.is_some()
|| app.behavior.source_active()
|| (app.page == Page::Text
@@ -16,6 +16,7 @@ pub fn keyboard_enabled(app: &crate::app::App) -> bool {
/// Passive I/O suspends commands without changing the logical input owner.
pub(crate) fn keyboard_owner_enabled(app: &crate::app::App) -> bool {
!app.hosted.visible
&& !app.context_help
&& app.workflow.is_none()
&& app.file_prompt.is_none()
&& !app.delete_pending
@@ -1497,7 +1497,9 @@ impl StateCanvas<'_> {
format!("{} · {} · right-click to edit", r.name, routing::state_transition_summary(self.project, r))
}
}).unwrap_or_default(),
_ => "Select / move · drag a vertex · drag selected transition endpoints to reconnect · middle-drag to pan".into(),
// General gestures are available in Help; keep this stable slot
// for the active operation or the item under the pointer.
_ => String::new(),
},
}
}
+9 -9
View File
@@ -225,13 +225,13 @@ fn selection_controls(app: &App) -> Element<'_, Message> {
}
controls = controls
.push(action(
"Clear selection",
"Clear",
Message::DiagramSelection(SelectionEvent::Clear(snapshot.context())),
))
.push(
label(format!(
"Properties edit only {}",
crate::views::short(app.project().named(app.selected), 18)
"Properties: {} only",
crate::views::short(app.project().named(app.selected), 10)
))
.wrapping(iced::widget::text::Wrapping::None),
);
@@ -241,12 +241,12 @@ fn selection_controls(app: &App) -> Element<'_, Message> {
} else {
"Use Select / move to select multiple elements"
};
column![
controls,
label(hint).wrapping(iced::widget::text::Wrapping::None)
]
.height(56)
.into()
controls
.push(crate::views::diagram_help(
crate::guide::Topic::States,
hint,
))
.into()
}
fn transition_details(machine: Id, selected: Id) -> Element<'static, Message> {
@@ -585,15 +585,13 @@ fn selection_controls(app: &App) -> Element<'_, Message> {
.wrapping(iced::widget::text::Wrapping::None),
);
}
// These two rows exist even with an empty set so selection never moves the
// canvas viewport or changes the camera's interpretation of the pointer.
column![
controls,
label("Shift+click toggles · drag selected cards to reorder · previews are read-only")
.wrapping(iced::widget::text::Wrapping::None)
]
.height(56)
.into()
// Keep the row even with an empty set so selection never moves the canvas.
controls
.push(crate::views::diagram_help(
crate::guide::Topic::Chains,
"Shift-click toggles selection. Drag selected local cards to reorder; reused previews are read-only.",
))
.into()
}
fn editor_panel<'a, R: iced::advanced::text::Renderer + 'a>(
+17 -6
View File
@@ -42,7 +42,6 @@ mod port_labels;
pub use port_labels::PortLabels;
#[path = "diagram/focus.rs"]
pub(crate) mod focus;
mod grid;
pub(crate) mod group_gesture;
mod multiselect;
#[cfg(test)]
@@ -72,7 +71,6 @@ pub struct DiagramCanvas<'a> {
}
#[derive(Default)]
pub struct State {
grid: grid::Grid,
modifiers: iced::keyboard::Modifiers,
group: Option<multiselect::Press>,
work: Option<Arc<crate::app::allocation_drag::Press>>,
@@ -1253,10 +1251,23 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
bounds: Rectangle,
_: mouse::Cursor,
) -> Vec<canvas::Geometry> {
let background = state
.grid
.draw(renderer, bounds.size(), self.zoom, self.pan);
let mut f = Frame::new(renderer, bounds.size());
f.fill_rectangle(
Point::ORIGIN,
bounds.size(),
Color::from_rgb8(246, 248, 251),
);
let step = (24. * self.zoom).max(14.);
let ox = self.pan.x.rem_euclid(step);
let oy = self.pan.y.rem_euclid(step);
for x in 0..(bounds.width / step) as i32 + 1 {
for y in 0..(bounds.height / step) as i32 + 1 {
f.fill(
&Path::circle(Point::new(ox + x as f32 * step, oy + y as f32 * step), 0.65),
style::LINE,
);
}
}
f.translate(self.pan);
f.scale(self.zoom);
let scene = self.scene(state);
@@ -1659,7 +1670,7 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
..Default::default()
});
}
vec![background, f.into_geometry(), overlay.into_geometry()]
vec![f.into_geometry(), overlay.into_geometry()]
}
fn mouse_interaction(
&self,
-50
View File
@@ -1,50 +0,0 @@
//! Screen-space background geometry, independent of the model and pointer.
use super::*;
use std::cell::Cell;
#[derive(Default)]
pub(super) struct Grid {
geometry: canvas::Cache,
camera: Cell<Option<(f32, Vector)>>,
#[cfg(test)]
builds: Cell<usize>,
}
impl Grid {
pub(super) fn draw(
&self,
renderer: &Renderer,
size: Size,
zoom: f32,
pan: Vector,
) -> canvas::Geometry {
// Cache::draw handles exact size changes. Raw camera equality is
// deliberately conservative: do not quantize fractional antialiasing.
if self.camera.replace(Some((zoom, pan))) != Some((zoom, pan)) {
self.geometry.clear();
}
self.geometry.draw(renderer, size, |frame| {
#[cfg(test)]
self.builds.set(self.builds.get() + 1);
paint(frame, size, zoom, pan);
})
}
}
fn paint(frame: &mut Frame, size: Size, zoom: f32, pan: Vector) {
frame.fill_rectangle(Point::ORIGIN, size, Color::from_rgb8(246, 248, 251));
let step = (24. * zoom).max(14.);
let ox = pan.x.rem_euclid(step);
let oy = pan.y.rem_euclid(step);
for x in 0..(size.width / step) as i32 + 1 {
for y in 0..(size.height / step) as i32 + 1 {
frame.fill(
&Path::circle(Point::new(ox + x as f32 * step, oy + y as f32 * step), 0.65),
style::LINE,
);
}
}
}
#[cfg(test)]
mod tests;
-378
View File
@@ -1,378 +0,0 @@
use super::*;
use iced::advanced::{
graphics::geometry::Renderer as _,
renderer::{Headless, Renderer as _},
};
async fn renderer() -> Renderer {
<Renderer as Headless>::new(iced::Font::DEFAULT, 16.into(), None)
.await
.expect("grid tests require the supported WGPU headless renderer")
}
#[tokio::test]
async fn cache_reuses_unchanged_inputs_and_rebuilds_for_each_camera_or_size_change() {
let renderer = renderer().await;
let grid = Grid::default();
let original = Size::new(320., 240.);
let threshold = 14. / 24.;
// Each row changes exactly one dependency from its predecessor. Returning
// to old dimensions must invalidate too; this cache holds one viewport.
let cases = [
("initial", original, 1., Vector::ZERO),
("positive x pan", original, 1., Vector::new(24., 0.)),
("negative x pan", original, 1., Vector::new(-24., 0.)),
("fractional x pan", original, 1., Vector::new(-24.25, 0.)),
("positive y pan", original, 1., Vector::new(-24.25, 18.)),
("negative y pan", original, 1., Vector::new(-24.25, -18.)),
("fractional y pan", original, 1., Vector::new(-24.25, -18.5)),
("return to zero pan", original, 1., Vector::ZERO),
("zoom at zero pan", original, 1.25, Vector::ZERO),
(
"below spacing threshold",
original,
threshold - 0.001,
Vector::ZERO,
),
("at spacing threshold", original, threshold, Vector::ZERO),
(
"above spacing threshold",
original,
threshold + 0.001,
Vector::ZERO,
),
(
"width only",
Size::new(321., 240.),
threshold + 0.001,
Vector::ZERO,
),
("return width", original, threshold + 0.001, Vector::ZERO),
(
"height only",
Size::new(320., 241.),
threshold + 0.001,
Vector::ZERO,
),
("return height", original, threshold + 0.001, Vector::ZERO),
(
"fractional width",
Size::new(320.25, 240.),
threshold + 0.001,
Vector::ZERO,
),
(
"fractional height",
Size::new(320.25, 240.5),
threshold + 0.001,
Vector::ZERO,
),
];
for (index, (label, size, zoom, pan)) in cases.into_iter().enumerate() {
let _ = grid.draw(&renderer, size, zoom, pan);
assert_eq!(grid.builds.get(), index + 1, "{label} must rebuild");
for _ in 0..3 {
let _ = grid.draw(&renderer, size, zoom, pan);
assert_eq!(grid.builds.get(), index + 1, "{label} must reuse");
}
}
}
// Independent reference copied from the former DiagramCanvas::draw background
// pass. Do not call grid::paint here: a shared implementation would hide changes
// in spacing, phase, radius, color, or coverage from the parity comparison.
fn legacy_background(frame: &mut Frame, size: Size, zoom: f32, pan: Vector) {
frame.fill_rectangle(Point::ORIGIN, size, Color::from_rgb8(246, 248, 251));
let spacing = (24. * zoom).max(14.);
let offset_x = pan.x.rem_euclid(spacing);
let offset_y = pan.y.rem_euclid(spacing);
for column in 0..(size.width / spacing) as i32 + 1 {
for row in 0..(size.height / spacing) as i32 + 1 {
frame.fill(
&Path::circle(
Point::new(
offset_x + column as f32 * spacing,
offset_y + row as f32 * spacing,
),
0.65,
),
Color::from_rgb(0.86, 0.89, 0.91),
);
}
}
}
fn foreground(frame: &mut Frame, zoom: f32, pan: Vector, changed: bool) {
frame.translate(pan);
frame.scale(zoom);
// Crossing paths pass behind opaque cards. The long paths also cross the
// screen-space warning, making geometry order observable.
for (start, end, color) in [
(Point::new(0., 20.), Point::new(300., 210.), style::TEAL),
(Point::new(0., 210.), Point::new(300., 20.), style::BOUNDARY),
] {
frame.stroke(
&Path::line(start, end),
Stroke::default().with_color(color).with_width(3.),
);
}
let shift = if changed { 19.5 } else { 0. };
frame.fill_rectangle(
Point::new(12., 92.),
Size::new(270., 35.),
Color::from_rgba(0.1, 0.6, 0.5, 0.25),
);
for (position, size, title) in [
(Point::new(32. + shift, 58.), Size::new(116., 72.), "Sensor"),
(Point::new(172., 139.), Size::new(118., 66.), "Controller"),
] {
frame.fill_rectangle(position, size, Color::WHITE);
frame.stroke(
&Path::rectangle(position, size),
Stroke::default().with_color(style::BOUNDARY).with_width(1.),
);
frame.fill_text(Text {
content: title.into(),
position: position + Vector::new(8., 12.),
color: style::INK,
size: 13.into(),
..Default::default()
});
}
// Selection paint and handles remain live foreground data, including when
// the underlying background cache is reused after an edit.
frame.stroke(
&Path::rectangle(Point::new(29. + shift, 55.), Size::new(122., 78.)),
Stroke::default().with_color(style::TEAL).with_width(2.),
);
frame.fill_rectangle(Point::new(26. + shift, 52.), Size::new(6., 6.), style::TEAL);
frame.fill_text(Text {
content: if changed {
"Edited connection"
} else {
"Connection"
}
.into(),
position: Point::new(116., 113.),
color: style::INK,
size: 11.into(),
..Default::default()
});
}
fn warning(frame: &mut Frame, size: Size) {
frame.fill_rectangle(
Point::new(8., 8.),
Size::new((size.width - 16.).max(0.), 30.),
Color::WHITE,
);
frame.fill_text(Text {
content: "1 connection route needs attention".into(),
position: Point::new(16., 15.),
color: style::MUTED,
size: 12.into(),
..Default::default()
});
}
fn legacy_geometry(
renderer: &Renderer,
size: Size,
zoom: f32,
pan: Vector,
changed: bool,
) -> Vec<canvas::Geometry> {
let mut combined = Frame::new(renderer, size);
legacy_background(&mut combined, size, zoom, pan);
foreground(&mut combined, zoom, pan, changed);
let mut overlay = Frame::new(renderer, size);
warning(&mut overlay, size);
vec![combined.into_geometry(), overlay.into_geometry()]
}
fn cached_geometry(
grid: &Grid,
renderer: &Renderer,
size: Size,
zoom: f32,
pan: Vector,
changed: bool,
) -> Vec<canvas::Geometry> {
let background = grid.draw(renderer, size, zoom, pan);
let mut content = Frame::new(renderer, size);
foreground(&mut content, zoom, pan, changed);
let mut overlay = Frame::new(renderer, size);
warning(&mut overlay, size);
vec![background, content.into_geometry(), overlay.into_geometry()]
}
fn pixels(renderer: &mut Renderer, size: Size, geometry: Vec<canvas::Geometry>) -> Vec<u8> {
// Keep physical screenshot dimensions and renderer viewport consistent even
// for fractional canvas bounds; the geometry itself keeps its exact size.
let physical = Size::new(size.width.ceil() as u32, size.height.ceil() as u32);
renderer.reset(Rectangle::with_size(Size::new(
physical.width as f32,
physical.height as f32,
)));
for layer in geometry {
renderer.draw_geometry(layer);
}
let pixels = Headless::screenshot(renderer, physical, 1., style::BG);
assert_eq!(
pixels.len(),
physical.width as usize * physical.height as usize * 4
);
pixels
}
fn assert_same_pixels(expected: &[u8], actual: &[u8], label: &str) {
assert_eq!(expected.len(), actual.len(), "{label}: dimensions");
let differing = expected
.as_chunks::<4>()
.0
.iter()
.zip(actual.as_chunks::<4>().0)
.filter(|(a, b)| a != b)
.count();
assert_eq!(differing, 0, "{label}: changed RGBA pixels");
}
#[tokio::test]
async fn cached_background_preserves_pixels_and_live_foreground_across_camera_and_size_changes() {
let mut renderer = renderer().await;
let grid = Grid::default();
let original = Size::new(320., 240.);
let threshold = 14. / 24.;
for (label, size, zoom, pan) in [
("origin", original, 1., Vector::ZERO),
("positive pan", original, 1., Vector::new(17., 11.)),
("negative pan", original, 1., Vector::new(-17., -11.)),
("fractional pan", original, 1., Vector::new(-17.25, 11.5)),
("zoom zero pan", original, 1.25, Vector::ZERO),
("below threshold", original, threshold - 0.001, Vector::ZERO),
("at threshold", original, threshold, Vector::ZERO),
("above threshold", original, threshold + 0.001, Vector::ZERO),
("width resize", Size::new(327., 240.), 1., Vector::ZERO),
("height resize", Size::new(327., 247.), 1., Vector::ZERO),
("return size", original, 1., Vector::ZERO),
(
"fractional bounds",
Size::new(319.25, 239.5),
1.,
Vector::new(-0.5, 0.25),
),
] {
let old = legacy_geometry(&renderer, size, zoom, pan, false);
let expected = pixels(&mut renderer, size, old);
let layers = cached_geometry(&grid, &renderer, size, zoom, pan, false);
let actual = pixels(&mut renderer, size, layers);
assert_same_pixels(&expected, &actual, label);
let builds = grid.builds.get();
let reused = cached_geometry(&grid, &renderer, size, zoom, pan, false);
let reused = pixels(&mut renderer, size, reused);
assert_same_pixels(&expected, &reused, label);
assert_eq!(grid.builds.get(), builds, "{label}: screenshot reuse");
let edited_old = legacy_geometry(&renderer, size, zoom, pan, true);
let edited_expected = pixels(&mut renderer, size, edited_old);
assert_ne!(
expected, edited_expected,
"{label}: edit must visibly change foreground"
);
let edited = cached_geometry(&grid, &renderer, size, zoom, pan, true);
let edited = pixels(&mut renderer, size, edited);
assert_same_pixels(&edited_expected, &edited, label);
assert_eq!(
grid.builds.get(),
builds,
"{label}: foreground edit must reuse grid"
);
}
}
#[tokio::test]
async fn actual_canvas_keeps_background_cached_while_selection_and_revision_change() {
use super::super::{Context, DiagramCanvas, State};
let mut renderer = renderer().await;
let mut project = Project::empty();
let a = project
.add_element(Kind::Entity, Layer::Oa, "Sensor", None)
.unwrap();
let b = project
.add_element(Kind::Actor, Layer::Oa, "Controller", None)
.unwrap();
let diagram = project.ensure_diagram(Layer::Oa);
project.diagrams.get_mut(&diagram).unwrap().projection = ProjectionKind::Overview;
let node = project.place(diagram, a, Position { x: 20., y: 50. });
project.place(diagram, b, Position { x: 100., y: 160. });
project.relate(RelationKind::CommunicationMean, "Link", a, b);
let mut canvas = DiagramCanvas {
selection: None,
allocation: None,
project: &project,
view_index: None,
diagram,
selected: a,
navigation_focus: None,
zoom: 0.75,
pan: Vector::ZERO,
context: Context {
document: project.id,
diagram,
revision: 0,
epoch: 0,
},
selected_bend: None,
selected_attachment: None,
editable: true,
placing: false,
connection: None,
};
let state = State::default();
let size = Size::new(360., 280.);
let bounds = Rectangle::with_size(size);
let draw = |canvas: &DiagramCanvas<'_>, renderer: &Renderer, bounds| {
canvas::Program::draw(
canvas,
&state,
renderer,
&crate::style::theme(),
bounds,
mouse::Cursor::Unavailable,
)
};
let layers = draw(&canvas, &renderer, bounds);
assert_eq!(layers.len(), 3, "background, scene, warning overlay");
let original = pixels(&mut renderer, size, layers);
assert_eq!(state.grid.builds.get(), 1);
canvas.selected = b;
let layers = draw(&canvas, &renderer, bounds);
let selected = pixels(&mut renderer, size, layers);
assert_ne!(original, selected, "selection must remain live");
assert_eq!(state.grid.builds.get(), 1);
let mut changed = project.clone();
changed
.diagrams
.get_mut(&diagram)
.unwrap()
.nodes
.get_mut(&node)
.unwrap()
.position
.x += 30.;
canvas.project = &changed;
canvas.context.revision += 1;
let layers = draw(&canvas, &renderer, bounds);
let moved = pixels(&mut renderer, size, layers);
assert_ne!(selected, moved, "new model revision must remain live");
assert_eq!(state.grid.builds.get(), 1);
canvas.pan.x = -0.25;
let _ = draw(&canvas, &renderer, bounds);
assert_eq!(state.grid.builds.get(), 2);
let _ = draw(
&canvas,
&renderer,
Rectangle::with_size(Size::new(361., 280.)),
);
assert_eq!(state.grid.builds.get(), 3);
}
@@ -243,21 +243,6 @@ impl canvas::Program<Message> for WorkFeedback<'_> {
let Some(frozen) = &feedback.frozen else {
return vec![];
};
if let Some(delta) = feedback.ghost_delta {
for region in &frozen.moving {
let top = Point::new(
(region.x + delta.x) * self.0.zoom + self.0.pan.x,
(region.y + delta.y) * self.0.zoom + self.0.pan.y,
);
frame.stroke(
&Path::rectangle(
top,
iced::Size::new(region.width * self.0.zoom, region.height * self.0.zoom),
),
Stroke::default().with_color(color).with_width(2.),
);
}
}
for index in &feedback.targets {
let target = &frozen.targets[*index];
let region = target.region;
+25 -4
View File
@@ -48,6 +48,11 @@ pub enum Event {
pub(crate) const ARTICLE_SCROLL_ID: &str = "engineering-guide-article";
mod context_help;
pub(crate) use context_help::{
ContextScroll, context_scroll_key, context_scroll_task, protect_workspace,
};
impl State {
/// Returns whether navigation selected a different article.
pub fn update(&mut self, event: Event) -> bool {
@@ -310,7 +315,7 @@ fn article(topic: Topic) -> Article {
"Use the diagram selector or + View to work with a focused diagram. View properties edits its name, perspective, projection and Saved view visibility. Apply changes commits the view settings.",
"Choose Containment for semantic children, Architecture · allocated work for responsibilities, Functional dataflow for work and exchanges, or Missions & capabilities for outcomes. All relationships explores one layer; OA ↔ SA traceability can show placed elements from both layers and their correspondence lines alongside ordinary relationships.",
"Select an element and edit Semantic parent to change ownership. Use the Allocation palette tool to connect a performer to existing unallocated leaf work in Containment. The relationship can appear as a line there; Architecture · allocated work shows responsibility through nesting instead. Saved visibility filters can hide a line without removing the relationship.",
"Scroll to zoom and use Fit to frame the current view. In allocated-work views, dragging work changes its assignment and placement together. Choose Arrange next drag or press Alt+A to move work without changing responsibility for that one drag; Escape cancels the armed action. Auto-layout arranges the whole view. Export SVG produces a shareable view.",
"Scroll to zoom and use Fit to frame the current view. In allocated-work views, dragging work changes its assignment and placement together. Choose Arrange or press Alt+A to move work without changing responsibility for that one drag; Escape cancels the armed action. Auto-layout arranges the whole view. Export SVG produces a shareable view.",
"Select a diagram node to access Placement, Fold / unfold and Hide. With the canvas focused, Delete hides its placement; Shift+Delete asks to remove the model element. Other views retain a hidden element. Undo restores either change.",
],
),
@@ -334,7 +339,7 @@ fn article(topic: Topic) -> Article {
"Finish or cancel property and source edits, then drag an Activity or Function body in Architecture · allocated work. Aim at exposed performer space, including a collapsed performer's header. Read Destination above the canvas and the outlined target before releasing; release outside the canvas or press Escape to cancel.",
"Use Shift-click to add or remove cards from the selection, or right-click a card and choose Add to selection. Drag any selected work card to assign the whole work selection to one performer. Independent work can start on different performers. The inspector keeps its primary element during the drag; right-click a selected card and choose Inspect this element to change that primary without losing the group.",
"The move preserves work ownership and identities. A composite work card moves its leaves together when they have one coherent responsibility; if its own leaves are distributed across performers, choose specific leaves instead. Role responsibilities remain explicit: an outward drag that would leave a role-derived performer explains why it cannot remove that responsibility.",
"To move work and performers together without changing responsibility, select their cards and choose Arrange next drag or press Alt+A. This moves the selected work subtrees and each selected performer's contained cards together, if the complete layout stays readable and clear. Ports and connections cannot join a placement move. Dragging only performer cards normally moves them and their contained cards without changing assignments.",
"To move work and performers together without changing responsibility, select their cards and choose Arrange or press Alt+A. This moves the selected work subtrees and each selected performer's contained cards together, if the complete layout stays readable and clear. Ports and connections cannot join a placement move. Dragging only performer cards normally moves them and their contained cards without changing assignments.",
"Make room when work cards would overlap, and move the view or zoom in if the moving work is not readable. The destination name stays above the canvas while the target outline stays fixed during the drag. Hover Destination to inspect a long name: outside the canvas, the tooltip explicitly identifies the last target, and releasing cancels. Return to the canvas to choose the drop. A refused drop keeps the model and history unchanged. One Undo reverses an accepted assignment and placement together; Save all writes the corresponding source changes.",
],
),
@@ -463,6 +468,10 @@ fn article(topic: Topic) -> Article {
summary: "An operational Process or system Functional chain connects contributions of existing work and exchanges, including alternatives and reusable procedures. It explains how work contributes to an outcome.",
keywords: "process functional chain ordered occurrence sequence path involvement dataflow exchange repeated steps caller contextual qualified assembly common work focus reuse",
sections: &[
explain(
"Select a group",
"Use Select, then Shift-click to add or remove contributions from the selection. Drag selected local cards to reorder them in the same column. Reused previews are read-only; open their referenced definition to edit. Properties affect only the primary selected item. Help or F1 opens this guide without leaving the diagram; Close or Escape returns to editing.",
),
walkthrough(
"Describe a path through exchanges",
&[
@@ -569,6 +578,10 @@ fn article(topic: Topic) -> Article {
summary: "Describe the conditions in which the operation or system behaves differently. States and modes belong to regions within a state machine.",
keywords: "state machine mode region initial final transition trigger guard effect entry exit do availability degraded nominal diagram draw reconnect local internal timed fold unfold placement pan zoom undo",
sections: &[
explain(
"Select a group",
"Choose Select / move, then Shift-click to add or remove elements from the selection. Properties affect only the primary selected item; Hide selected removes placements from this view. Help or F1 opens this guide without leaving the diagram; Close or Escape returns to editing.",
),
walkthrough(
"Build a state machine",
&[
@@ -1156,6 +1169,14 @@ fn topic_button(topic: Topic, selected: bool) -> iced::widget::Button<'static, M
}
fn article_view(topic: Topic) -> Element<'static, Message> {
article_content(topic, true)
}
pub(crate) fn context_view(state: &State) -> Element<'static, Message> {
article_content(state.topic, false)
}
fn article_content(topic: Topic, navigation: bool) -> Element<'static, Message> {
let article = article(topic);
let mut content = column![
text(topic.category()).size(11).color(style::MUTED),
@@ -1194,14 +1215,14 @@ fn article_view(topic: Topic) -> Element<'static, Message> {
}
content = content.push(container(body).padding(20).width(Fill).style(style::card));
}
if let Some((page, label)) = article.destination {
if navigation && let Some((page, label)) = article.destination {
content = content.push(
button(text(label).size(13))
.padding([11, 15])
.on_press(Message::Page(page)),
);
}
if topic == Topic::FirstProject {
if navigation && topic == Topic::FirstProject {
content = content.push(text("For a worked model, open the water-pressure walkthrough. Copy the whole examples/release1 folder and open the copied project.arcadia before editing; read its README.md. If you use Save as, also copy evidence/ beside the new entry: Save as copies model source, not external artifact targets.").size(13));
content = content.push(
button(text("Open water-pressure walkthrough").size(13))
+282
View File
@@ -0,0 +1,282 @@
//! Modal reading input and preservation of the mounted editing workspace.
use super::ARTICLE_SCROLL_ID;
use crate::app::Message;
use iced::Element;
#[derive(Debug, Clone, Copy)]
pub(crate) enum ContextScroll {
LineUp,
LineDown,
PageUp,
PageDown,
Home,
End,
}
pub(crate) fn context_scroll_key(
event: iced::Event,
status: iced::event::Status,
_: iced::window::Id,
) -> Option<Message> {
use iced::keyboard::{Event, Key, key::Named};
let iced::Event::Keyboard(Event::KeyPressed { key, modifiers, .. }) = event else {
return None;
};
if status == iced::event::Status::Captured || !modifiers.is_empty() {
return None;
}
let scroll = match key {
Key::Named(Named::ArrowUp) => ContextScroll::LineUp,
Key::Named(Named::ArrowDown) => ContextScroll::LineDown,
Key::Named(Named::PageUp) => ContextScroll::PageUp,
Key::Named(Named::PageDown) => ContextScroll::PageDown,
Key::Named(Named::Home) => ContextScroll::Home,
Key::Named(Named::End) => ContextScroll::End,
_ => return None,
};
Some(Message::ContextHelpScroll(scroll))
}
pub(crate) fn context_scroll_task(scroll: ContextScroll) -> iced::Task<Message> {
struct Scroll(ContextScroll);
impl<T> iced::advanced::widget::Operation<T> for Scroll {
fn traverse(
&mut self,
visit: &mut dyn FnMut(&mut dyn iced::advanced::widget::Operation<T>),
) {
visit(self);
}
fn scrollable(
&mut self,
id: Option<&iced::advanced::widget::Id>,
bounds: iced::Rectangle,
content_bounds: iced::Rectangle,
_: iced::Vector,
state: &mut dyn iced::advanced::widget::operation::Scrollable,
) {
use iced::advanced::widget::operation::scrollable::{AbsoluteOffset, RelativeOffset};
if id != Some(&iced::advanced::widget::Id::new(ARTICLE_SCROLL_ID)) {
return;
}
match self.0 {
ContextScroll::Home | ContextScroll::End => state.snap_to(RelativeOffset {
x: None,
y: Some(if matches!(self.0, ContextScroll::End) {
1.
} else {
0.
}),
}),
scroll => {
let y = match scroll {
ContextScroll::LineUp => -40.,
ContextScroll::LineDown => 40.,
ContextScroll::PageUp => -bounds.height * 0.9,
ContextScroll::PageDown => bounds.height * 0.9,
_ => unreachable!(),
};
// Iced clamps this movement to the actual content bounds.
state.scroll_by(AbsoluteOffset { x: 0., y }, bounds, content_bounds);
}
}
}
}
iced::advanced::widget::operate(Scroll(scroll))
}
/// Keep the mounted editor and its caret, but prevent modal input from reaching
/// widget-internal state before the App message guard can reject edits.
pub(crate) fn protect_workspace<'a, R: iced::advanced::renderer::Renderer + 'a>(
help_open: bool,
content: Element<'a, Message, iced::Theme, R>,
) -> Element<'a, Message, iced::Theme, R> {
Element::new(WorkspaceInput { help_open, content })
}
struct WorkspaceInput<'a, R> {
help_open: bool,
content: Element<'a, Message, iced::Theme, R>,
}
#[derive(Default)]
struct WorkspaceInputState {
help_open: bool,
}
impl<R: iced::advanced::renderer::Renderer> iced::advanced::Widget<Message, iced::Theme, R>
for WorkspaceInput<'_, R>
{
fn tag(&self) -> iced::advanced::widget::tree::Tag {
iced::advanced::widget::tree::Tag::of::<WorkspaceInputState>()
}
fn state(&self) -> iced::advanced::widget::tree::State {
iced::advanced::widget::tree::State::new(WorkspaceInputState::default())
}
fn children(&self) -> Vec<iced::advanced::widget::Tree> {
vec![iced::advanced::widget::Tree::new(self.content.as_widget())]
}
fn diff(&self, tree: &mut iced::advanced::widget::Tree) {
tree.diff_children(std::slice::from_ref(&self.content));
}
fn size(&self) -> iced::Size<iced::Length> {
self.content.as_widget().size()
}
fn size_hint(&self) -> iced::Size<iced::Length> {
self.content.as_widget().size_hint()
}
fn layout(
&mut self,
tree: &mut iced::advanced::widget::Tree,
renderer: &R,
limits: &iced::advanced::layout::Limits,
) -> iced::advanced::layout::Node {
self.content
.as_widget_mut()
.layout(&mut tree.children[0], renderer, limits)
}
fn operate(
&mut self,
tree: &mut iced::advanced::widget::Tree,
layout: iced::advanced::Layout<'_>,
renderer: &R,
operation: &mut dyn iced::advanced::widget::Operation,
) {
self.content
.as_widget_mut()
.operate(&mut tree.children[0], layout, renderer, operation);
}
fn update(
&mut self,
tree: &mut iced::advanced::widget::Tree,
event: &iced::Event,
layout: iced::advanced::Layout<'_>,
cursor: iced::mouse::Cursor,
renderer: &R,
clipboard: &mut dyn iced::advanced::Clipboard,
shell: &mut iced::advanced::Shell<'_, Message>,
viewport: &iced::Rectangle,
) {
let entering = {
let state = tree.state.downcast_mut::<WorkspaceInputState>();
let entering = self.help_open && !state.help_open;
state.help_open = self.help_open;
entering
};
if entering {
// Retire held gestures without executing their release actions.
// Text controls keep their real caret/focus; drawing tools remain
// selected, but an old drag cannot resume when Help is dismissed.
for event in [
iced::mouse::Event::CursorLeft,
iced::mouse::Event::ButtonReleased(iced::mouse::Button::Left),
iced::mouse::Event::ButtonReleased(iced::mouse::Button::Middle),
iced::mouse::Event::ButtonReleased(iced::mouse::Button::Right),
] {
let mut discarded = Vec::new();
let mut cancellation = iced::advanced::Shell::new(&mut discarded);
self.content.as_widget_mut().update(
&mut tree.children[0],
&iced::Event::Mouse(event),
layout,
iced::mouse::Cursor::Unavailable,
renderer,
clipboard,
&mut cancellation,
viewport,
);
shell.request_redraw_at(cancellation.redraw_request());
if cancellation.is_layout_invalid() {
shell.invalidate_layout();
}
if cancellation.are_widgets_invalid() {
shell.invalidate_widgets();
}
}
}
if self.help_open
&& matches!(
event,
iced::Event::Keyboard(
iced::keyboard::Event::KeyPressed { .. }
| iced::keyboard::Event::KeyReleased { .. }
) | iced::Event::Mouse(_)
| iced::Event::Touch(_)
| iced::Event::InputMethod(_)
)
{
return;
}
// ModifiersChanged and passive window/redraw events still reach the
// editor, so releasing Shift during Help cannot stick on return.
self.content.as_widget_mut().update(
&mut tree.children[0],
event,
layout,
cursor,
renderer,
clipboard,
shell,
viewport,
);
}
fn draw(
&self,
tree: &iced::advanced::widget::Tree,
renderer: &mut R,
theme: &iced::Theme,
style: &iced::advanced::renderer::Style,
layout: iced::advanced::Layout<'_>,
cursor: iced::mouse::Cursor,
viewport: &iced::Rectangle,
) {
self.content.as_widget().draw(
&tree.children[0],
renderer,
theme,
style,
layout,
cursor,
viewport,
);
}
fn mouse_interaction(
&self,
tree: &iced::advanced::widget::Tree,
layout: iced::advanced::Layout<'_>,
cursor: iced::mouse::Cursor,
viewport: &iced::Rectangle,
renderer: &R,
) -> iced::mouse::Interaction {
if self.help_open {
iced::mouse::Interaction::None
} else {
self.content.as_widget().mouse_interaction(
&tree.children[0],
layout,
cursor,
viewport,
renderer,
)
}
}
fn overlay<'b>(
&'b mut self,
tree: &'b mut iced::advanced::widget::Tree,
layout: iced::advanced::Layout<'b>,
renderer: &R,
viewport: &iced::Rectangle,
translation: iced::Vector,
) -> Option<iced::advanced::overlay::Element<'b, Message, iced::Theme, R>> {
if self.help_open {
None
} else {
self.content.as_widget_mut().overlay(
&mut tree.children[0],
layout,
renderer,
viewport,
translation,
)
}
}
}
+151 -110
View File
@@ -25,6 +25,23 @@ pub fn action<'a>(s: &str, m: Message) -> widget::Button<'a, Message> {
.on_press(m)
.style(style::nav)
}
/// Optional instructions belong beside the work, without taking a canvas row.
/// The button also opens keyboard-accessible help; the tooltip is only a preview.
pub(crate) fn diagram_help<'a>(
topic: crate::guide::Topic,
hint: impl Into<String>,
) -> View<'a, Message> {
tooltip(
action("Help · F1", Message::ContextHelp(topic)),
container(text(hint.into()).size(12))
.padding(10)
.max_width(360)
.style(style::card),
tooltip::Position::Bottom,
)
.into()
}
pub fn short(s: &str, limit: usize) -> String {
let s = s.split_whitespace().collect::<Vec<_>>().join(" ");
if s.graphemes(true).count() > limit {
@@ -240,11 +257,23 @@ pub fn view(app: &App) -> View<'_, Message> {
if !matches!(app.page, Page::Home | Page::Text | Page::Guide) {
body = body.push(inspector(app));
}
let diagram_feedback = diagram_feedback(app);
// Keep operation outcomes visible even while a drawing hint is active.
let (status, status_detail) = if app.busy {
("Working…".into(), "Working…".into())
} else if let Some(feedback) = diagram_feedback.filter(|feedback| *feedback != app.status) {
(
format!("{} · {}", short(&app.status, 60), short(&feedback, 80)),
format!("{}\n{}", app.status, feedback),
)
} else {
(short(&app.status, 145), app.status.clone())
};
let footer = container(
row![
container(tooltip(
text(short(if app.busy { "Working…" } else { &app.status }, 145)).size(11),
container(text(if app.busy { "Working…" } else { &app.status }).size(12))
text(status).size(11).wrapping(widget::text::Wrapping::None),
container(text(status_detail).size(12))
.padding(10)
.max_width(600)
.style(style::card),
@@ -267,6 +296,25 @@ pub fn view(app: &App) -> View<'_, Message> {
.padding([4, 16])
.style(style::panel);
let root = crate::allocation_input::root(app, column![header, task_nav, body, footer]);
let root = crate::guide::protect_workspace(app.context_help, root);
if app.context_help {
return modal_width(
root,
column![
row![
text("Diagram help").size(18),
Space::new().width(Fill),
action("Close · Esc", Message::CloseContextHelp),
]
.align_y(iced::Center),
crate::guide::context_view(&app.guide),
]
.spacing(12)
.height((app.window_size.height - 140.).max(300.))
.into(),
(app.window_size.width - 80.).min(900.),
);
}
if app.architecture.as_ref().is_some_and(|s| s.modal()) {
return modal_width(
root,
@@ -362,7 +410,8 @@ pub fn view(app: &App) -> View<'_, Message> {
(app.window_size.width - 32.).clamp(120., 760.),
);
}
root
// Match modal_width's first child so help does not recreate the editor tree.
widget::stack![root].into()
}
fn modal<'a>(base: View<'a, Message>, content: View<'a, Message>) -> View<'a, Message> {
modal_width(base, content, 800.)
@@ -447,7 +496,7 @@ fn diagram(app: &App) -> View<'_, Message> {
.active_diagram
.and_then(|id| app.project().diagrams.get(&id))
.map(|d| d.projection);
let modes = row![
let mut modes = row![
label("View content"),
pick_list(
[
@@ -462,7 +511,15 @@ fn diagram(app: &App) -> View<'_, Message> {
Message::Projection
)
.padding(8)
.text_size(12)
.text_size(12),
diagram_help(
crate::guide::Topic::Nesting,
if projection == Some(ProjectionKind::Traceability) {
"Shows OA and SA elements with correspondence lines. Place both ends of a trace to show it; port traces use their owner cards. Open Help for trace visibility and editing controls."
} else {
"Shift-click to add or remove selection. Right-click for actions; drag to arrange; scroll to zoom. Drag a connection line, bend or label to move it; Insert adds a bend and Escape cancels. Open Help for full editing controls."
},
)
]
.spacing(10)
.align_y(iced::Center);
@@ -555,6 +612,26 @@ fn diagram(app: &App) -> View<'_, Message> {
.center(Fill)
.into()
};
if projection == Some(ProjectionKind::Allocation) {
modes = modes.push(tooltip(
action(
if app.allocation_drag.arrange_next {
"Arrange ✓"
} else {
"Arrange"
},
Message::WorkDrag(crate::app::allocation_drag::Event::ArrangeNext),
),
container(text(format!(
"Arrange next drag · {}. Move work within its current allocation; Escape cancels.",
crate::allocation_input::ARRANGE_SHORTCUT
)))
.padding(10)
.max_width(420)
.style(style::card),
tooltip::Position::Bottom,
));
}
let mut tools = column![toolbar].spacing(8);
if app.active_diagram.is_some() {
tools = tools.push(modes);
@@ -568,82 +645,50 @@ fn diagram(app: &App) -> View<'_, Message> {
.feedback
.as_ref()
.map(|feedback| feedback.destination_identity())
.unwrap_or_else(|| "None · drag work to choose".into());
.unwrap_or_else(|| "—".into());
let inspection = app
.allocation_drag
.feedback
.as_ref()
.map(|feedback| feedback.inspection_identity())
.unwrap_or_else(|| destination.clone());
tools = tools.push(
container(tooltip(
text(format!("Destination: {}", short(&destination, 28)))
.size(13)
.wrapping(widget::text::Wrapping::None),
container(text(inspection).size(13))
.padding(10)
.max_width(420)
.style(style::card),
tooltip::Position::Top,
))
.id("allocation-destination")
.height(26)
.width(Fill)
.clip(true),
);
tools = tools.push(
row![
action(
&format!(
"{} · {}",
if app.allocation_drag.arrange_next {
"Arrange next drag: armed"
} else {
"Arrange next drag"
},
crate::allocation_input::ARRANGE_SHORTCUT
),
Message::WorkDrag(crate::app::allocation_drag::Event::ArrangeNext)
),
label("Drag work into a performer to assign · out to remove assignment")
]
.spacing(8)
.align_y(iced::Center),
);
let destination_control = container(tooltip(
text(format!("Destination: {}", short(&destination, 28)))
.size(13)
.wrapping(widget::text::Wrapping::None),
container(text(inspection).size(13))
.padding(10)
.max_width(420)
.style(style::card),
tooltip::Position::Top,
))
.id("allocation-destination")
.height(26)
.width(Fill)
.clip(true);
tools = tools.push(destination_control);
}
if let Some(diagram) = app.active_diagram {
let view = oa_core::projection::project_view(app.project(), diagram);
if projection == Some(ProjectionKind::Traceability) {
let correspondence_lines = view.edges.iter().filter(|edge| edge.trace).count();
tools = tools.push(
column![
label("Shows OA and SA elements together, with correspondence lines alongside ordinary relationships."),
label("Place both ends of a trace to show its line. Port traces use their owner cards; traces between relationships are reviewed on the Traceability page."),
row![
label(format!("{correspondence_lines} correspondence lines in this view")),
action(
"Add existing elements…",
Message::Architecture(crate::app::architecture_authoring::Event::Existing(None))
),
action("Review layer traces", Message::ReviewLayerTraces),
action("View visibility…", Message::Select(diagram)),
]
.spacing(7)
.align_y(iced::Center)
.wrap(),
row![
label(format!("{correspondence_lines} trace lines")),
action(
"Add existing elements…",
Message::Architecture(crate::app::architecture_authoring::Event::Existing(
None
))
),
action("Review layer traces", Message::ReviewLayerTraces),
action("View visibility…", Message::Select(diagram)),
]
.spacing(4),
.spacing(7)
.align_y(iced::Center)
.wrap(),
);
}
let edge = view.edges.iter().find(|edge| edge.id == app.selected);
let promoted = edge.is_some_and(|edge| {
oa_core::projection::edge_endpoint_placements(
app.project(),
&app.project().diagrams[&diagram],
edge.id,
)
.is_some_and(|(source, target)| source != edge.source || target != edge.target)
});
let selection = app.multiselect_snapshot();
let count = selection.as_ref().map_or(0, |s| s.targets().len());
let mut selection_controls =
@@ -662,66 +707,62 @@ fn diagram(app: &App) -> View<'_, Message> {
}
selection_controls = selection_controls
.push(action(
"Clear selection",
"Clear",
Message::DiagramSelection(crate::app::multiselect::Event::Clear(
snapshot.context(),
)),
))
.push(
label(format!(
"Properties edit only {}",
short(app.project().named(app.selected), 36)
"Properties: {} only",
short(app.project().named(app.selected), 14)
))
.wrapping(widget::text::Wrapping::None),
);
}
let hint = if let Some(feedback) = &app.allocation_drag.feedback {
feedback.text.as_str()
} else if let Some(session) = &app.connection {
if session.source.is_some() {
if session.candidates.is_empty() {
"No compatible targets are visible. Expand containers or show an endpoint · Esc cancels"
} else {
"Choose a highlighted target · middle-drag or arrow keys pan · Esc cancels"
}
} else {
session.tool.hint()
}
} else if count > 1 {
if selection
.as_ref()
.is_some_and(|s| crate::app::multiselect::placements(s).is_some())
&& projection != Some(ProjectionKind::Allocation)
{
"Shift-click to add/remove · drag selected to move · right-click for actions · scroll to zoom"
} else {
"Shift-click to add/remove · right-click for selection actions · Esc clears selection"
}
} else if promoted {
"Expand endpoint containers to edit this connection route"
} else if edge.is_some() {
"Right-click for routing · drag line / bend / label · Insert adds a bend · Esc cancels"
} else {
"Shift-click to add/remove · right-click for actions · drag to arrange · scroll to zoom"
};
// Selection changes must not resize the measured canvas or refit its
// camera. Reserve both rows even when no group actions are available.
// Selection never moves the canvas. General controls live in Help;
// active gesture feedback uses the persistent application status bar.
tools = tools.push(
container(
column![
selection_controls,
label(hint).wrapping(widget::text::Wrapping::None)
]
.spacing(3),
)
.height(56)
.width(Fill)
.clip(true),
container(selection_controls)
.height(32)
.width(Fill)
.clip(true),
);
}
column![container(tools).padding(14), canvas].into()
}
fn diagram_feedback(app: &App) -> Option<String> {
if app.page != Page::Diagram {
return None;
}
if let Some(feedback) = &app.allocation_drag.feedback {
return Some(feedback.text.clone());
}
if let Some(session) = &app.connection {
return Some(
if session.source.is_none() {
session.tool.hint()
} else if session.candidates.is_empty() {
"No compatible targets visible. Expand containers or show an endpoint · Esc cancels"
} else {
"Choose a highlighted target · Esc cancels"
}
.into(),
);
}
let diagram = app.active_diagram?;
let view = oa_core::projection::project_view(app.project(), diagram);
let edge = view.edges.iter().find(|edge| edge.id == app.selected)?;
let (source, target) = oa_core::projection::edge_endpoint_placements(
app.project(),
&app.project().diagrams[&diagram],
edge.id,
)?;
(source != edge.source || target != edge.target)
.then(|| "Expand endpoint containers to edit this connection route".into())
}
fn inspector(app: &App) -> View<'_, Message> {
let p = app.project();
if let Some(target) = app.process_preview_primary() {
+2
View File
@@ -2,6 +2,8 @@
The normative contract is [language.rst](language.rst); [scope.md](scope.md) explains deliberate differences from the complete Arcadia/Capella ecosystem. V2 uses one typed model and one validated mutation boundary across the desktop, text editor and REST service.
Desktop changes follow the [editing workspace UX review criteria](ui-review.md) for concise persistent content, contextual help, visible actionable feedback and native interaction review.
## Crate boundaries
| Crate | Responsibility | Does not depend on |
+1 -13
View File
@@ -2702,19 +2702,7 @@ performer change with diagram placement. The preview MUST identify the
destination and preserve readable work and destination identity. Destination
identity is shown outside the canvas, independently of explanatory or refusal
text. The outlined target's hit region remains fixed throughout the gesture;
feedback MUST NOT obscure the work. Preserve pointer-relative placement when
the requested position is valid. When an outgoing drop would leave work
overlapping its former performer, the editor MAY propose a minimal grid-aligned
translation through a crossed performer boundary, with one grid unit of
clearance. It MUST preview that exact position, translate the complete affected
work group rigidly, and recheck all semantic and collision constraints on release.
It MUST NOT move unrelated placements or search arbitrary free space. If no
proposal is valid, a pointer-following outline MAY accompany the last valid
preview; that retained preview MUST NOT authorize a refused release.
Outgoing work headers MAY be partly outside the viewport provided each retains
at least a 24-by-24 logical-pixel grab region. Releasing the pointer outside the
viewport still cancels. Other assignment and Arrange gestures retain their
complete-header visibility requirement.
feedback MUST NOT obscure the work or change its pointer-relative placement.
A clean click selects without applying unrelated drafts. A refused work press
with an unapplied property draft MUST preserve its text, caret and focused
editor. An accepted drag is one atomic model/source/history transaction:
+1 -13
View File
@@ -2128,19 +2128,7 @@ performer change with diagram placement. The preview MUST identify the
destination and preserve readable work and destination identity. Destination
identity is shown outside the canvas, independently of explanatory or refusal
text. The outlined target's hit region remains fixed throughout the gesture;
feedback MUST NOT obscure the work. Preserve pointer-relative placement when
the requested position is valid. When an outgoing drop would leave work
overlapping its former performer, the editor MAY propose a minimal grid-aligned
translation through a crossed performer boundary, with one grid unit of
clearance. It MUST preview that exact position, translate the complete affected
work group rigidly, and recheck all semantic and collision constraints on release.
It MUST NOT move unrelated placements or search arbitrary free space. If no
proposal is valid, a pointer-following outline MAY accompany the last valid
preview; that retained preview MUST NOT authorize a refused release.
Outgoing work headers MAY be partly outside the viewport provided each retains
at least a 24-by-24 logical-pixel grab region. Releasing the pointer outside the
viewport still cancels. Other assignment and Arrange gestures retain their
complete-header visibility requirement.
feedback MUST NOT obscure the work or change its pointer-relative placement.
A clean click selects without applying unrelated drafts. A refused work press
with an unapplied property draft MUST preserve its text, caret and focused
editor. An accepted drag is one atomic model/source/history transaction:
+27
View File
@@ -0,0 +1,27 @@
# Editing workspace UX review
These development criteria implement the [project goal](../PROJECT_GOAL.md): reduce system engineers' cognitive load, keep graphical editing intuitive, and provide concise, navigable built-in help. They also address the user's request tracked in Gitea issue #39 to prevent persistent instructional text from consuming editing space. They are review criteria, not a claim that any particular build has passed them.
## Persistent content and progressive disclosure
Populated editing workspaces prioritize model content, controls, current state and actionable feedback. General explanations, gesture tutorials and repeated shortcut lists belong in contextual Help, tooltips or explicitly opened details. Do not add permanent instructional paragraphs above a populated canvas merely to explain a feature.
Keep essential control labels and relevant status visible. Offer concise next-step guidance in empty states and while a user is performing a multi-step action. Put longer explanations behind a clearly labeled disclosure near the relevant control or context. Essential instructions must be accessible through an explicit keyboard-reachable route; a hover-only tooltip is insufficient. Reuse the built-in guide for broader modeling explanations.
Distinguish instruction from information needed to act safely. Current errors, pending edits, failed operations, fallback rendering, unavailable actions and recovery steps must remain apparent. Preserve consequential distinctions such as editing a shared definition, changing semantic order rather than saved positions, or applying properties to only one member of a selection. Long diagnostic detail may be disclosed on demand, but its visible summary must identify the problem and a usable next step.
## Stable editing context
Selection changes and gesture feedback must not unexpectedly move or resize the canvas, reset its camera, or change the interpretation of the pointer. Compact existing stable layout slots instead of conditionally removing them when their content is absent. Opening and closing help must preserve the model, selection and pending drafts, and return the user to a usable editing context. Explicitly requested panel changes may resize the workspace; verify their effect on focus and navigation.
## Native review
Exercise the changed workspace in the actual built application at its configured minimum window size and a representative normal size. Include an independent reviewer for material interaction or layout changes, following [the working agreement](../AGENTS.md). Review representative populated models as well as relevant empty, pending, failure and recovery states.
- Inspect whether instructional prose or unused space displaces useful model content. Compare before/after screenshots at the same window size, display scaling, model and panel state when assessing space savings.
- Perform the affected workflow: select, edit, navigate, cancel and recover as applicable. Change between empty, single and multiple selections; exercise affected gestures and inspect camera and pointer stability.
- Find and use the disclosed guidance by keyboard as well as pointer. Check focus, dismissal, return to editing, and preservation of drafts.
- Trigger relevant disabled or rejected operations. Confirm their reason and recovery action remain visible, accurate and reachable.
- Check text, controls, panels and warnings for clipping, overlap, excessive scrolling and lost actions at the minimum size. Do not trade recovered space for unreadable text or unexplained symbols.
Record the tested code version, runtime environment, workflows, observations and representative screenshots in the change's review evidence. Screenshots support layout findings; they do not establish working interaction, accessibility or state preservation. Fix material findings and recheck affected behavior before treating the change as verified.
+35 -34
View File
@@ -1,42 +1,43 @@
# Integrated prerelease source checkpoint — 2026-09-24 UTC
# Verified Windows source checkpoint — 2026-10-01 PDT
This branch assembles peer contributions for the Windows prerelease in issue37.
[PROJECT_GOAL.md](../PROJECT_GOAL.md) remains authoritative. The complete OA/SA
application is unfinished; published previews and finite prototypes are intermediate.
This branch combines the released integrated foundation
`715036e132677dd2bc2fb37ed316d93dc9987aec` with compact diagram controls and
contextual Help production source `6e7c4ddaf0775198384a8c4882809ea8e14b2976`.
[PROJECT_GOAL.md](../PROJECT_GOAL.md) remains authoritative; complete OA/SA
acceptance is unfinished.
**The current prerelease is Windows-only. Linux/WSL builds and checks remain
excluded by the user's explicit request, including after networking recovers.**
**Linux/WSL builds remain excluded by the user's explicit request.**
## Assembled source and acceptance boundary
## Verified capabilities and evidence
Combined code through **4deced53b98cd4d7649ba7aa60fa4b9b30d2f3b8**, plus the
test-only import correction from **7c2b06b63f8a0fe14b3f001996bdf965b36a4e85**, adds the reviewed
Connection/Route early-admission correction to the assembled Scenario/Text,
ordinary/State/Process/Allocation selection, direct drawing, Traceability and
picker changes. The [source handoff](prerelease-integrated-source-20260924.md)
identifies the incorporated commits, exact new test paths and required gates.
The nine event regressions and existing completed-Text-Apply cases are retained.
Direct formatting and whitespace checks pass; this source checkpoint does not
claim combined Cargo, native, packaged or release acceptance. The independent
[event-fix review](reviews/prerelease37-event-admission-20260924.md) found no
further material source defect in its stated scope. A subsequent peer compile
found a missing `projection::` qualification in the new Route test helper;
the current code includes that one-line correction. The original compile failed
before running tests. The first combined compile at `897d9f04` subsequently
found a missing `text_editor` import in the Allocation Text Apply regression;
the current source includes that one-line correction too. Both failures remain
recorded in the source handoff. The subsequent full test run at `8ddfadf4`
failed the mounted State picker fixture: added selection controls invalidated
its canvas-relative clicks. Source successor `a9cd364eacbbffa0693bab05b5a2b65f9d105535`
measures an identified fixed-height picker slot and checks Escape capture,
retaining the exact preservation/reopen/Place/Undo assertions. The source
handoff links the preserved failed and interrupted attempts. Corrected combined
Windows execution and package acceptance remain pending.
The [frozen integrated Windows preview](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/releases/tag/v0.2.0-preview.integrated.20260924)
provides the accepted 715 foundation and its combined test/package evidence.
It remains unchanged. The older pending-build description previously at the top
of this file is superseded by that published result.
Live build, final-source and publication results belong in
[issue37](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/37).
Human workflows are described in [the preview checklist](../docs/preview-human-checks.md).
Private mixed-parser source is excluded from this application candidate.
The [compact Help contribution](compact-help-validation-20261001.md) removes
permanent canvas tutorial prose, keeps stable concise selection rows and full
allocation destinations, and supports contextual Help/F1 with keyboard reading,
exact caret/draft preservation and safe gesture retirement. Final focused gates
pass 125 tests; the earlier full-suite result retains its separate source scope.
[Fresh package validation](release-compact-help-validation-20261001.md) verifies
actual extracted desktop/server behavior, Save/Undo/Redo/reopen and complete
source/model oracles. This is a scoped development preview, not complete release
or acceptance of the separately owned follow-up union.
The [scoped compact Help Windows preview](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/releases/tag/v0.2.0-preview.compact-help.20261001)
is published from evidence checkpoint `f1fdca371394aec1148e67f33f4d8c6b53a0c350`.
Its ZIP, checksum and validation attachment were downloaded and matched after
publication; [publication receipts](experiments/compact-help-20261001/publication.md)
retain the exact asset hashes and provenance.
Dense diagrams, remaining Scenario group adapters, quantities/calculations/
constraints, maintained libraries, broad accessibility/DPI and full OA/SA
acceptance remain unfinished. The independent projection/navigation, outgoing-drag,
icon, grid/performance and State-label contributions are outside this code.
A protected Save As destination collision has misleading external-change wording;
[issue 46](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/46)
records it. Files remain protected and normal/fresh-destination recovery is
verified. Live ownership, integration and release coordination remain in Gitea.
## Contribution-specific verification
+34
View File
@@ -0,0 +1,34 @@
# Compact diagram controls and contextual help
Branch-specific work for [issue 39](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/39), based on published preview source `715036e132677dd2bc2fb37ed316d93dc9987aec`.
This record does not accept the complete first release or the other diagram defects.
## Problem and choice
The user's screenshot showed two permanent Traceability explanation paragraphs and a separate generic gesture-hint row. Direct Windows inspection of the released water-pressure example reproduced these. At a 1100×700 client size (1102×732 captured window), the Traceability canvas began around window y=470 and ended around y=692, leaving about 220 pixels for modeling. At the normal 1440×900 client size its top was around y=417. The release was opened from the existing downloaded package; only an in-memory projection switch was made and Undo restored the clean model before closure.
The candidate moves general instructions into contextual Help, reusing the offline guide. Architecture, State and Process selection bars use a stable compact row. Allocation retains its full-width destination slot; a concise Arrange control sits beside the existing view-content and Help controls. Traceability retains its displayed-line count and existing actions. Active drawing/assignment feedback appears beside the operation outcome in the persistent status bar, with full text on hover. Operation errors must never be replaced by generic guidance.
Help opens as an overlay and closes with Close or Escape. F1 opens the relevant diagram topic. The workspace, selected group, pending source/property/behavior drafts and camera remain owned by their existing state. Background user commands are rejected before specialized canvas/reference dispatch. Passive results retain their established validity checks. The editor remains the first child of a stable Stack while Help opens and closes.
Rejected alternatives: ordinary navigation to the Guide page cleared selection and could reject Help while a behavior draft was pending; placing feedback beside the entire selection toolbar exhausted narrow-window width; unconditional status substitution hid operation failures. Independent source review identified these before acceptance. Hover-only help was rejected because the complete instructions need a keyboard-accessible route.
[Editing workspace UX review](../docs/ui-review.md) is the development/review contract requested by the user. It covers persistent prose, actionable feedback, context preservation and independent native interaction checks.
## Verification status
Clean source `f83068757af885572f6b3f932d07233dd1b94b7e` passed `cargo build -p oa-desktop --locked` on Windows gnullvm. Its candidate executable SHA-256 is `c1a9b196ec03e86f049fa2aadb2b86bfcaa3f0fbae582a80ee39ee8adf0758e3e`. The [independent source review](compact-context-help-source-review-20260925.md) records the corrected source findings, including passive viewport updates while Help is open.
Independent native review of that executable recovered approximately 61 pixels in normal Traceability, 114 pixels in minimum Traceability and 58 pixels in minimum Allocation. Help resizes, pointer-scrolls, selects the State topic, and closes through Close/Escape. The review also reproduced two acceptance failures: PageDown cannot scroll Help, and F1/Escape preserves a property or Process-creation draft but loses typing focus/caret continuation. These findings require correction and another native check; model-state unit tests alone do not cover internal widget focus. The idle State-canvas gesture sentence is also removed in the successor; active/pending and hovered-item feedback retain their stable slot.
The initial focused test run passed nine and failed one: the allocation test fixture used the default Overview projection before asserting allocation ownership. A separate ten-case mounted geometry run passed nine and failed the destination's existing 400-pixel minimum-width check. Sharing its row with the verbose Arrange action reduced that slot to 328 pixels at minimum size. The successor fixes the fixture explicitly and restores the full destination row without weakening its width check. The original failed logs are preserved in the [native/test evidence](experiments/compact-help-20260925/README.md). These diagnostic runs began before the successor edits and are not frozen-source acceptance of those edits.
Frozen successor `5657a996ed2cefb1fa84ef967b655eaf8f9f6817` passed formatting, strict all-target desktop Clippy and the Windows GUI build. The full desktop run passed 1,538 tests, ignored seven and failed one new mounted Help test before Help opened: its synthetic multi-character KeyPressed event inserted only the first character, as the actual Iced text input specifies. The final correction sends individual character events and retains the exact-caret, scrolling and IME assertions. The existing allocation width and ownership checks and new modifier/pointer cancellation checks passed. See the [preserved successor evidence](experiments/compact-help-20260925/candidate-5657/review.md) and logs; the failed run is not reported as a passing suite.
Independent native review of that exact executable confirmed keyboard Help scrolling, precise Inspector and Process-draft caret continuation after Help, resize, retained State tool state and complete allocation-error tooltips. Minimum Allocation recovers approximately 64 pixels with the full destination slot; minimum Traceability recovers 114 pixels. The reviewer found no new blocker within that scope.
Final source `6e7c4ddaf0775198384a8c4882809ea8e14b2976` passes formatting, strict desktop/all-target Clippy, GUI build and 125 focused Help/allocation/guide tests (zero failures/ignores). The corrected mounted caret test now executes its complete assertions. Unchanged evidence from the earlier full run is retained at its original source; the remaining 1,421 desktop cases were not rerun at the final source. The initial final GUI link failed when the disk filled; after the user expanded the disk, the same-source rebuild passed. The failed log remains preserved.
The [final native report](experiments/compact-help-20260925/candidate-6e7c/review.md) directly verifies cancellation status, guide wording, native group selection through context menus, primary Inspector changes, long-name controls at minimum size, exact caret return after both Help dismissal routes, and Apply/Undo/Redo/Undo recovery. Independent source review found no blocker in the final small delta. The watcher records exit 0 and empty stdout/stderr; all 37 copied model files still match the original after closure. An early transient OSK/modifier obstruction occurred before model loading and is recorded separately from app behavior. No blocking defect was found within this contribution's review scope. Shared integration and release admission remain in issue 39; full product completion is not claimed.
Required native checks: minimum and normal windows; Traceability and Allocation space comparison; multi-selection with long names; Help/F1/Close/Escape with property and behavior drafts; editor focus and canvas scroll/camera restoration; active feedback plus operation failure; State and Process controls; subsequent edit/Undo/Redo and source preservation. Linux remains deferred under the recorded user instruction.
@@ -0,0 +1,44 @@
# Compact contextual help: independent source review
Review date: 2026-09-25. Scope: Gitea issue #39 compact editing chrome and contextual Help, reviewed against base `715036e1` and the issue screenshot. Reviewed source includes `e0812b3932fbb36100516f0981dc9c646eeda56d` plus the subsequent local passive-geometry admission patch and regression test in this change. This is source-review evidence, not native acceptance or executed test evidence.
Criteria: [editing workspace UX review](../docs/ui-review.md), especially preserving pending edits and selection, stable canvas geometry, accessible disclosure, and retaining actionable feedback.
## Findings addressed in source
- The initial Help action used ordinary page navigation, clearing multiselection and selected bends, including before a pending behavior form rejected navigation. Contextual Help now overlays the existing workspace. Close/Escape changes reading state without navigating or applying drafts.
- App-level modal admission originally ran after allocation and reference-picker fast paths. Help now gates user messages at the beginning of `App::update`; allocation and behavior keyboard ownership are also disabled while Help is open.
- Combining live gesture feedback with multiselection controls could leave no width for feedback at the configured minimum window size. Selection controls now keep a compact, fixed-height row; current drawing/allocation feedback uses the existing application footer.
- Footer feedback initially replaced operation status, concealing errors while a promoted edge or drawing tool remained selected. The footer now retains operation status alongside feedback and exposes complete text in its tooltip.
- Conditional modal wrapping could recreate the editor widget tree. Both closed and open states now use the same outer Stack with the workspace as its first child.
- State/Process selection guidance removed from persistent chrome was missing from its target Help articles. The States and Chains articles now include group selection, primary-properties semantics and relevant tool/read-only guidance.
- The new early modal gate initially rejected passive behavior viewport/scroll notifications. It now admits Process/Scenario geometry and State viewport notifications to their existing context-validated handlers, preventing resize observations from being lost while Help is open.
## Regression coverage added
[`context_help_tests.rs`](../crates/oa-desktop/src/app/context_help_tests.rs) covers property drafts and multiselection, source drafts, pending state-transition forms, blocked background actions, contextual Help topic dispatch, Close/Escape, allocation input ownership, queued inspector reference-picker admission, and valid/stale Process viewport measurements during Help and after closing. Assertions include accepted-model snapshot identity and absence of history changes where applicable. Passive geometry intentionally validates document/owner/revision; stale pointer epochs alone do not invalidate measurements.
The reviewer did not compile or execute these tests. Suggested focused command: `cargo test -p oa-desktop context_help_tests`. The integration owner records actual execution and native results separately.
## Follow-up from native review
Native review of the subsequent candidate found that contextual Help did not respond to PageDown and that Escape reached a focused underlying text input, dropping its typing focus. The follow-up patch adds a Help-only keyboard subscription and article-ID-targeted scrolling (40-pixel arrows, 90% of the actual viewport for PageUp/Down, Home/End), using Iced's bounds-clamped scroll state. A stable workspace input barrier preserves the actual editor caret while suppressing key, pointer, touch and IME input behind Help; modifier changes and passive geometry continue. Opening Help retires held pointer gestures through cancellation releases with all authored actions discarded, while forwarding redraw/layout invalidation. This also prevents a held canvas pan or text selection from resuming after release behind Help.
New mounted regressions exercise the production App tree and subscriptions for keyboard scrolling, unchanged background scroll positions, precise Inspector caret return, IME exclusion, Shift release, and held-pan retirement. A real text-input widget regression checks selection-drag retirement while preserving its caret. The allocation ownership fixture was corrected to explicitly request Allocation, because `ensure_diagram` creates Overview. These follow-up changes were formatted and source-reviewed here; compilation, execution and native acceptance remain the integration owner's checks.
A second, read-only critic reviewed the follow-up independently of its implementation. It found and prompted corrections for stale modifiers, IME leakage and interrupted pointer gestures. Its final read found no further blocking source defect in the input barrier, cancellation, passive-event handling or relocated Arrange control. The separate native reviewer supplied the original keyboard/focus failures. Neither source review establishes executed or native acceptance of the successor.
## Scope and remaining verification
A final independent read-only source review covered the small post-`5657a996`
delta. It confirmed that the mounted typing fixture must send one KeyPressed per
character because Iced consumes the first scalar, with the original caret/IME
assertions retained. Arrange cancellation now replaces only its own obsolete
armed status, preserving unrelated errors; input epochs and model commands are
unchanged. The guide names the actual Arrange control. No blocking finding was
identified in that delta. Actual executed and native evidence remains separately
identified by source in the design record and evidence index.
Production changes reviewed: desktop App messages/admission, allocation input ownership, Escape bridging, behavior keyboard ownership, architecture/State/Process toolbar layout, guide article disclosure and footer feedback; supporting architecture/UI-review documentation. Regression tests and this record are review artifacts. No model schema, persistence format or authored-model transformation is introduced.
No further concrete source blocker was identified after the fixes above. Native checks remain necessary at 1100×700 and a representative normal size: Help discovery and keyboard reading/dismissal, focus and caret return, preservation of canvas camera/selection and form drafts, resize while Help is open, multiselection control visibility, allocation refusal/destination feedback, current operation failures, and stable canvas bounds through selection/gesture changes. Source inspection and App tests do not establish layout quality, keyboard scrolling, pointer behavior or usability.
@@ -0,0 +1,41 @@
# Compact diagram Help: Windows validation
The source contribution for [issue 39](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/39)
is based on released `715036e132677dd2bc2fb37ed316d93dc9987aec`; final production/test
source is `6e7c4ddaf0775198384a8c4882809ea8e14b2976`. It removes permanent canvas
instructions, preserves compact stable controls and offers contextual Help/F1.
Model schema, core, server, dependencies and persistence code are unchanged.
[Decision and acceptance boundary](compact-context-help-20260925.md),
[independent source review](compact-context-help-source-review-20260925.md),
[native reports, screenshots and gate logs](experiments/compact-help-20260925/README.md)
and [development UX criteria](../docs/ui-review.md) are authoritative for this change.
Windows gnullvm / Rust 1.98.1: formatting, strict desktop/all-target Clippy and the
GUI build pass. Final focused run: **125 passed, zero failed/ignored**. Earlier
full desktop execution at `5657a996` passed 1,538, failed one new test's typing
setup and ignored seven; the corrected test executes fully in the final passing
run. This is not a claim of a full-suite run at the final commit. The initial
final link failed with a full disk and is retained; the recovered build succeeds.
Final Studio SHA256:
`d55ecad4b0f75c0c9c26625e5441bef9c9360890b65bc13236c6ebfaf03d631e`.
Matching runtime SHA256:
`f45604a12e8bcd839fd86f667c1be1cc7c4f9da2b3c69ff381ac708f0e1ae7d4`.
Independent native checks pass group selection/primary properties, Help dismissal
and exact caret continuation, long names at 1100×700, Arrange cancellation,
guide consistency and Apply/Undo/Redo/Undo. Earlier versioned native checks cover
Process drafts, State tools, Help resize and actual operation refusals. Minimum
Allocation recovers about 64 pixels; minimum Traceability about 114 pixels.
Final process exit is 0, both logs are empty, and all 37 copied example files
remain unchanged. Native counts do not establish whole-Project equality; mounted
regressions provide the separately scoped model/history checks.
The application remains an unfinished development preview. The separate
projection/navigation, outgoing-drag, icon, grid/performance and State-label
contributions are outside this source. Dense routes/labels, remaining Scenario
group adapters, quantities/calculations/constraints, maintained libraries,
complete OA/SA acceptance and broad accessibility/DPI coverage remain unfinished.
Linux/WSL checks remain excluded by the user's recorded instruction. This change
does not accept the complete first release.
-88
View File
@@ -1,88 +0,0 @@
# Outgoing allocation dragging
Scope: [issue 40](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/40),
based on published Windows source `715036e132677dd2bc2fb37ed316d93dc9987aec`.
This contribution is not integrated release acceptance. User requirements remain
in `PROJECT_GOAL.md`; this note records a revision to derived interaction policy.
## Reproduction and cause
The released executable SHA256
`2c03bd6cc3f1110c219e4f57ab94874a121590f83779239a93289b7170664399`
opened a copied Allocation/Process companion fixture on Windows. At 1440x900,
72% Fit, the OA assign view's X-receive was dragged from window (486,546) to
(365,546), just beyond A's left edge. It remained assigned at its original
position, reporting enlarged card overlap. A control drag to (625,572) removed
assignment; Undo restored the original scene. These are actual native end-state
observations; intermediate jitter was diagnosed from source, not frame capture.
Frozen targets resolve from the pointer, while placement retains its grab
offset. The pointer therefore leaves its performer before the full work card
does. Former parent/child intersection becomes unrelated overlap after removing
allocation. Refused motion previously cleared the preview and redrew the saved
scene. Additionally, whole-header viewport containment rejects a useful outgoing
position in the fitted reproduction even when its model geometry is valid.
## Selected policy
Try exact snapped pointer placement first. Only an outgoing assignment candidate
with a placement refusal may propose bounded source clearance: move the entire
captured work footprint through a crossed frozen source boundary, clearing the
post-removal source enclosure by one 10-world-unit grid cell. Consider at most
four directions, ordered by press-to-pointer boundary-crossing fraction and a
fixed direction tie-break. Existing placement, collision, semantic, exact-command
and source/history admission remain authoritative. No neighbor is moved, no
general packing/search occurs, and no semantic refusal is overridden.
The accepted/candidate semantic indexes are reused during fallback projections.
Outgoing headers may be partly clipped but each must retain a 24x24 logical-pixel
grab region. Other assignment and Arrange visibility rules remain unchanged.
The exact corrected candidate is previewed; release recomputes it. Blocked
in-bounds motion retains its last admitted scene and adds an orange pointer
outline. This display state confers no permission to commit on refused release.
Cancel, outside release and gesture invalidation retire it normally.
Rejected alternatives: retaining a moving outline alone leaves the boundary
dead band; allowing unrelated overlap makes unassigned work look allocated;
general auto-layout changes unrelated placement and makes drag intent harder to
predict. The previous unconditional pointer-offset rule is narrowed in
`docs/language.rst` and its HTML copy. Real neighboring-card collisions and
insufficient visible grab area can still refuse a drop.
## Verification status
Independent source diagnosis and repair critique found no semantic/stale/cancel
bypass. Review exposed the remaining whole-header camera restriction and an
obsolete retained-preview assertion; both were revised. Added checks cover
OA/SA boundary clearance, corners, source shrinkage, rigid descendants/groups,
real App frame-by-frame input, exact source/history, cancellation, blocked release
and outgoing grab-area boundaries. At clean source
`1a669130fb6d2b65279aab3847e966a1a282c191`, the Windows allocation-drag
suite passes 121 tests (none failed or ignored; 1,424 filtered out), strict
desktop all-target Clippy passes, and the normal desktop development build
passes. [Raw results and reproduction commands](experiments/drag-out-20260925/README.md)
preserve the source, platform, failed attempts and exact scope. These checks do
not prove native usability. Computer Use was stopped with the physical Escape
key before the changed executable could be inspected. Fitted-view dragging,
clipped-card identification/regrabbing, native Undo/Redo and Save/reopen remain
unverified. The issue remains open; no integration or release acceptance follows
from the targeted gates.
Test-only successor `24b1eab07d306d8cb091bb46f7daf9f027a8f1c0` additionally
checks an actual fallback blocked by unrelated work, including preservation of
an existing redo branch, and an outgoing move while an allocated sibling keeps
the source enclosure expanded. Both run for OA and SA. All 123 allocation-drag
tests and strict desktop Clippy pass at that successor. Fresh independent review
confirms those tests exercise their claimed invariants, with no material source
finding in this scope. The same linked evidence includes the new logs and review;
production code and native-acceptance limits remain unchanged.
The first build attempt failed before tests because the sparse checkout omitted
`build/windows_manifest.rs`; restoring the tracked build directory corrected the
checkout. The local drive initially had about 22 MB free. Git sparse checkout and
Cargo's package-scoped cleanup of inactive desktop artifacts recovered capacity.
Automatic review rejected recursive deletion of the extracted preview; it was
left intact. No published package or unique evidence was deleted.
The second attempt also exposed omitted tracked harness fixtures and a `Self`
typo in a standalone test helper; both were corrected before the passing run.
That failed compiler process was terminated after its errors were captured.
@@ -1 +0,0 @@
*.log -text
@@ -1,91 +0,0 @@
# Small architecture diagram CPU investigation
Question: does core projection/routing explain [issue 44's low FPS](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/44)
with roughly eight architecture cards? This experiment narrows that question;
it neither reproduces native frame rate nor establishes a complete cause.
## Workload and source
The screenshot uses names from `examples/release1`. Its exact model, projection,
camera and authored geometry are unavailable. The probe loads the unchanged
`examples/release1/model.json`, measures its five saved views, and constructs a
clearly labeled eight-card SA Overview approximation using those semantic
elements. Approximate coordinates and stable placement IDs are in the probe;
it has 8 projected nodes, 6 ports and 13 projected edges. It is not a recovered
copy of the user's diagram. All data changes occur in memory.
Source: `24b1eab07d306d8cb091bb46f7daf9f027a8f1c0`; core, manifest and lockfile
are unchanged from the drag contribution's `1a669130` production source.
Windows 10.0.26200, Rust 1.98.1, x86_64-pc-windows-gnullvm, LLVM-MinGW
20260908 UCRT, reported CPU Intel Core i7-10870H with 4 exposed cores/threads.
The probe was optimized with `-O` and linked to the existing **unoptimized
development-profile core library** used by the completed desktop test build.
This distinction matters: optimizing the driver does not optimize that library.
The desktop test process had completed before measurement; no Cargo compilation
was started until after measurement. Other operating-system workloads were not
controlled, so outliers are retained rather than interpreted as stable capacity.
## Method and results
Each phase gets 3 warmups and 40 timed samples, with returned values passed to
`black_box`. Reported p50/p95 select sorted index `ceil((n-1)*p)` as implemented
in the source. Returned output destruction is outside each timed phase. Diagram
movement uses a deterministic small delta sequence and the existing descendant
and authored-route translation APIs. Index creation, projection, routing, and
combined movement preparation are measured separately. The probe does not model
allocation transaction admission or an Iced frame.
For the eight-card approximation, `performance-01.log` records:
| Phase | p50 ms | p95 ms | max ms |
| --- | ---: | ---: | ---: |
| Reused-index projection | 0.3885 | 0.7550 | 1.2965 |
| Fresh-index projection | 1.7135 | 2.7022 | 4.2204 |
| Settled routing | 2.4525 | 4.4617 | 4.7735 |
| Moved routing | 3.1907 | 4.4781 | 4.5672 |
| Movement preparation + projection + routing | 4.2640 | 6.8259 | 8.8052 |
This workload does not expose severe core latency sufficient by itself to
explain very low FPS. It does not rule out different authored routes, allocation
admission, hardware/rendering, or the user's exact scene. Repeated fresh-index
projection has a measurable cost, but no change is justified solely by this
small sample. No FPS or performance-fix claim follows.
## Source observations and next discriminating measurement
Independent read-only hot-path review found that `DiagramCanvas::scene` already
caches projection and routing by semantic context and transient geometry.
Ordinary node movement changes preview geometry and routes the full view;
route gestures use `route_edge_preview`. Ordinary hover need not reroute.
`diagram/port_labels.rs` requests redraw on every mouse event, including when
no tooltip is visible. `DiagramCanvas::draw` rebuilds geometry and each dot-grid
circle on every draw. At a 1900x660 canvas this yields about 2,240 circles at
zoom 1 and 6,528 at minimum spacing. Scene caching does not cache that geometry.
`views.rs` also performs an unindexed `project_view` during app view rebuilding;
legacy node-motion redraw does not itself require that full UI rebuild.
Next, measure actual canvas draw/frame costs independently for idle hover, pan,
ordinary node drag and allocation drag, with grid generation separated from
node/edge/text rendering and frame presentation. Compare the same scene/camera
and renderer before changing production code. Native automation was stopped
with Escape; no GPU/frame measurement was attempted in this experiment. Live
ownership and subsequent results belong to issue 44.
## Reproduction
Build `oa-core` at the identified source with the stated Windows toolchain, then
compile this standalone probe against that exact library and matching dependency
directory. For a fresh standard Cargo development build:
```powershell
cargo build --locked -p oa-core
rustc --edition=2024 -O harness/experiments/architecture-perf-20260925/architecture_perf_probe.rs --extern oa_core=target/debug/liboa_core.rlib -L dependency=target/debug/deps -C linker=clang.exe -o architecture_perf_probe.exe
./architecture_perf_probe.exe examples/release1/model.json 40
```
The actual run linked `target/debug/deps/liboa_core-2f3c5174cb6398fd.rlib`
and used the same dependency directory. Set the linker/runtime PATH as required
by the Windows toolchain. Compiler flags, core profile, machine load and fixture
all affect timings; preserve them when comparing candidates. This standalone
probe is experimental evidence, not a production dependency or a timing test.
@@ -1,166 +0,0 @@
//! Local-only CPU diagnosis. Does not measure native FPS, canvas redraw, or GPU.
//! Usage: architecture_perf_probe.exe PATH_TO_RELEASE1_MODEL_JSON [SAMPLES=40]
use oa_core::{persistence, projection, routing, view_options::ViewIndex, *};
use std::{collections::BTreeMap, hint::black_box, time::Instant};
fn measure<T>(label: &str, samples: usize, mut f: impl FnMut(usize) -> T) {
for i in 0..3 {
black_box(f(i));
}
let mut ms = Vec::with_capacity(samples);
for i in 0..samples {
let start = Instant::now();
let output = black_box(f(i));
ms.push(start.elapsed().as_secs_f64() * 1000.0);
drop(output); // Exclude destruction consistently from each timed phase.
}
ms.sort_by(f64::total_cmp);
let percentile = |p: f64| ms[((samples - 1) as f64 * p).ceil() as usize];
println!(
"{label}: n={samples} p50_ms={:.4} p95_ms={:.4} max_ms={:.4}",
percentile(0.5),
percentile(0.95),
ms[samples - 1]
);
}
fn probe(p: &Project, d: &Diagram, samples: usize) {
let index = ViewIndex::new(p);
let view = projection::project_diagram_with_index(p, d, &index);
println!(
"\nview={} projection={:?} nodes={} ports={} edges={}",
d.name,
d.projection,
view.nodes.len(),
view.ports.len(),
view.edges.len()
);
measure("index_new", samples, |_| ViewIndex::new(black_box(p)));
measure("projection_reused_index", samples, |_| {
projection::project_diagram_with_index(black_box(p), black_box(d), black_box(&index))
});
measure("projection_fresh_index", samples, |_| {
projection::project_diagram(black_box(p), black_box(d))
});
measure("routing_settled", samples, |_| {
routing::route_diagram(black_box(p), black_box(d), black_box(&view))
});
// Deterministic slight motion of the first root card. Includes the same
// descendant/route translation as legacy single-card canvas drag. This is
// presentation-only, not the allocation transaction pipeline.
let Some(root) = view.nodes.iter().find(|n| n.visual_parent.is_none()) else {
return;
};
println!("moving_root={} element={}", root.id, p.named(root.element));
let mut moved = projection::descendant_nodes(p, d.id, root.id);
moved.push(root.id);
let make_moved = |i: usize| {
let delta = Position {
x: (i % 21) as f32 * 3.0,
y: (i % 11) as f32 * 2.0,
};
let mut preview = d.clone();
let deltas = moved
.iter()
.map(|id| (*id, delta))
.collect::<BTreeMap<_, _>>();
for route in projection::translated_routes(p, d, &deltas) {
if let Some(stored) = preview.routes.iter_mut().find(|r| r.edge == route.edge) {
*stored = route;
} else {
preview.routes.push(route);
}
}
for id in &moved {
if let Some(n) = preview.nodes.get_mut(id) {
n.position.x += delta.x;
n.position.y += delta.y;
}
}
preview
};
let previews = (0..samples.max(3)).map(make_moved).collect::<Vec<_>>();
let projected = previews
.iter()
.map(|d| projection::project_diagram_with_index(p, d, &index))
.collect::<Vec<_>>();
measure("moved_projection", samples, |i| {
projection::project_diagram_with_index(p, black_box(&previews[i]), &index)
});
measure("moved_routing", samples, |i| {
routing::route_diagram(p, black_box(&previews[i]), black_box(&projected[i]))
});
measure("moved_prepare_projection_routing", samples, |i| {
let preview = make_moved(i);
let view = projection::project_diagram_with_index(p, &preview, &index);
routing::route_diagram(p, &preview, &view)
});
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = std::env::args().collect::<Vec<_>>();
let path = args
.get(1)
.ok_or("usage: architecture_perf_probe PATH [SAMPLES]")?;
let samples = args
.get(2)
.map(|s| s.parse::<usize>())
.transpose()?
.unwrap_or(40)
.max(1);
let p = persistence::decode(&std::fs::read(path)?)?;
println!(
"CPU-only probe; samples={samples}; fixture={path}; elements={} relations={}",
p.elements.len(),
p.relations.len()
);
for d in p.diagrams.values() {
probe(&p, d, samples);
}
// Approximation of the reported eight-card screenshot, not an exact repro:
// fixture semantics, Overview projection, synthetic positions/card sizes.
let mut approx = p.clone();
let id: Id = "f0440000-0000-4000-8000-000000000001".parse()?;
approx.diagrams.insert(
id,
Diagram {
id,
alias: "fps44_approx_overview".into(),
name: "APPROXIMATION eight-card SA Overview".into(),
description: "Synthetic positions, not user geometry".into(),
layer: Layer::Sa,
projection: ProjectionKind::Overview,
view_options: Default::default(),
nodes: BTreeMap::new(),
routes: vec![],
layout: None,
},
);
for (ordinal, (alias, x, y)) in [
("sa_assessment_procedure", 30., 240.),
("sa_triage", 510., 240.),
("sa_control", 990., 240.),
("sa_technician", 530., 440.),
("sa_assess", 1490., 240.),
("sa_repair", 1030., 440.),
("sa_confirm", 1530., 440.),
("sa_reset", 30., 440.),
]
.into_iter()
.enumerate()
{
let element = approx
.elements
.values()
.find(|e| e.alias == alias)
.ok_or_else(|| format!("missing alias {alias}"))?
.id;
let generated = approx.place(id, element, Position { x, y });
let diagram = approx.diagrams.get_mut(&id).unwrap();
let mut node = diagram.nodes.remove(&generated).unwrap();
node.id = format!("f0440000-0000-4000-8000-{:012}", ordinal + 2).parse()?;
diagram.nodes.insert(node.id, node);
}
probe(&approx, &approx.diagrams[&id], samples);
Ok(())
}
@@ -1,11 +0,0 @@
{
"source": "24b1eab07d306d8cb091bb46f7daf9f027a8f1c0",
"core_profile": "dev unoptimized",
"driver_optimization": "rustc -O",
"samples_per_phase": 40,
"warmups_per_phase": 3,
"rlib_sha256": "E10C81BF28A33CD0FB6C4C26884CFFA480EF05328E78BCDB138DD4B635B2531C",
"fixture_sha256": "EF0EF4006C3E09D5DB6E1B621256B3F7D6642F3A7B09CC34607CFBCCA830C727",
"driver_exe_sha256": "4C66E9CDE4F08D6DFD2A0DC3DBF1A80B97E340F3F22CA001A76301F06F47C2E2",
"native_fps_measured": false
}
@@ -1,61 +0,0 @@
CPU-only probe; samples=40; fixture=.local/drag-out-01a0d6fd/examples/release1/model.json; elements=94 relations=62
view=1 · OA responsibility and repair traffic projection=Allocation nodes=6 ports=0 edges=3
index_new: n=40 p50_ms=1.0106 p95_ms=2.0583 max_ms=2.0910
projection_reused_index: n=40 p50_ms=0.5702 p95_ms=1.2320 max_ms=1.3490
projection_fresh_index: n=40 p50_ms=1.5505 p95_ms=3.6681 max_ms=5.1533
routing_settled: n=40 p50_ms=0.1944 p95_ms=0.3391 max_ms=0.4246
moving_root=3191e05c-1c7f-5f0e-beb0-5f3bded54c48 element=Control room
moved_projection: n=40 p50_ms=0.4848 p95_ms=1.2745 max_ms=1.5797
moved_routing: n=40 p50_ms=0.1994 p95_ms=0.7971 max_ms=1.1414
moved_prepare_projection_routing: n=40 p50_ms=0.9250 p95_ms=2.6847 max_ms=10.4908
view=5 · SA pressure supervision projection=StateMachine { machine: 132b3f28-3f88-5327-9868-8c8b645ed412 } nodes=5 ports=0 edges=3
index_new: n=40 p50_ms=0.9602 p95_ms=2.1394 max_ms=2.4512
projection_reused_index: n=40 p50_ms=0.1697 p95_ms=0.7629 max_ms=1.1780
projection_fresh_index: n=40 p50_ms=1.1189 p95_ms=2.6324 max_ms=3.3912
routing_settled: n=40 p50_ms=0.7063 p95_ms=1.0812 max_ms=1.1149
moving_root=a676fbb9-0833-59a8-98cf-a10d8f4b7434 element=Pressure supervision
moved_projection: n=40 p50_ms=0.1565 p95_ms=0.3445 max_ms=0.3790
moved_routing: n=40 p50_ms=0.6113 p95_ms=1.3199 max_ms=1.3733
moved_prepare_projection_routing: n=40 p50_ms=0.8259 p95_ms=1.7640 max_ms=2.1752
view=2 · SA service boundary and functions projection=Allocation nodes=6 ports=6 edges=3
index_new: n=40 p50_ms=0.7820 p95_ms=3.4180 max_ms=6.8439
projection_reused_index: n=40 p50_ms=0.7938 p95_ms=1.9946 max_ms=2.1411
projection_fresh_index: n=40 p50_ms=2.0597 p95_ms=3.4554 max_ms=3.6616
routing_settled: n=40 p50_ms=0.1478 p95_ms=0.7886 max_ms=1.0081
moving_root=8345c76a-8d85-5c31-902e-ec1cd33ed4a3 element=Pressure coordination service
moved_projection: n=40 p50_ms=0.6914 p95_ms=1.5286 max_ms=1.8658
moved_routing: n=40 p50_ms=0.1862 p95_ms=0.5658 max_ms=2.8924
moved_prepare_projection_routing: n=40 p50_ms=1.1724 p95_ms=3.1806 max_ms=4.2620
view=4 · SA mission and included capability projection=Capabilities nodes=4 ports=1 edges=3
index_new: n=40 p50_ms=0.6879 p95_ms=1.3582 max_ms=1.5266
projection_reused_index: n=40 p50_ms=0.1562 p95_ms=0.6767 max_ms=1.0102
projection_fresh_index: n=40 p50_ms=1.2929 p95_ms=2.3543 max_ms=4.0762
routing_settled: n=40 p50_ms=0.2553 p95_ms=1.4389 max_ms=1.6677
moving_root=069a3fb3-077c-59d8-91da-27b0665143c7 element=Assess an alarm
moved_projection: n=40 p50_ms=0.1243 p95_ms=0.1928 max_ms=0.2212
moved_routing: n=40 p50_ms=0.2271 p95_ms=0.6733 max_ms=1.2408
moved_prepare_projection_routing: n=40 p50_ms=0.5542 p95_ms=1.3344 max_ms=1.8957
view=3 · SA service conversation only projection=Allocation nodes=6 ports=6 edges=1
index_new: n=40 p50_ms=0.9618 p95_ms=1.6890 max_ms=2.0995
projection_reused_index: n=40 p50_ms=0.6661 p95_ms=2.3388 max_ms=2.6429
projection_fresh_index: n=40 p50_ms=2.3913 p95_ms=4.1941 max_ms=4.8120
routing_settled: n=40 p50_ms=0.0660 p95_ms=0.2156 max_ms=0.6289
moving_root=40210589-69f7-5209-b329-10bb83cf615c element=Field technician
moved_projection: n=40 p50_ms=0.5527 p95_ms=1.1239 max_ms=1.1362
moved_routing: n=40 p50_ms=0.0495 p95_ms=0.1771 max_ms=0.2209
moved_prepare_projection_routing: n=40 p50_ms=0.7963 p95_ms=4.1835 max_ms=6.7551
view=APPROXIMATION eight-card SA Overview projection=Overview nodes=8 ports=6 edges=13
index_new: n=40 p50_ms=0.7487 p95_ms=1.9597 max_ms=2.2005
projection_reused_index: n=40 p50_ms=0.3885 p95_ms=0.7550 max_ms=1.2965
projection_fresh_index: n=40 p50_ms=1.7135 p95_ms=2.7022 max_ms=4.2204
routing_settled: n=40 p50_ms=2.4525 p95_ms=4.4617 max_ms=4.7735
moving_root=f0440000-0000-4000-8000-000000000002 element=Assess an alarm procedure
moved_projection: n=40 p50_ms=0.4691 p95_ms=0.8354 max_ms=1.0408
moved_routing: n=40 p50_ms=3.1907 p95_ms=4.4781 max_ms=4.5672
moved_prepare_projection_routing: n=40 p50_ms=4.2640 p95_ms=6.8259 max_ms=8.8052
@@ -0,0 +1,62 @@
# Compact Help native evidence
Branch-specific evidence for [issue 39](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/39).
The [design record](../../compact-context-help-20260925.md) owns the decision and current acceptance boundary.
`native/` contains the Windows baseline captures from published source
`715036e132677dd2bc2fb37ed316d93dc9987aec`.
`candidate-f830/` preserves the independent review of source
`f83068757af885572f6b3f932d07233dd1b94b7e`, including its two failed Help workflows,
original screenshots, exact executable/runtime hashes and successful build log.
These observations must not be relabeled as acceptance of a successor executable.
`candidate-5657/` preserves the next frozen source's build, strict all-target
Clippy, full desktop test log and independent native review. Formatting, Clippy
and build passed. Tests: 1,538 passed, one failed, seven ignored. The sole failure
was the new caret test's synthetic typing setup before Help opened; `help-failure.log`
records its exact rerun. The next correction uses one character per key event.
The native report records corrected Help keyboard/caret behavior, minimum-window
layout and real operation-refusal feedback, with explicit scope limitations.
Copied text logs have normalized line endings and trailing blank lines removed;
original local logs are retained. Image and fixture hashes are unchanged.
`candidate-6e7c/` preserves final source
`6e7c4ddaf0775198384a8c4882809ea8e14b2976`: formatting and strict desktop/all-target
Clippy pass, the recovered GUI build passes, and 125 focused Help/allocation/guide
tests pass with zero failures/ignores. `build-diskfull.log` preserves the first
failed link; no code change was needed for the recovered build. Its native report
and 15 screenshots cover cancellation, guide consistency, group/primary selection,
minimum-window long names, exact caret return and Undo/Redo/Undo. The runtime
receipt confirms exit 0 and empty logs. Post-close baseline comparison confirms
all 37 copied fixture files unchanged. The transient OSK observation happened
before loading the model and is explicitly retained. Prior source-specific
workflows remain attributed to their actual binaries.
Reproduce final code checks on the documented Windows gnullvm/Rust 1.98.1 toolchain:
```powershell
cargo fmt --all -- --check
cargo clippy -p oa-desktop --all-targets --locked -- -D warnings
cargo build -p oa-desktop --locked
cargo test -p oa-desktop --locked -- context_help_tests allocation_drag guide::tests --test-threads=1
```
The initial test compilation began at that commit; successor work was edited
while it ran. `tests.log` (nine passed, one failed fixture precondition) and
`geometry-tests.log` (nine passed, one failed destination-width invariant) are
diagnostic evidence from that cycle, not frozen-source acceptance. The geometry
run reused its test executable without recompiling. The first command's
`allocation_drag_full_tree_tests` filter matched no tests; the second used the
actual `full_tree` filter plus the affected mounted State/Process checks.
The review used a copy of `examples/release1/project.arcadia` from the published
Windows package. All 37 fixture files matched the baseline before the trial and
again after closing without saving. `baseline-proof.json` records those bytes.
The executable is a local development build, not a published release artifact.
Reproduce the build using the documented Windows gnullvm toolchain and
`cargo build -p oa-desktop --locked`. Place its matching `libunwind.dll` beside the
executable, launch it, and open an isolated copy of the release1 example. Perform
the workflows and use the window sizes in [the native report](candidate-f830/review.md).
The baseline captures establish layout comparison; the report records actual
interaction results and explicit unverified workflows.
Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

@@ -0,0 +1,49 @@
{
"baseline_binary": "2c03bd6cc3f1110c219e4f57ab94874a121590f83779239a93289b7170664399",
"baseline_source": "715036e132677dd2bc2fb37ed316d93dc9987aec",
"model_files": {
"evidence/repair-check.md": "f4db17bdca4ecbb1bf0caef01b2da5f1f7f798ab3152b648ce6dd8696a6a68e5",
"expected-diagnostics.json": "3700393d76b940cfc076bf52861bd7b1f43370f8eabce3594531bd0bf1fc851e",
"model.json": "ef0ef4006c3e09d5db6e1b621256b3f7d6642f3a7b09cc34607cfbcca830c727",
"model.rs": "ddc2d92b0d7699a4cadfbb35ae379f0a68d17f4f5d7df82b4b1afcf8d5425fbe",
"oa/activities/activity_oa_restore_work.arcadia": "21cbd7176af8fad68453306f2371ff03e127a994b8796cdf044567332de9686f",
"oa/behavior/process_oa_assessment_procedure.arcadia": "23cabc213c264a16c8595414db6acb09248c1cef9cd699f1b0316e5bb82c062a",
"oa/behavior/process_oa_field_procedure.arcadia": "9c52086759b7344b4809ceb8d372f65647b16fc24153a03b887faa378c37fe96",
"oa/behavior/process_oa_response.arcadia": "675798bd19e6b40d03e7076b0e59b110cdaaab7b6d16c47c3ac80fa960072e84",
"oa/behavior/scenario_oa_conversation.arcadia": "e217e5394a0771dc16206ed9437a231da27905d2f19be64b3f48281c0a32fb6b",
"oa/behavior/scenario_oa_full_scenario.arcadia": "c5a285f2d7c61bd2a136107f267fbf9cddb1cba3f63ff36a6f53f7ab98f33df5",
"oa/behavior/state_machine_oa_monitor.arcadia": "e7349e1e5336282eed3f5a103129db33d3ae4ed500788ee7129e8fc193ac57f6",
"oa/capabilities.arcadia": "26a3d9b615a3251ff010e0b47127f2d16bc2dcd45ed95967208b0076d725843a",
"oa/model.arcadia": "069a5eaaf525089935cc9d73ae7b916866ed78c6534705d75739650ecdea7ada",
"oa/participants.arcadia": "591a75a9ecad280302be4d4ae0171ad616377ed11ead5e233848ca2dc0a71819",
"oa/types.arcadia": "f02c391d584674c879f662a418abba3a220f1fee88471ca49322ac9873de628d",
"project.arcadia": "b2674e6bf77cfe0f6f0ba79c81d2e96d92f39c02ca2c6266d80e91723bfb9fda",
"README.md": "113cfb1cf38a98b51bff60442d86a35d636a3d80ef206bece7d53d0aae67f2d5",
"sa/behavior/process_sa_assessment_procedure.arcadia": "5c414fbdaabf9f9e402b0441fcacf1cacf4dbbc6c822162f028de35abf59be2d",
"sa/behavior/process_sa_field_procedure.arcadia": "ece846fdf93857e71a9ab0efcbdf64a5c41c71180f62afa3f79077fffb53b8f2",
"sa/behavior/process_sa_response.arcadia": "af7fdda280a917cf626f6e077162d481f9aaad280f8e81330c07d7fe384b1c52",
"sa/behavior/scenario_sa_conversation.arcadia": "01339699ec3ee409418d9bb232542f2bcd9419f1e67b183e77700c56bb9f71d2",
"sa/behavior/scenario_sa_full_scenario.arcadia": "5dce6b00a3a441162e8dee3e23d9ca5ab7bed4a24de669b1fba03664a3086dda",
"sa/behavior/state_machine_sa_monitor.arcadia": "17dbcfa5bbfd10fc8e23a325fc950ce853c219b4aa89c74f96278cbb3f34acc8",
"sa/capabilities.arcadia": "81706a0ca9d7db2aa0350888b9c00d853885185db2e6b90557d3d51a11c3d645",
"sa/functions/function_sa_audit_thresholds.arcadia": "27f798f78f36e72b38edab3725af2feb0eaa010fd52a60b5c6b6bef57ad3b686",
"sa/functions/function_sa_restore_work.arcadia": "357c6acb80f86b4e8d8f5c98f9f79d140f85fbe09f3406b41b7ac6eba464ec8c",
"sa/model.arcadia": "805b90262e27090ae7da81a51bcefa49c97fb0b3d3220b4a72323b4c4351c395",
"sa/participants.arcadia": "ca144d6a8f45fe720b5d18c7b59c7671444baa8c37e5ce9117bcba34b3a6aa84",
"sa/types.arcadia": "540ddbc2bcd0ccf45298e3ea5660637341aff63ff65fd87ac2f26469d1adc064",
"traceability.arcadia": "474bd28d955ff7af7722f6e9a23220d816879e3f46202e79a233544b9c593116",
"transition-before.json": "2253e6434f741687e22327c37d520ed15c043bc36025498650bc2366bb6a874d",
"transition-request.json": "43b9a22e5f95ad3bc0ebd2478ead0e14406854abc989ae94ded9367b013d812a",
"views/diagram_oa_allocation_view.arcadia": "c45d7467839219d894804c1ef2d22ff4d4a5a84a6a273c526bafd4c1facde624",
"views/diagram_sa_allocation_view.arcadia": "352a3ca745517592b5c9b1239b5770f62f0466a329a91fd03457ef2b53c06ed6",
"views/diagram_sa_capability_view.arcadia": "8f18fcccbcddcf3c1ea0ffe727b5b23b77fc148c5da4fde953abe681e4c20cd2",
"views/diagram_sa_service_view.arcadia": "4c72cb7593d9c4be8d2600b0656a7a3a6ce84c45bb2f3e58a4ee5ae3bf91913c",
"views/diagram_sa_state_view.arcadia": "dd1bea81ac7dc549a53f9b190be6f13052e00ede345bd180444cc31edb892230"
},
"matching_files": 37,
"baseline_captures": {
"baseline-allocation-compact.png": "d92a0cca62a038dcf0894d92b37a64028342c2365e3fb8880ed597222123d96f",
"baseline-trace-compact.png": "b608a3d75612d8c06aacc094a7aebd12a0798ce30f2126c00bc3ad61a9103217",
"baseline-trace-normal.png": "6dfb6c595af4247aab3600da0e0a25ba4b11151436e9fc4a406f1036053f71d0"
}
}
@@ -0,0 +1,6 @@
{
"buildExit": 0,
"runtime": "F45604A12E8BCD839FD86F667C1BE1CC7C4F9DA2B3C69FF381AC708F0E1AE7D4",
"source": "5657a996ed2cefb1fa84ef967b655eaf8f9f6817",
"binary": "83CCEFF8B713491AFEE92FFCAFE62B02F5EEA6A3D899F6F334848FDC7BB0D88D"
}
@@ -0,0 +1,2 @@
Compiling oa-desktop v0.2.0 (C:\ar-compact-01a0d717\crates\oa-desktop)
Finished `dev` profile [unoptimized] target(s) in 2m 12s
@@ -0,0 +1,6 @@
Compiling oa-core v0.2.0 (C:\ar-compact-01a0d717\crates\oa-core)
Checking iced_widget v0.14.2 (C:\ar-compact-01a0d717\crates\vendor\iced_widget)
Compiling oa-server v0.2.0 (C:\ar-compact-01a0d717\crates\oa-server)
Compiling oa-desktop v0.2.0 (C:\ar-compact-01a0d717\crates\oa-desktop)
Checking iced v0.14.0
Finished `dev` profile [unoptimized] target(s) in 4m 09s
@@ -0,0 +1,16 @@
running 1 test
thread 'app::context_help_tests::mounted_context_help_keyboard_scroll_preserves_inspector_focus_and_exact_caret' (7368) panicked at crates\oa-desktop\src\app\context_help_tests.rs:389:5:
assertion `left == right` failed
left: "DSend"
right: "DRAFT Send"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test app::context_help_tests::mounted_context_help_keyboard_scroll_preserves_inspector_focus_and_exact_caret ... FAILED
failures:
failures:
app::context_help_tests::mounted_context_help_keyboard_scroll_preserves_inspector_focus_and_exact_caret
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1545 filtered out; finished in 1.56s
@@ -0,0 +1,32 @@
# Independent native successor review
Reviewed source `5657a996ed2cefb1fa84ef967b655eaf8f9f6817`; executable SHA-256 `83CCEFF8B713491AFEE92FFCAFE62B02F5EEA6A3D899F6F334848FDC7BB0D88D` independently rechecked after the run; runtime SHA-256 `F45604A12E8BCD839FD86F667C1BE1CC7C4F9DA2B3C69FF381AC708F0E1AE7D4` from build.json. Used Windows native Computer Use, the isolated `model/project.arcadia`, normal 1440x900 and minimum 1100x700 client sizes (1442x932 and 1102x732 captures). The prior candidate report remains historical under `../candidate-f830/review.md`.
## Result
Both prior blocking native findings are corrected in the exercised workflows. No new blocking finding was observed in this bounded retest. This is not complete product, accessibility, multiselection or first-release acceptance.
### Help keyboard reading and caret preservation
1. In normal Allocation, focused inspector Name, selected its text, typed `LEFT RIGHT`, and pressed Ctrl+Left to put the caret before `RIGHT`. Opened Help with F1. PageDown visibly scrolled to lower sections; PageUp returned to the top; End reached the bottom; Home returned to the top; Down moved one increment and Up reversed it. Evidence: `02-help-pagedown.png`, `03-help-end.png`.
2. Pressed Escape, then typed `X` without refocusing. Name became exactly `LEFT XRIGHT`. Reopened with F1, clicked visible Close, then typed `Y` without refocusing. Name became exactly `LEFT XYRIGHT`. Thus keyboard reading did not move the background caret, and both dismissal paths preserved input continuation. Evidence: `04-caret-after-escape.png`, `05-caret-after-close.png`. Revert restored the accepted property.
3. Opened Help again and resized the native window to its minimum width and height through the native system menu. Help reflowed with Close reachable; End still reached the bottom and Escape returned to the same diagram. Evidence: `06-help-minimum-resized.png`.
4. At minimum size, opened System functional chain `Handle a pressure alarm`, chose W, clicked blank canvas, and entered `LEFT RIGHT` in the pending contribution Name. Ctrl+Left, F1, End, Escape, then `X` produced exactly `LEFT XRIGHT` without refocusing. Create remained disabled with its missing-source explanation and Cancel reachable. Cancel preserved the accepted model. Evidence: `15-process-caret-restored.png`.
### Compact controls and actionable feedback
- Normal and minimum Allocation show projection, Help and Arrange together, with a separate full-width Destination slot. At minimum size the canvas begins near y=350 versus baseline y=414, approximately 64 pixels recovered. Changing from no selection to a selected work card and exercising refused drags did not move the canvas boundary. Evidence: `01-allocation-normal.png`, `07-allocation-minimum.png`.
- Clicking Arrange displays `Arrange ✓`; the tooltip explains one-drag scope, Alt+A and Escape. Escape removes the check; Alt+A arms it again. Evidence: `08-arrange-tooltip-armed.png`.
- With Arrange armed, dragged `Assess pressure alarm` from Control room toward Field technician. The operation was refused with the visible footer message `Make room or adjust the view, then drag again. Zoom in to read the work and destination.` The accepted model remained saved and the work stayed allocated to Control room. Evidence: `09-arrange-refusal.png`.
- Repeated the drag without Arrange. Core validation refused the reassignment with `exchange_allocation_performer: Actual activity allocations must agree with one permitted communication direction; review the means or the activity allocations.` The shortened footer remained visible, and pointing at it exposed the complete readable explanation. The selected activity and accepted model remained unchanged. Evidence: `10-assignment-refusal.png`, `11-refusal-tooltip.png`.
- Changed View content to Traceability. Count, Add existing elements, Review layer traces, View visibility and Help all remain reachable at minimum width. Canvas starts near y=356 versus baseline y=470, approximately 114 pixels recovered. Undid this temporary projection change. Evidence: `12-trace-minimum.png`.
- Opened saved State view `5 · SA pressure supervision`: the generic idle canvas instruction is removed. Choosing +Region still shows its active creation prompt. F1 opens the States topic; Escape returns with +Region still selected, without creating an object. Evidence: `13-state-idle.png`, `14-state-active-prompt.png`.
## Limitations and minor observations
- The existing State active prompt still truncates at minimum width (`Create Region ... machine or composite s...`). This retest confirms it was retained, not that every pre-existing State prompt has complete narrow-window readability.
- The compact control says `Arrange`, while the guide still says `Arrange next drag`; its tooltip explains that wording. Minor consistency cleanup was reported to the integration owner; no user workflow failed because of it.
- Modifier-click/native multiselection and long-name group toolbar layout were not independently operated because the supported Computer Use API has no modifier-click/key-hold operation. Do not infer them from the single-selection screenshots. The parent owns mounted-widget verification separately. Source-editor caret behavior and full Scenario workflows were not repeated in this bounded successor retest.
- The approved native launch API does not expose stdout/stderr or process exit status. After Alt+F4, refreshed native window enumeration confirmed both successor application and console windows disappeared. No crash dialog was observed; this is not an asserted exit code or log inspection.
No save was performed. A post-run hash comparison against baseline-proof.json found no changed files among all 37 copied fixture files. The UI returned to the saved baseline with 94 objects, 62 links and one model check before closure. Screenshots are supporting evidence; the results above describe actual input and observed responses.
Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

@@ -0,0 +1,49 @@
{
"baseline_binary": "2c03bd6cc3f1110c219e4f57ab94874a121590f83779239a93289b7170664399",
"baseline_source": "715036e132677dd2bc2fb37ed316d93dc9987aec",
"model_files": {
"evidence/repair-check.md": "f4db17bdca4ecbb1bf0caef01b2da5f1f7f798ab3152b648ce6dd8696a6a68e5",
"expected-diagnostics.json": "3700393d76b940cfc076bf52861bd7b1f43370f8eabce3594531bd0bf1fc851e",
"model.json": "ef0ef4006c3e09d5db6e1b621256b3f7d6642f3a7b09cc34607cfbcca830c727",
"model.rs": "ddc2d92b0d7699a4cadfbb35ae379f0a68d17f4f5d7df82b4b1afcf8d5425fbe",
"oa/activities/activity_oa_restore_work.arcadia": "21cbd7176af8fad68453306f2371ff03e127a994b8796cdf044567332de9686f",
"oa/behavior/process_oa_assessment_procedure.arcadia": "23cabc213c264a16c8595414db6acb09248c1cef9cd699f1b0316e5bb82c062a",
"oa/behavior/process_oa_field_procedure.arcadia": "9c52086759b7344b4809ceb8d372f65647b16fc24153a03b887faa378c37fe96",
"oa/behavior/process_oa_response.arcadia": "675798bd19e6b40d03e7076b0e59b110cdaaab7b6d16c47c3ac80fa960072e84",
"oa/behavior/scenario_oa_conversation.arcadia": "e217e5394a0771dc16206ed9437a231da27905d2f19be64b3f48281c0a32fb6b",
"oa/behavior/scenario_oa_full_scenario.arcadia": "c5a285f2d7c61bd2a136107f267fbf9cddb1cba3f63ff36a6f53f7ab98f33df5",
"oa/behavior/state_machine_oa_monitor.arcadia": "e7349e1e5336282eed3f5a103129db33d3ae4ed500788ee7129e8fc193ac57f6",
"oa/capabilities.arcadia": "26a3d9b615a3251ff010e0b47127f2d16bc2dcd45ed95967208b0076d725843a",
"oa/model.arcadia": "069a5eaaf525089935cc9d73ae7b916866ed78c6534705d75739650ecdea7ada",
"oa/participants.arcadia": "591a75a9ecad280302be4d4ae0171ad616377ed11ead5e233848ca2dc0a71819",
"oa/types.arcadia": "f02c391d584674c879f662a418abba3a220f1fee88471ca49322ac9873de628d",
"project.arcadia": "b2674e6bf77cfe0f6f0ba79c81d2e96d92f39c02ca2c6266d80e91723bfb9fda",
"README.md": "113cfb1cf38a98b51bff60442d86a35d636a3d80ef206bece7d53d0aae67f2d5",
"sa/behavior/process_sa_assessment_procedure.arcadia": "5c414fbdaabf9f9e402b0441fcacf1cacf4dbbc6c822162f028de35abf59be2d",
"sa/behavior/process_sa_field_procedure.arcadia": "ece846fdf93857e71a9ab0efcbdf64a5c41c71180f62afa3f79077fffb53b8f2",
"sa/behavior/process_sa_response.arcadia": "af7fdda280a917cf626f6e077162d481f9aaad280f8e81330c07d7fe384b1c52",
"sa/behavior/scenario_sa_conversation.arcadia": "01339699ec3ee409418d9bb232542f2bcd9419f1e67b183e77700c56bb9f71d2",
"sa/behavior/scenario_sa_full_scenario.arcadia": "5dce6b00a3a441162e8dee3e23d9ca5ab7bed4a24de669b1fba03664a3086dda",
"sa/behavior/state_machine_sa_monitor.arcadia": "17dbcfa5bbfd10fc8e23a325fc950ce853c219b4aa89c74f96278cbb3f34acc8",
"sa/capabilities.arcadia": "81706a0ca9d7db2aa0350888b9c00d853885185db2e6b90557d3d51a11c3d645",
"sa/functions/function_sa_audit_thresholds.arcadia": "27f798f78f36e72b38edab3725af2feb0eaa010fd52a60b5c6b6bef57ad3b686",
"sa/functions/function_sa_restore_work.arcadia": "357c6acb80f86b4e8d8f5c98f9f79d140f85fbe09f3406b41b7ac6eba464ec8c",
"sa/model.arcadia": "805b90262e27090ae7da81a51bcefa49c97fb0b3d3220b4a72323b4c4351c395",
"sa/participants.arcadia": "ca144d6a8f45fe720b5d18c7b59c7671444baa8c37e5ce9117bcba34b3a6aa84",
"sa/types.arcadia": "540ddbc2bcd0ccf45298e3ea5660637341aff63ff65fd87ac2f26469d1adc064",
"traceability.arcadia": "474bd28d955ff7af7722f6e9a23220d816879e3f46202e79a233544b9c593116",
"transition-before.json": "2253e6434f741687e22327c37d520ed15c043bc36025498650bc2366bb6a874d",
"transition-request.json": "43b9a22e5f95ad3bc0ebd2478ead0e14406854abc989ae94ded9367b013d812a",
"views/diagram_oa_allocation_view.arcadia": "c45d7467839219d894804c1ef2d22ff4d4a5a84a6a273c526bafd4c1facde624",
"views/diagram_sa_allocation_view.arcadia": "352a3ca745517592b5c9b1239b5770f62f0466a329a91fd03457ef2b53c06ed6",
"views/diagram_sa_capability_view.arcadia": "8f18fcccbcddcf3c1ea0ffe727b5b23b77fc148c5da4fde953abe681e4c20cd2",
"views/diagram_sa_service_view.arcadia": "4c72cb7593d9c4be8d2600b0656a7a3a6ce84c45bb2f3e58a4ee5ae3bf91913c",
"views/diagram_sa_state_view.arcadia": "dd1bea81ac7dc549a53f9b190be6f13052e00ede345bd180444cc31edb892230"
},
"matching_files": 37,
"baseline_captures": {
"baseline-allocation-compact.png": "d92a0cca62a038dcf0894d92b37a64028342c2365e3fb8880ed597222123d96f",
"baseline-trace-compact.png": "b608a3d75612d8c06aacc094a7aebd12a0798ce30f2126c00bc3ad61a9103217",
"baseline-trace-normal.png": "6dfb6c595af4247aab3600da0e0a25ba4b11151436e9fc4a406f1036053f71d0"
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
{
"source": "6e7c4ddaf0775198384a8c4882809ea8e14b2976",
"binary": "D55ECAD4B0F75C0C9C26625E5441BEF9C9360890B65BC13236C6EBFAF03D631E",
"buildExit": 0,
"runtime": "F45604A12E8BCD839FD86F667C1BE1CC7C4F9DA2B3C69FF381AC708F0E1AE7D4"
}
@@ -0,0 +1,2 @@
Compiling oa-desktop v0.2.0 (C:\ar-compact-01a0d717\crates\oa-desktop)
Finished `dev` profile [unoptimized] target(s) in 2m 21s
@@ -0,0 +1,2 @@
Checking oa-desktop v0.2.0 (C:\ar-compact-01a0d717\crates\oa-desktop)
Finished `dev` profile [unoptimized] target(s) in 5m 24s
@@ -0,0 +1,49 @@
# Final native UX retest
Independent review by `/root/ux_critique`, using Windows Computer Use (`@oai/sky`). Final preparation and launch began on 2026-09-29; the resumed input session completed on 2026-10-01 America/Los_Angeles (completion clock: 2026-10-02 00:42:55 UTC).
## Identity and scope
- Source: `6e7c4ddaf0775198384a8c4882809ea8e14b2976`.
- Executable: `.local/native-final/arcadia-studio.exe`, SHA-256 `D55ECAD4B0F75C0C9C26625E5441BEF9C9360890B65BC13236C6EBFAF03D631E`.
- Runtime: `libunwind.dll`, SHA-256 `F45604A12E8BCD839FD86F667C1BE1CC7C4F9DA2B3C69FF381AC708F0E1AE7D4`.
- Read build identity from `build.json`. Parent launched this executable with a stdout/stderr/exit watcher; reviewer selected its unique returned native window and did not launch another executable.
- Model: only `.local/native-final/model/project.arcadia`, copied from the released water-pressure fixture. `baseline-proof.json` records its 37 original file hashes and baseline source/binary identity. No Save was performed.
- Normal window: 1440x900 client, captured 1442x932. Minimum: 1100x700 client, captured 1102x732. Same native environment and baseline fixture as prior review.
This is a bounded final-delta retest plus previously missing native group-selection/long-name coverage. The earlier `../candidate-5657/review.md` remains historical evidence for Process draft, State, Traceability, refused allocation, and resize-with-Help workflows on source `5657a996...`; those are not silently relabeled as this binary's results.
## Result
No blocking UX defect found in the workflows below. The two final minor corrections behave as intended, and the newly exercised native group workflow passed.
### Arrange cancellation and disclosed guidance
1. In the populated Allocation view, clicked Arrange. The control displayed its check and footer showed the armed state.
2. Pressed Escape. The check cleared and footer became `Arrange cancelled`, replacing the obsolete armed outcome. Repeated at minimum size with the same result. Evidence: `02-arrange-escape-cancelled.png`, `14-minimum-arrange-cancelled.png`.
3. Armed Arrange again, then opened contextual Help with the pointer. Help opened and footer became `Arrange cancelled`. Visible Close returned to the same model and canvas. Evidence: `03-help-cancels-arrange.png`.
4. Used PageDown to reach the relevant guide paragraphs. They now say `Choose Arrange` / `choose Arrange or press Alt+A`, matching the visible control, and explain right-click Add to selection / Inspect this element. Evidence: `04-guide-arrange-and-context-selection.png`.
### Native group selection and primary inspector
1. Clicked `Assess pressure alarm`; right-clicked `Repair valve in the field`; chose `Add to selection` from the ordinary context menu. Both cards gained selected outlines and the row displayed `2 selected`, `Hide selected`, `Clear`, and `Properties: Repair valve ... only`. Inspector showed the Repair activity. Evidence: `05-native-group-selection.png`.
2. Right-clicked the selected Assess card and chose `Inspect this element`. Both cards stayed selected; Inspector switched to Assess and the row's `Properties: ... only` summary followed it. Evidence: `06-group-primary-inspector.png`.
3. Opened F1 Help and dismissed with Escape. The same pair, primary inspector, canvas position and zoom remained. Evidence: `07-group-help-preserved.png`.
4. Resized to the configured minimum through the native window system menu. The group controls remained readable and reachable, with the full-width Destination slot above them. The intentional resize refitted the view; subsequent selection/draft/help transitions did not move its canvas boundary. Evidence: `08-group-minimum.png`.
### Long name, exact caret, Apply, Undo and Redo
1. With both cards still selected and Assess as primary, focused its Name field and replaced the draft with `Pressure alarm assessment with a deliberately long operational activity name LEFT RIGHT`.
2. Ctrl+Left placed the caret before RIGHT. Opened F1, pressed End to scroll Help, dismissed with Escape, and typed X without clicking the field. Reopened F1, used visible Close, and typed Y without refocusing. Pressing End in the restored field exposed the ending `LEFT XYRIGHT`. Thus both dismissal paths preserved the exact draft caret, not merely the draft contents. The pair and primary inspector also remained unchanged. Evidence: `09-group-long-draft-caret.png`.
3. Clicked Apply changes. Only the primary Assess activity acquired the long name; Repair retained its original label. At minimum size, the selection row remained one stable row: count, Hide selected, Clear, and a shortened `Properties: Pressure alar... only` summary. The truncation did not hide the `only` distinction or an action. The Inspector Name field remained editable/scrollable for the complete name. Evidence: `10-long-name-group-minimum.png`.
4. Clicked the non-editable summary row to leave the text input, then Ctrl+Z restored `Assess pressure alarm` and the UI's saved state. Ctrl+Y restored the long name and unsaved state. Ctrl+Z restored the original name and saved state again. The group remained selected through all three operations. Evidence: `11-long-name-undo.png`, `12-long-name-redo.png`.
5. Clicked Clear. The group cleared, Inspector returned to view properties, and the canvas boundary and card positions remained stable. Evidence: `13-clear-selection-stable-canvas.png`.
## Environment observation and limits
- Initial Ctrl+O unexpectedly opened Windows On-Screen Keyboard, obscuring the target. Its screenshot showed a highlighted Windows key; another observation showed a different highlighted key without another keyboard action from this reviewer. Input was stopped and the parent notified. The keyboard was already absent on the next fresh window enumeration; reviewer did not close it or press any Windows-key control. Used pointer Open and a literal copied-fixture path to continue. Subsequent Escape, PageDown, F1, Ctrl+A, Ctrl+Left, Alt+Space, Undo/Redo and typing produced the expected target-app responses. This transient environment interference is preserved in `00-environment-input-interference.png`; it is not attributed to an application defect.
- Native modifier-click remains untested; native group selection was genuinely exercised through the supported context menu instead. No multi-item drag/assignment was attempted in this final retest. Prior successor refused-drag evidence is separate.
- Process/State/Scenario, source-editor caret, all Help navigation keys and resize while Help is open were not all repeated on this final binary. The final run directly exercised property draft/caret, group preservation, PageDown and End, F1/Escape/Close, minimum sizing and edit recovery. Full acceptance must combine the accurately versioned evidence rather than infer missing workflows from screenshots.
- Saved-state labels, counts and visible Undo results do not prove whole-Project equality. This review made no Save; post-close byte-hash and watcher-log checks belong to the parent and are recorded separately.
Before closure, UI showed `All changes saved`, original activity names, 94 objects, 62 links and one model check. Closed normally with Alt+F4. Fresh native window enumeration confirmed the final application's window was absent. Parent was notified to inspect watcher stdout/stderr/exit and fixture hashes. No crash dialog was observed; native window disappearance alone is not an asserted exit code.
@@ -0,0 +1,10 @@
{
"source": "6e7c4ddaf0775198384a8c4882809ea8e14b2976",
"binary": "D55ECAD4B0F75C0C9C26625E5441BEF9C9360890B65BC13236C6EBFAF03D631E",
"started_utc": "2026-09-29T14:58:41.721798+00:00",
"pid": 7964,
"exit_code": 0,
"finished_utc": "2026-10-02T00:42:39.601915+00:00",
"stdout_bytes": 0,
"stderr_bytes": 0
}
@@ -1,130 +1,132 @@
Blocking waiting for file lock on build directory
Compiling oa-desktop v0.2.0 (C:\Users\User\Documents\Git\ARCADIA-Studio\.local\drag-out-01a0d6fd\crates\oa-desktop)
Finished `test` profile [unoptimized] target(s) in 8m 13s
Running unittests src\main.rs (C:/Users/User/Documents/Git/ARCADIA-Studio/target\debug\deps\arcadia_studio-c5b42126ba36cd38.exe)
running 121 tests
test allocation_drag::outgoing_header_retains_a_grab_region_without_requiring_full_camera_containment ... ok
test allocation_drag::tests::allocation_artifact_and_manual_trace_cascades_are_named_and_refused ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_detects_hidden_moved_child_and_stationary_enclosure_growth ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_distributed_oa_sa_exact_scope_routes_source_history_and_anchor ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_noop_stale_tamper_target_and_all_selected_headers ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_performer_closure_does_not_acquire_incidental_semantic_root ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_preserves_existing_overlap_but_refuses_its_growth ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_preserves_roles_and_does_not_invent_unplaced_descendants ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_preserves_unrelated_folded_interior_diagnostic_boundary ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_simultaneous_roots_may_enter_each_others_vacated_bounds ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_validates_all_original_members_before_normalizing ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_checks_original_identity_and_visibility_before_normalization ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_distributed_parent_refuses_but_its_independent_leaves_can_reassign ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_finish_rejects_stale_project_and_each_tampered_result ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_normalizes_parent_child_and_assigns_unplaced_leaf_once ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_requires_non_anchor_selected_header_inside_viewport ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_unresolved_oa_role_leaf_accepts_explicit_target_but_not_outside ... ok
test allocation_drag::tests::assignment_tests::group_assignment_accumulates_stable_ids_and_aliases_without_partial_reuse ... ok
test allocation_drag::tests::assignment_tests::group_assignment_collateral_surviving_constraint_refuses_whole_semantic_candidate ... ok
test allocation_drag::tests::assignment_tests::group_assignment_deletes_only_own_routes_across_views_and_keeps_internal_flow ... ok
test allocation_drag::tests::assignment_tests::group_assignment_independent_performers_preserves_already_correct_provenance ... ok
test allocation_drag::tests::assignment_tests::group_assignment_source_failure_preserves_existing_history_and_retry_ids ... ok
test allocation_drag::tests::assignment_tests::group_assignment_unfolds_only_changed_destination_and_refuses_newly_exposed_overlap ... ok
test allocation_drag::tests::assignment_tests::group_assignment_uses_vacated_space_and_one_complete_route_owner_map ... ok
test allocation_drag::tests::assignment_tests::group_assignment_zero_delta_changes_semantics_once_and_then_is_noop ... ok
test allocation_drag::tests::cache_plan_uses_candidate_index_and_same_pixel_different_target_changes_preview ... ok
test allocation_drag::tests::collapsed_target_unfold_is_explicit_and_no_other_fold_changes ... ok
test allocation_drag::tests::direct_exit_revealing_another_role_performer_has_truthful_refusal ... ok
test allocation_drag::tests::explicit_different_performer_retains_advisory_role_warning ... ok
test allocation_drag::tests::folded_subtree_cannot_hide_new_collision ... ok
test allocation_drag::tests::geometry_refuses_new_overlap_bounds_and_invisible_headers_and_preserves_existing_overlap ... ok
test allocation_drag::tests::group_arrange_experiment::mixed_arrange_experiment_detects_moved_folded_child_collision ... ok
test allocation_drag::tests::group_arrange_experiment::mixed_arrange_experiment_detects_stationary_enclosure_growth_collision ... ok
test allocation_drag::tests::group_arrange_experiment::mixed_arrange_experiment_distributed_root_and_performer_can_translate_rigidly ... ok
test allocation_drag::tests::group_arrange_experiment::mixed_arrange_experiment_unrelated_folded_interiors_are_outside_diagnostic_domain ... ok
test allocation_drag::tests::malformed_scope_wrong_projection_duplicate_placement_and_stable_id_collision_refuse ... ok
test allocation_drag::tests::mixed_p_x_y_refuses_semantic_and_arrange_instead_of_stretching_destination ... ok
test allocation_drag::tests::oa_communication_incompleteness_remains_advisory_without_collateral_loss ... ok
test allocation_drag::tests::oa_sa_incoming_between_outgoing_preserve_identity_source_history_and_other_views ... ok
test allocation_drag::tests::oa_sa_one_leaf_move_refuses_when_ancestor_regrouping_introduces_unrelated_overlap ... ok
test allocation_drag::tests::oa_sa_one_leaf_reassignment_and_outward_move_regroup_ancestors_without_moving_sibling ... ok
test allocation_drag::tests::oa_sa_populated_collapsed_target_accepts_room_and_refuses_collision_without_relocating_contents ... ok
test allocation_drag::tests::oa_sa_state_owned_action_and_availability_reject_reassignment_atomically ... ok
test allocation_drag::tests::oa_sa_unfolding_prior_hidden_overlap_refuses_even_when_insertion_does_not_collide ... ok
test allocation_drag::tests::own_deleted_allocation_routes_may_disappear_in_every_diagram_only ... ok
test allocation_drag::tests::role_only_same_effective_performer_is_semantic_noop_and_outgoing_refuses ... ok
test allocation_drag::tests::sa_port_and_deferred_exchange_allocation_cascade_refuses_and_retarget_is_invalid ... ok
test allocation_drag::tests::same_performer_readability_preserves_snapped_noop_and_allocation_identity ... ok
test allocation_drag::tests::scope_detects_first_child_allocation_and_role_transfer_and_finish_rejects_live_edits ... ok
test allocation_drag::tests::selected_header_visibility_allows_viewport_edge_but_refuses_clipping ... ok
test allocation_drag::tests::snapped_noop_returns_no_command_and_keeps_source_revision_and_redo ... ok
test allocation_drag::tests::source_budget_refusal_keeps_project_bundle_history_and_retry_identity_exact ... ok
test allocation_drag::tests::surviving_constraint_mutation_is_refused_even_when_core_candidate_is_valid ... ok
test allocation_drag::tests::target_presentation_requires_accepted_identity_and_selected_header_visibility ... ok
test allocation_drag::tests::toolbar_identity_allows_exact_incoming_placement_at_old_label_overlap ... ok
test allocation_drag::tests::uniform_folded_grandchild_and_unplaced_scope_moves_exactly_q_and_all_l_oa_sa ... ok
test allocation_drag::tests::uniform_role_only_and_mixed_direct_role_composites_same_target_do_not_allocate ... ok
test allocation_drag::tests::uniformly_unassigned_composite_creates_only_stable_leaf_allocations_including_unplaced ... ok
test allocation_drag::tests::unrequested_view_option_cleanup_is_not_whitelisted ... ok
test allocation_drag::tests::unresolved_role_leaf_can_arrange_or_accept_explicit_target_without_guessing ... ok
test app::allocation_drag::clearance::tests::corner_order_follows_boundary_crossing_and_is_deterministic ... ok
test app::allocation_drag::clearance::tests::descendant_footprint_controls_clearance_without_mutating_projects ... ok
test app::allocation_drag::clearance::tests::each_outgoing_edge_clears_the_source_and_passes_ordinary_placement ... ok
test app::allocation_drag::clearance::tests::independent_selected_roots_keep_one_rigid_group_translation ... ok
test app::allocation_drag::clearance::tests::no_crossing_no_overlap_no_source_and_nonfinite_requests_are_empty ... ok
test app::allocation_drag::clearance::tests::source_shrink_uses_candidate_enclosure_not_frozen_target ... ok
test app::allocation_drag::tests::actual_canvas_origin_change_cancels_held_work_before_any_legacy_release ... ok
test app::allocation_drag::tests::arrange_is_one_gesture_and_snapped_noop_preserves_redo_and_source ... ok
test app::allocation_drag::tests::candidate_semantics_are_cached_per_destination_with_stable_ids_and_own_index ... ok
test app::allocation_drag::tests::destination_identity_does_not_describe_blocked_or_outside_viewport_as_unallocation ... ok
test app::allocation_drag::tests::frozen_collapsed_target_uses_only_visible_header_and_port_edge_controls_occlude ... ok
test app::allocation_drag::tests::frozen_targets_use_half_open_semantic_priority_and_refuse_incomparable_overlap ... ok
test app::allocation_drag::tests::full_tree::actual_app_tree_dirty_description_retains_focus_and_middle_caret_for_next_key ... ok
test app::allocation_drag::tests::full_tree::actual_app_tree_dirty_name_retains_focus_and_middle_caret_for_next_key ... ok
test app::allocation_drag::tests::full_tree::actual_app_tree_exact_incoming_drag_keeps_destination_visible_and_canvas_stable ... ok
test app::allocation_drag::tests::full_tree::actual_keyboard_arrange_shortcut_consumes_once_escape_cancels_and_dirty_owner_refuses ... ok
test app::allocation_drag::tests::full_tree::actual_rendered_canvas_pixels_do_not_change_when_toolbar_feedback_text_changes ... ok
test app::allocation_drag::tests::full_tree::actual_toolbar_hover_inspects_last_full_name_without_authorizing_an_outside_drop ... ok
test app::allocation_drag::tests::full_tree::actual_tree_outgoing_boundary_motion_preview_release_and_cancel ... ok
test app::allocation_drag::tests::full_tree::control_focus::dirty_selected_pin_outer_ring_keeps_real_name_focus_and_caret ... ok
test app::allocation_drag::tests::group::allocation_bare_moves_cannot_bypass_armed_active_or_retired_lifetime ... ok
test app::allocation_drag::tests::group::completed_text_apply_rejects_old_allocation_packets_without_retiring_a_new_drag ... ok
test app::allocation_drag::tests::group::connection_lifetime::captured_connection_after_cancel_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::connection_lifetime::captured_connection_context_mismatches_preserve_the_current_session ... ok
test app::allocation_drag::tests::group::connection_lifetime::captured_connection_current_restart_and_pair_commit_after_tool_boundary ... ok
test app::allocation_drag::tests::group::group_arrange_work_and_performer_anchors_preserve_every_responsibility ... ok
test app::allocation_drag::tests::group::group_assignment_split_rebuild_preserves_primary_and_commits_one_complete_candidate ... ok
test app::allocation_drag::tests::group::group_out_and_back_assigns_at_zero_delta_then_true_noop_preserves_redo ... ok
test app::allocation_drag::tests::group::group_selection_aba_and_old_press_cannot_retire_a_new_token ... ok
test app::allocation_drag::tests::group::group_source_refusal_retains_primary_source_and_both_history_paths ... ok
test app::allocation_drag::tests::group::idle_group_press_rejects_selection_generation_aba_with_unchanged_other_stamps ... ok
test app::allocation_drag::tests::group::ordinary_off_grid_performer_out_and_back_is_noop_with_redo ... ok
test app::allocation_drag::tests::group::route_lifetime::captured_route_context_fields_independently_reject_before_retirement ... ok
test app::allocation_drag::tests::group::route_lifetime::current_route_commits_without_session_preserve_exact_route_history ... ok
test app::allocation_drag::tests::group::route_lifetime::same_context_route_attachment_after_selection_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::route_lifetime::same_context_route_commit_after_selection_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::route_lifetime::stale_route_attachment_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::route_lifetime::stale_route_commit_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::unsupported_group_click_collapses_but_threshold_crossing_never_becomes_click ... ok
test app::allocation_drag::tests::modal_roundtrip_equal_fit_undo_resize_and_focus_retire_press_before_replay ... ok
test app::allocation_drag::tests::mounted_clean_stationary_selects_exact_work_without_revision_or_legacy_apply ... ok
test app::allocation_drag::tests::mounted_dirty_port_press_cannot_fall_through_to_applying_port_selection ... ok
test app::allocation_drag::tests::mounted_dirty_property_press_does_not_select_apply_or_destroy_draft ... ok
test app::allocation_drag::tests::mounted_oa_sa_ordered_incoming_between_outgoing_are_exact_single_history_steps ... ok
test app::allocation_drag::tests::mounted_role_only_outgoing_refusal_retains_placement_and_same_performer_creates_no_allocation ... ok
test app::allocation_drag::tests::mounted_uniform_parent_moves_hidden_placements_and_assigns_only_leaves ... ok
test app::allocation_drag::tests::navigation_union::old_chooser_envelopes_preserve_a_current_canvas_gesture ... ok
test app::allocation_drag::tests::navigation_union::stale_gesture_packets_preserve_navigation_and_a_new_live_cancel_still_works ... ok
test app::allocation_drag::tests::oa_sa_clipped_selected_header_refuses_preview_release_and_retries_without_partial_source_or_history ... ok
test app::allocation_drag::tests::oa_sa_toolbar_identity_accepts_exact_receiver_and_collapsed_header_drag ... ok
test app::allocation_drag::tests::outgoing_boundary_drop_clears_source_without_changing_other_placements ... ok
test app::allocation_drag::tests::outside_release_is_cancel_and_does_not_remove_an_assignment ... ok
test app::allocation_drag::tests::pending_behavior_draft_refuses_actual_work_press_and_equal_document_replacement_retires_packet ... ok
test app::allocation_drag::tests::refused_motion_retains_last_scene_but_release_never_commits_it ... ok
test app::allocation_drag::tests::release_uses_ordered_native_position_before_later_motion_in_same_batch ... ok
test app::allocation_drag::tests::same_snapped_position_on_opposite_shared_border_rebuilds_semantics_even_if_layout_refuses ... ok
test app::allocation_drag::tests::source_and_modal_admission_reject_prebuilt_clean_press_without_selecting ... ok
test app::allocation_drag::tests::source_refusal_is_atomic_and_a_new_gesture_can_retry_against_live_revision ... ok
test app::allocation_drag::tests::stale_packets_do_not_cancel_a_newer_token_and_each_release_is_consumed_once ... ok
test app::allocation_drag::tests::toolbar_destination_names_transformed_target_whose_header_is_clipped ... ok
test app::allocation_drag::tests::toolbar_status_leaves_transformed_top_edge_work_header_readable ... ok
test result: ok. 121 passed; 0 failed; 0 ignored; 0 measured; 1424 filtered out; finished in 35.33s
Compiling oa-desktop v0.2.0 (C:\ar-compact-01a0d717\crates\oa-desktop)
Finished `test` profile [unoptimized] target(s) in 5m 01s
Running unittests src\main.rs (C:\Users\User\Documents\Git\ARCADIA-Studio\.local\target-gnullvm\debug\deps\arcadia_studio-c5b42126ba36cd38.exe)
running 125 tests
test allocation_drag::tests::allocation_artifact_and_manual_trace_cascades_are_named_and_refused ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_detects_hidden_moved_child_and_stationary_enclosure_growth ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_distributed_oa_sa_exact_scope_routes_source_history_and_anchor ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_noop_stale_tamper_target_and_all_selected_headers ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_performer_closure_does_not_acquire_incidental_semantic_root ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_preserves_existing_overlap_but_refuses_its_growth ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_preserves_roles_and_does_not_invent_unplaced_descendants ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_preserves_unrelated_folded_interior_diagnostic_boundary ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_simultaneous_roots_may_enter_each_others_vacated_bounds ... ok
test allocation_drag::tests::arrange_tests::explicit_arrange_validates_all_original_members_before_normalizing ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_checks_original_identity_and_visibility_before_normalization ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_distributed_parent_refuses_but_its_independent_leaves_can_reassign ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_finish_rejects_stale_project_and_each_tampered_result ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_normalizes_parent_child_and_assigns_unplaced_leaf_once ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_requires_non_anchor_selected_header_inside_viewport ... ok
test allocation_drag::tests::assignment_boundary_tests::group_assignment_unresolved_oa_role_leaf_accepts_explicit_target_but_not_outside ... ok
test allocation_drag::tests::assignment_tests::group_assignment_accumulates_stable_ids_and_aliases_without_partial_reuse ... ok
test allocation_drag::tests::assignment_tests::group_assignment_collateral_surviving_constraint_refuses_whole_semantic_candidate ... ok
test allocation_drag::tests::assignment_tests::group_assignment_deletes_only_own_routes_across_views_and_keeps_internal_flow ... ok
test allocation_drag::tests::assignment_tests::group_assignment_independent_performers_preserves_already_correct_provenance ... ok
test allocation_drag::tests::assignment_tests::group_assignment_source_failure_preserves_existing_history_and_retry_ids ... ok
test allocation_drag::tests::assignment_tests::group_assignment_unfolds_only_changed_destination_and_refuses_newly_exposed_overlap ... ok
test allocation_drag::tests::assignment_tests::group_assignment_uses_vacated_space_and_one_complete_route_owner_map ... ok
test allocation_drag::tests::assignment_tests::group_assignment_zero_delta_changes_semantics_once_and_then_is_noop ... ok
test allocation_drag::tests::cache_plan_uses_candidate_index_and_same_pixel_different_target_changes_preview ... ok
test allocation_drag::tests::collapsed_target_unfold_is_explicit_and_no_other_fold_changes ... ok
test allocation_drag::tests::direct_exit_revealing_another_role_performer_has_truthful_refusal ... ok
test allocation_drag::tests::explicit_different_performer_retains_advisory_role_warning ... ok
test allocation_drag::tests::folded_subtree_cannot_hide_new_collision ... ok
test allocation_drag::tests::geometry_refuses_new_overlap_bounds_and_invisible_headers_and_preserves_existing_overlap ... ok
test allocation_drag::tests::group_arrange_experiment::mixed_arrange_experiment_detects_moved_folded_child_collision ... ok
test allocation_drag::tests::group_arrange_experiment::mixed_arrange_experiment_detects_stationary_enclosure_growth_collision ... ok
test allocation_drag::tests::group_arrange_experiment::mixed_arrange_experiment_distributed_root_and_performer_can_translate_rigidly ... ok
test allocation_drag::tests::group_arrange_experiment::mixed_arrange_experiment_unrelated_folded_interiors_are_outside_diagnostic_domain ... ok
test allocation_drag::tests::malformed_scope_wrong_projection_duplicate_placement_and_stable_id_collision_refuse ... ok
test allocation_drag::tests::mixed_p_x_y_refuses_semantic_and_arrange_instead_of_stretching_destination ... ok
test allocation_drag::tests::oa_communication_incompleteness_remains_advisory_without_collateral_loss ... ok
test allocation_drag::tests::oa_sa_incoming_between_outgoing_preserve_identity_source_history_and_other_views ... ok
test allocation_drag::tests::oa_sa_one_leaf_move_refuses_when_ancestor_regrouping_introduces_unrelated_overlap ... ok
test allocation_drag::tests::oa_sa_one_leaf_reassignment_and_outward_move_regroup_ancestors_without_moving_sibling ... ok
test allocation_drag::tests::oa_sa_populated_collapsed_target_accepts_room_and_refuses_collision_without_relocating_contents ... ok
test allocation_drag::tests::oa_sa_state_owned_action_and_availability_reject_reassignment_atomically ... ok
test allocation_drag::tests::oa_sa_unfolding_prior_hidden_overlap_refuses_even_when_insertion_does_not_collide ... ok
test allocation_drag::tests::own_deleted_allocation_routes_may_disappear_in_every_diagram_only ... ok
test allocation_drag::tests::role_only_same_effective_performer_is_semantic_noop_and_outgoing_refuses ... ok
test allocation_drag::tests::sa_port_and_deferred_exchange_allocation_cascade_refuses_and_retarget_is_invalid ... ok
test allocation_drag::tests::same_performer_readability_preserves_snapped_noop_and_allocation_identity ... ok
test allocation_drag::tests::scope_detects_first_child_allocation_and_role_transfer_and_finish_rejects_live_edits ... ok
test allocation_drag::tests::selected_header_visibility_allows_viewport_edge_but_refuses_clipping ... ok
test allocation_drag::tests::snapped_noop_returns_no_command_and_keeps_source_revision_and_redo ... ok
test allocation_drag::tests::source_budget_refusal_keeps_project_bundle_history_and_retry_identity_exact ... ok
test allocation_drag::tests::surviving_constraint_mutation_is_refused_even_when_core_candidate_is_valid ... ok
test allocation_drag::tests::target_presentation_requires_accepted_identity_and_selected_header_visibility ... ok
test allocation_drag::tests::toolbar_identity_allows_exact_incoming_placement_at_old_label_overlap ... ok
test allocation_drag::tests::uniform_folded_grandchild_and_unplaced_scope_moves_exactly_q_and_all_l_oa_sa ... ok
test allocation_drag::tests::uniform_role_only_and_mixed_direct_role_composites_same_target_do_not_allocate ... ok
test allocation_drag::tests::uniformly_unassigned_composite_creates_only_stable_leaf_allocations_including_unplaced ... ok
test allocation_drag::tests::unrequested_view_option_cleanup_is_not_whitelisted ... ok
test allocation_drag::tests::unresolved_role_leaf_can_arrange_or_accept_explicit_target_without_guessing ... ok
test app::allocation_drag::tests::actual_canvas_origin_change_cancels_held_work_before_any_legacy_release ... ok
test app::allocation_drag::tests::arrange_is_one_gesture_and_snapped_noop_preserves_redo_and_source ... ok
test app::allocation_drag::tests::candidate_semantics_are_cached_per_destination_with_stable_ids_and_own_index ... ok
test app::allocation_drag::tests::destination_identity_does_not_describe_blocked_or_outside_viewport_as_unallocation ... ok
test app::allocation_drag::tests::frozen_collapsed_target_uses_only_visible_header_and_port_edge_controls_occlude ... ok
test app::allocation_drag::tests::frozen_targets_use_half_open_semantic_priority_and_refuse_incomparable_overlap ... ok
test app::allocation_drag::tests::full_tree::actual_app_tree_dirty_description_retains_focus_and_middle_caret_for_next_key ... ok
test app::allocation_drag::tests::full_tree::actual_app_tree_dirty_name_retains_focus_and_middle_caret_for_next_key ... ok
test app::allocation_drag::tests::full_tree::actual_app_tree_exact_incoming_drag_keeps_destination_visible_and_canvas_stable ... ok
test app::allocation_drag::tests::full_tree::actual_keyboard_arrange_shortcut_consumes_once_escape_cancels_and_dirty_owner_refuses ... ok
test app::allocation_drag::tests::full_tree::actual_rendered_canvas_pixels_do_not_change_when_toolbar_feedback_text_changes ... ok
test app::allocation_drag::tests::full_tree::actual_toolbar_hover_inspects_last_full_name_without_authorizing_an_outside_drop ... ok
test app::allocation_drag::tests::full_tree::control_focus::dirty_selected_pin_outer_ring_keeps_real_name_focus_and_caret ... ok
test app::allocation_drag::tests::group::allocation_bare_moves_cannot_bypass_armed_active_or_retired_lifetime ... ok
test app::allocation_drag::tests::group::completed_text_apply_rejects_old_allocation_packets_without_retiring_a_new_drag ... ok
test app::allocation_drag::tests::group::connection_lifetime::captured_connection_after_cancel_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::connection_lifetime::captured_connection_context_mismatches_preserve_the_current_session ... ok
test app::allocation_drag::tests::group::connection_lifetime::captured_connection_current_restart_and_pair_commit_after_tool_boundary ... ok
test app::allocation_drag::tests::group::group_arrange_work_and_performer_anchors_preserve_every_responsibility ... ok
test app::allocation_drag::tests::group::group_assignment_split_rebuild_preserves_primary_and_commits_one_complete_candidate ... ok
test app::allocation_drag::tests::group::group_out_and_back_assigns_at_zero_delta_then_true_noop_preserves_redo ... ok
test app::allocation_drag::tests::group::group_selection_aba_and_old_press_cannot_retire_a_new_token ... ok
test app::allocation_drag::tests::group::group_source_refusal_retains_primary_source_and_both_history_paths ... ok
test app::allocation_drag::tests::group::idle_group_press_rejects_selection_generation_aba_with_unchanged_other_stamps ... ok
test app::allocation_drag::tests::group::ordinary_off_grid_performer_out_and_back_is_noop_with_redo ... ok
test app::allocation_drag::tests::group::route_lifetime::captured_route_context_fields_independently_reject_before_retirement ... ok
test app::allocation_drag::tests::group::route_lifetime::current_route_commits_without_session_preserve_exact_route_history ... ok
test app::allocation_drag::tests::group::route_lifetime::same_context_route_attachment_after_selection_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::route_lifetime::same_context_route_commit_after_selection_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::route_lifetime::stale_route_attachment_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::route_lifetime::stale_route_commit_preserves_arrange_arm_and_live_group ... ok
test app::allocation_drag::tests::group::unsupported_group_click_collapses_but_threshold_crossing_never_becomes_click ... ok
test app::allocation_drag::tests::modal_roundtrip_equal_fit_undo_resize_and_focus_retire_press_before_replay ... ok
test app::allocation_drag::tests::mounted_clean_stationary_selects_exact_work_without_revision_or_legacy_apply ... ok
test app::allocation_drag::tests::mounted_dirty_port_press_cannot_fall_through_to_applying_port_selection ... ok
test app::allocation_drag::tests::mounted_dirty_property_press_does_not_select_apply_or_destroy_draft ... ok
test app::allocation_drag::tests::mounted_oa_sa_ordered_incoming_between_outgoing_are_exact_single_history_steps ... ok
test app::allocation_drag::tests::mounted_role_only_outgoing_refusal_retains_placement_and_same_performer_creates_no_allocation ... ok
test app::allocation_drag::tests::mounted_uniform_parent_moves_hidden_placements_and_assigns_only_leaves ... ok
test app::allocation_drag::tests::navigation_union::old_chooser_envelopes_preserve_a_current_canvas_gesture ... ok
test app::allocation_drag::tests::navigation_union::stale_gesture_packets_preserve_navigation_and_a_new_live_cancel_still_works ... ok
test app::allocation_drag::tests::oa_sa_clipped_selected_header_refuses_preview_release_and_retries_without_partial_source_or_history ... ok
test app::allocation_drag::tests::oa_sa_toolbar_identity_accepts_exact_receiver_and_collapsed_header_drag ... ok
test app::allocation_drag::tests::outside_release_is_cancel_and_does_not_remove_an_assignment ... ok
test app::allocation_drag::tests::pending_behavior_draft_refuses_actual_work_press_and_equal_document_replacement_retires_packet ... ok
test app::allocation_drag::tests::release_uses_ordered_native_position_before_later_motion_in_same_batch ... ok
test app::allocation_drag::tests::same_snapped_position_on_opposite_shared_border_rebuilds_semantics_even_if_layout_refuses ... ok
test app::allocation_drag::tests::source_and_modal_admission_reject_prebuilt_clean_press_without_selecting ... ok
test app::allocation_drag::tests::source_refusal_is_atomic_and_a_new_gesture_can_retry_against_live_revision ... ok
test app::allocation_drag::tests::stale_packets_do_not_cancel_a_newer_token_and_each_release_is_consumed_once ... ok
test app::allocation_drag::tests::toolbar_destination_names_transformed_target_whose_header_is_clipped ... ok
test app::allocation_drag::tests::toolbar_status_leaves_transformed_top_edge_work_header_readable ... ok
test app::context_help_tests::context_help_accepts_live_process_viewport_and_rejects_stale_measurements ... ok
test app::context_help_tests::context_help_barrier_retires_text_selection_drag_without_changing_the_caret ... ok
test app::context_help_tests::context_help_disables_allocation_input_including_early_work_drag_dispatch ... ok
test app::context_help_tests::context_help_escape_preserves_pending_behavior_form_and_blocks_submit ... ok
test app::context_help_tests::context_help_f1_selects_scenario_topic_without_leaving_the_workspace ... ok
test app::context_help_tests::context_help_preserves_group_property_draft_camera_and_model ... ok
test app::context_help_tests::context_help_rejects_a_reference_picker_open_queued_from_the_inspector ... ok
test app::context_help_tests::context_help_retains_source_draft_and_rejects_background_source_input ... ok
test app::context_help_tests::mounted_context_help_keyboard_scroll_preserves_inspector_focus_and_exact_caret ... ok
test app::context_help_tests::mounted_context_help_observes_modifier_release_before_plain_canvas_click ... ok
test app::context_help_tests::mounted_context_help_retires_held_pan_without_replaying_its_release ... ok
test guide::tests::filtering_and_related_navigation_keep_selection_visible ... ok
test guide::tests::guide_topic_navigation_resets_only_article_and_same_topic_search_keeps_scroll ... ok
test guide::tests::search_finds_concepts_in_walkthroughs_and_api_reference ... ok
test result: ok. 125 passed; 0 failed; 0 ignored; 0 measured; 1421 filtered out; finished in 75.83s
Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Some files were not shown because too many files have changed in this diff Show More