Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66260c0c6b | ||
|
|
613e3ca322 | ||
|
|
57b3fe4bff | ||
|
|
81faeff58a | ||
|
|
70bdcdf8fe | ||
|
|
66278ed33b | ||
|
|
a2b8204f8b | ||
|
|
2af40c7e27 |
@@ -340,18 +340,6 @@ pub(crate) fn diagnostic(source: &str, error: Error) -> Diagnostic {
|
||||
},
|
||||
}
|
||||
}
|
||||
pub(crate) fn diagnostic_with_issue(
|
||||
source: &str,
|
||||
error: Error,
|
||||
issue: Option<validation::Issue>,
|
||||
) -> Diagnostic {
|
||||
let mut result = diagnostic(source, error);
|
||||
if let Some(issue) = issue {
|
||||
result.object_id = issue.element;
|
||||
result.field = issue.field;
|
||||
}
|
||||
result
|
||||
}
|
||||
fn reserved(word: &str) -> bool {
|
||||
crate::reserved_alias(word)
|
||||
|| declaration_kind(word).is_some()
|
||||
@@ -634,7 +622,6 @@ fn parse_document(source: &str, limits: ParseLimits) -> Result<ParsedDocument, V
|
||||
if tokens.get(1).is_some_and(|t| t.text(source) == "2") {
|
||||
return v2_source::parse(source, tokens, limits);
|
||||
}
|
||||
let mut migration_issue = None;
|
||||
Parser {
|
||||
source,
|
||||
tokens,
|
||||
@@ -642,8 +629,8 @@ fn parse_document(source: &str, limits: ParseLimits) -> Result<ParsedDocument, V
|
||||
value_depth: 0,
|
||||
limits,
|
||||
}
|
||||
.document(&mut migration_issue)
|
||||
.map_err(|e| vec![diagnostic_with_issue(source, e, migration_issue)])
|
||||
.document()
|
||||
.map_err(|e| vec![diagnostic(source, e)])
|
||||
}
|
||||
fn offset_for(source: &str, line: usize, column: usize) -> usize {
|
||||
let mut offset = 0;
|
||||
@@ -1462,10 +1449,7 @@ impl Parser<'_> {
|
||||
},
|
||||
}
|
||||
}
|
||||
fn document(
|
||||
&mut self,
|
||||
migration_issue: &mut Option<validation::Issue>,
|
||||
) -> Result<ParsedDocument, Error> {
|
||||
fn document(&mut self) -> Result<ParsedDocument, Error> {
|
||||
let unit = self.unit(true, false)?;
|
||||
let header = unit.header.expect("entry header");
|
||||
let mut aliases = BTreeMap::from([(header.project.alias.clone(), header.project.id)]);
|
||||
@@ -1492,14 +1476,9 @@ impl Parser<'_> {
|
||||
.map(|(key, span)| ((d.id, key.clone()), span.start)),
|
||||
);
|
||||
}
|
||||
let decoded = resolve_declarations(
|
||||
header.project,
|
||||
&unit.declarations,
|
||||
&aliases,
|
||||
self.limits,
|
||||
migration_issue,
|
||||
)
|
||||
.map_err(|(_, error)| error)?;
|
||||
let decoded =
|
||||
resolve_declarations(header.project, &unit.declarations, &aliases, self.limits)
|
||||
.map_err(|(_, error)| error)?;
|
||||
Ok(ParsedDocument {
|
||||
project: decoded.project,
|
||||
migration: decoded.migration,
|
||||
@@ -1703,7 +1682,6 @@ pub(crate) fn resolve_declarations(
|
||||
declarations: &[Declaration],
|
||||
aliases: &BTreeMap<String, Id>,
|
||||
limits: ParseLimits,
|
||||
migration_issue: &mut Option<validation::Issue>,
|
||||
) -> Result<crate::persistence::DecodeResult, (usize, Error)> {
|
||||
let legacy = project.schema_version == 3;
|
||||
let mut legacy_elements = serde_json::Map::new();
|
||||
@@ -2011,38 +1989,6 @@ pub(crate) fn resolve_declarations(
|
||||
crate::persistence::migrate_v6(project, limits)
|
||||
})
|
||||
.map_err(|error| {
|
||||
// These frozen admission checks formerly ran in final validation.
|
||||
// Keep their diagnostic code and reference location after moving
|
||||
// them before schema normalization.
|
||||
if let crate::persistence::FileError::Model { issues, .. } = &error
|
||||
&& let Some(issue) = issues.first()
|
||||
&& let Some(code) = match issue.code.as_str() {
|
||||
"diagram_layer" => Some("diagram_layer"),
|
||||
"view_options" => Some("view_options"),
|
||||
_ => None,
|
||||
}
|
||||
{
|
||||
let index = issue
|
||||
.element
|
||||
.and_then(|id| declarations.iter().position(|d| d.id == id))
|
||||
.unwrap_or(usize::MAX);
|
||||
let offset = declarations.get(index).map_or(0, |d| {
|
||||
issue
|
||||
.field
|
||||
.as_ref()
|
||||
.and_then(|field| d.field_spans.get(field))
|
||||
.map_or(d.offset, |span| span.start)
|
||||
});
|
||||
*migration_issue = Some(issue.clone());
|
||||
return (
|
||||
index,
|
||||
Error {
|
||||
code,
|
||||
offset,
|
||||
message: issue.message.clone(),
|
||||
},
|
||||
);
|
||||
}
|
||||
(
|
||||
usize::MAX,
|
||||
Error {
|
||||
|
||||
@@ -69,8 +69,8 @@ impl Project4 {
|
||||
}
|
||||
crate::persistence::check_pre6_relations(self.relations.values())?;
|
||||
crate::persistence::check_pre6_elements(self.elements.values())?;
|
||||
let mut project = Project {
|
||||
schema_version: self.schema_version,
|
||||
Ok(Project {
|
||||
schema_version: SCHEMA_VERSION,
|
||||
id: self.id,
|
||||
alias: self.alias,
|
||||
name: self.name,
|
||||
@@ -84,11 +84,7 @@ impl Project4 {
|
||||
.into_iter()
|
||||
.map(|(id, trace)| (id, trace.into()))
|
||||
.collect(),
|
||||
};
|
||||
// Schema3's adapter also enters here, without calling `finish`.
|
||||
crate::persistence::check_pre7_diagram_admission(&project)?;
|
||||
project.schema_version = SCHEMA_VERSION;
|
||||
Ok(project)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,8 +104,6 @@ pub(crate) fn review_defaults(project: &Project, report: &mut MigrationReport) {
|
||||
}
|
||||
|
||||
pub(crate) fn finish(mut project: Project, limits: ParseLimits) -> Result<DecodeResult, FileError> {
|
||||
// Source4 enters here directly rather than through `Project4`.
|
||||
crate::persistence::check_pre7_diagram_admission(&project)?;
|
||||
crate::persistence::check_pre6_relations(project.relations.values())?;
|
||||
crate::persistence::check_pre6_elements(project.elements.values())?;
|
||||
project.schema_version = SCHEMA_VERSION;
|
||||
|
||||
@@ -341,50 +341,6 @@ pub(crate) fn check_pre6_baseline(baseline: &SemanticBaseline) -> Result<(), Fil
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
/// Frozen sources 3–6 admit opposite-layer placements and visibility references
|
||||
/// only in Traceability. Check before migration discards the advertised version;
|
||||
/// current ordinary projections may retain these records as latent presentation.
|
||||
pub(crate) fn check_pre7_diagram_admission(project: &Project) -> Result<(), FileError> {
|
||||
let mut issues = Vec::new();
|
||||
for diagram in project.diagrams.values() {
|
||||
let option_issues = if diagram.projection == ProjectionKind::Traceability {
|
||||
crate::view_options::validate_options_cross_layer(project, &diagram.view_options)
|
||||
} else {
|
||||
crate::view_options::validate_options(project, diagram.layer, &diagram.view_options)
|
||||
};
|
||||
for issue in option_issues {
|
||||
validation::error(
|
||||
&mut issues,
|
||||
diagram.id,
|
||||
"view_options",
|
||||
issue.field,
|
||||
issue.message,
|
||||
);
|
||||
}
|
||||
for node in diagram.nodes.values() {
|
||||
if !project.elements.get(&node.element).is_some_and(|element| {
|
||||
diagram.projection == ProjectionKind::Traceability
|
||||
|| element.layer() == diagram.layer
|
||||
}) {
|
||||
validation::error(
|
||||
&mut issues,
|
||||
node.id,
|
||||
"diagram_layer",
|
||||
"element",
|
||||
"Diagram nodes reference existing elements in the selected layer.",
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(issue) = issues.into_iter().next() {
|
||||
return Err(FileError::Model {
|
||||
message: issue.message.clone(),
|
||||
issues: vec![issue],
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn migrate_v5(
|
||||
mut project: Project,
|
||||
limits: crate::language::ParseLimits,
|
||||
@@ -392,7 +348,6 @@ pub(crate) fn migrate_v5(
|
||||
if project.schema_version != 5 {
|
||||
return Err(FileError::Invalid("Expected schema_version 5.".into()));
|
||||
}
|
||||
check_pre7_diagram_admission(&project)?;
|
||||
check_pre6_relations(project.relations.values())?;
|
||||
check_pre6_elements(project.elements.values())?;
|
||||
for baseline in project
|
||||
@@ -465,7 +420,6 @@ pub(crate) fn migrate_v6(
|
||||
if project.schema_version != 6 {
|
||||
return Err(FileError::Invalid("Expected schema_version 6.".into()));
|
||||
}
|
||||
check_pre7_diagram_admission(&project)?;
|
||||
reject_source7_fields(&serde_json::to_value(&project)?).map_err(FileError::Invalid)?;
|
||||
limits.check_model(&project).map_err(FileError::Limit)?;
|
||||
project.schema_version = SCHEMA_VERSION;
|
||||
|
||||
@@ -85,7 +85,6 @@ pub(crate) fn parents(p: &Project, d: &Diagram) -> BTreeMap<Id, Option<Id>> {
|
||||
.filter(|n| {
|
||||
p.elements.get(&n.element).is_some_and(|e| {
|
||||
e.kind() != Kind::Port
|
||||
&& (d.projection == ProjectionKind::Traceability || e.layer() == d.layer)
|
||||
&& d.projection.includes(e.kind())
|
||||
&& d.projection
|
||||
.state_machine()
|
||||
|
||||
+167
-11
@@ -53,6 +53,8 @@ pub struct RoutedEdge {
|
||||
pub struct EdgeLabelGeometry {
|
||||
/// Empty for edge kinds without a permanently displayed label.
|
||||
pub text: String,
|
||||
/// Dedicated State-canvas two-block presentation; raw summary stays in text.
|
||||
pub state_layout: Option<StateLabelLayout>,
|
||||
/// Effective arc-length fraction, including an automatic collision-avoidance
|
||||
/// choice. Use this when the first label drag becomes authored metadata.
|
||||
pub fraction: f32,
|
||||
@@ -61,6 +63,108 @@ pub struct EdgeLabelGeometry {
|
||||
pub bounds: RoutingBounds,
|
||||
}
|
||||
|
||||
/// Derived hard-line layout for the dedicated State projection, never persisted.
|
||||
/// Excerpts are chosen on raw text before display-only separator/tab expansion.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct StateLabelLayout {
|
||||
pub title_lines: Vec<String>,
|
||||
pub summary_lines: Vec<String>,
|
||||
size: Size,
|
||||
}
|
||||
|
||||
impl StateLabelLayout {
|
||||
pub const FONT_SIZE: f32 = 10.0;
|
||||
pub const LINE_HEIGHT: f32 = 12.0;
|
||||
pub const HORIZONTAL_PADDING: f32 = 5.0;
|
||||
pub const MIN_HEIGHT: f32 = 24.0;
|
||||
|
||||
/// `summary` is the existing raw, globally shortened routing summary.
|
||||
/// Measurement receives each final display line at FONT_SIZE, without breaks.
|
||||
/// Invalid measurements fall back to the deterministic approximate width.
|
||||
pub fn new(title: &str, summary: &str, measure: &dyn Fn(&str) -> f32) -> Self {
|
||||
let budget = (7 * summary.chars().count() + 6) / 6;
|
||||
let title = if title.chars().count() > budget {
|
||||
title
|
||||
.chars()
|
||||
.take(budget.saturating_sub(1))
|
||||
.chain(std::iter::once('…'))
|
||||
.collect()
|
||||
} else {
|
||||
title.to_owned()
|
||||
};
|
||||
let title_lines = state_display_lines(&title);
|
||||
let summary_lines = state_display_lines(summary);
|
||||
let width = title_lines
|
||||
.iter()
|
||||
.chain(&summary_lines)
|
||||
.map(|line| {
|
||||
let width = measure(line);
|
||||
if width.is_finite() && width >= 0.0 {
|
||||
width
|
||||
} else {
|
||||
approximate_state_line_width(line)
|
||||
}
|
||||
})
|
||||
.fold(0.0_f32, f32::max);
|
||||
let size = Size {
|
||||
width: width + 2.0 * Self::HORIZONTAL_PADDING,
|
||||
height: (Self::LINE_HEIGHT * (title_lines.len() + summary_lines.len()) as f32)
|
||||
.max(Self::MIN_HEIGHT),
|
||||
};
|
||||
Self {
|
||||
title_lines,
|
||||
summary_lines,
|
||||
size,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn size(&self) -> Size {
|
||||
self.size
|
||||
}
|
||||
|
||||
/// Local origin relative to EdgeLabelGeometry.bounds.position.
|
||||
pub fn title_line_position(&self, index: usize) -> Position {
|
||||
Position {
|
||||
x: Self::HORIZONTAL_PADDING,
|
||||
y: index as f32 * Self::LINE_HEIGHT,
|
||||
}
|
||||
}
|
||||
|
||||
/// Local origin relative to EdgeLabelGeometry.bounds.position.
|
||||
pub fn summary_line_position(&self, index: usize) -> Position {
|
||||
Position {
|
||||
x: Self::HORIZONTAL_PADDING,
|
||||
y: (self.title_lines.len() + index) as f32 * Self::LINE_HEIGHT,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn state_display_lines(raw: &str) -> Vec<String> {
|
||||
if raw.is_empty() {
|
||||
return Vec::new();
|
||||
}
|
||||
let mut lines = vec![String::new()];
|
||||
let mut chars = raw.chars().peekable();
|
||||
while let Some(ch) = chars.next() {
|
||||
match ch {
|
||||
'\r' => {
|
||||
if chars.peek() == Some(&'\n') {
|
||||
chars.next();
|
||||
}
|
||||
lines.push(String::new());
|
||||
}
|
||||
'\n' | '\u{85}' | '\u{2028}' | '\u{2029}' => lines.push(String::new()),
|
||||
'\t' => lines.last_mut().unwrap().push_str(" "),
|
||||
_ => lines.last_mut().unwrap().push(ch),
|
||||
}
|
||||
}
|
||||
lines
|
||||
}
|
||||
|
||||
fn approximate_state_line_width(line: &str) -> f32 {
|
||||
line.chars().count() as f32 * 7.0
|
||||
}
|
||||
|
||||
/// Derived labels and navigation markers for the two named association ends.
|
||||
/// Canvas and SVG consume these same coordinates; no extra diagram state exists.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
@@ -161,6 +265,7 @@ pub fn association_end_geometry(
|
||||
source_end,
|
||||
label: EdgeLabelGeometry {
|
||||
text,
|
||||
state_layout: None,
|
||||
fraction: if source_end { 0.0 } else { 1.0 },
|
||||
anchor: tip,
|
||||
center,
|
||||
@@ -436,7 +541,24 @@ fn ancestors(id: Id, nodes: &BTreeMap<Id, &ProjectedNode>, out: &mut BTreeSet<Id
|
||||
/// Search caps are presentation limits, reported on the affected edge, never
|
||||
/// semantic errors or a reason to discard an authored point.
|
||||
pub fn route_diagram(project: &Project, diagram: &Diagram, view: &ProjectedView) -> RoutedView {
|
||||
route_diagram_impl(project, diagram, view, None)
|
||||
route_diagram_with_state_label_measurement(
|
||||
project,
|
||||
diagram,
|
||||
view,
|
||||
&approximate_state_line_width,
|
||||
)
|
||||
}
|
||||
|
||||
/// Route with frontend line measurements for dedicated State labels before collision placement.
|
||||
/// The legacy entrypoint uses a deterministic 7-units-per-scalar approximation,
|
||||
/// not a promise of shaped glyph containment. All other label kinds are unchanged.
|
||||
pub fn route_diagram_with_state_label_measurement(
|
||||
project: &Project,
|
||||
diagram: &Diagram,
|
||||
view: &ProjectedView,
|
||||
measure: &dyn Fn(&str) -> f32,
|
||||
) -> RoutedView {
|
||||
route_diagram_impl(project, diagram, view, None, measure)
|
||||
}
|
||||
|
||||
/// Transient route/label editing with unchanged projected nodes and ports.
|
||||
@@ -451,7 +573,26 @@ pub fn route_edge_preview(
|
||||
baseline: &RoutedView,
|
||||
edge: Id,
|
||||
) -> RoutedView {
|
||||
route_diagram_impl(project, diagram, view, Some((baseline, edge)))
|
||||
route_edge_preview_with_state_label_measurement(
|
||||
project,
|
||||
diagram,
|
||||
view,
|
||||
baseline,
|
||||
edge,
|
||||
&approximate_state_line_width,
|
||||
)
|
||||
}
|
||||
|
||||
/// Preview counterpart using the same State text measurer as the settled scene.
|
||||
pub fn route_edge_preview_with_state_label_measurement(
|
||||
project: &Project,
|
||||
diagram: &Diagram,
|
||||
view: &ProjectedView,
|
||||
baseline: &RoutedView,
|
||||
edge: Id,
|
||||
measure: &dyn Fn(&str) -> f32,
|
||||
) -> RoutedView {
|
||||
route_diagram_impl(project, diagram, view, Some((baseline, edge)), measure)
|
||||
}
|
||||
|
||||
fn route_diagram_impl(
|
||||
@@ -459,6 +600,7 @@ fn route_diagram_impl(
|
||||
diagram: &Diagram,
|
||||
view: &ProjectedView,
|
||||
preview: Option<(&RoutedView, Id)>,
|
||||
measure: &dyn Fn(&str) -> f32,
|
||||
) -> RoutedView {
|
||||
let nodes: BTreeMap<_, _> = view.nodes.iter().map(|n| (n.id, n)).collect();
|
||||
let rectangles: Vec<_> = nodes.values().map(|n| Rect::node(n)).collect();
|
||||
@@ -639,13 +781,14 @@ fn route_diagram_impl(
|
||||
.flatten();
|
||||
routed.label = make_label(
|
||||
project,
|
||||
diagram.view_options.exchange_labels,
|
||||
diagram,
|
||||
edge.id,
|
||||
&routed.points,
|
||||
authored_label,
|
||||
&obstacles,
|
||||
&previous_labels,
|
||||
&previous,
|
||||
measure,
|
||||
);
|
||||
}
|
||||
if !routed.label.text.is_empty() {
|
||||
@@ -1345,6 +1488,7 @@ fn label_text(project: &Project, edge: Id) -> String {
|
||||
fn empty_label() -> EdgeLabelGeometry {
|
||||
EdgeLabelGeometry {
|
||||
text: String::new(),
|
||||
state_layout: None,
|
||||
fraction: 0.5,
|
||||
anchor: pos(0.0, 0.0),
|
||||
center: pos(0.0, 0.0),
|
||||
@@ -1362,14 +1506,16 @@ fn empty_label() -> EdgeLabelGeometry {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn make_label(
|
||||
project: &Project,
|
||||
labels: crate::view_options::ExchangeLabels,
|
||||
diagram: &Diagram,
|
||||
edge: Id,
|
||||
points: &[Position],
|
||||
authored: Option<&crate::EdgeLabel>,
|
||||
obstacles: &[Rect],
|
||||
previous_labels: &[RoutingBounds],
|
||||
strokes: &[Segment],
|
||||
measure: &dyn Fn(&str) -> f32,
|
||||
) -> EdgeLabelGeometry {
|
||||
let labels = diagram.view_options.exchange_labels;
|
||||
let text = if labels != crate::view_options::ExchangeLabels::Name
|
||||
&& project
|
||||
.relations
|
||||
@@ -1385,14 +1531,23 @@ fn make_label(
|
||||
} else {
|
||||
label_text(project, edge)
|
||||
};
|
||||
let size = Size {
|
||||
width: if text.is_empty() {
|
||||
0.0
|
||||
} else {
|
||||
text.chars().count() as f32 * 7.0 + 16.0
|
||||
let state_layout = (diagram.projection.state_machine().is_some()
|
||||
&& project
|
||||
.relations
|
||||
.get(&edge)
|
||||
.is_some_and(|r| r.kind() == RelationKind::StateTransition))
|
||||
.then(|| StateLabelLayout::new(project.named(edge), &text, measure));
|
||||
let size = state_layout.as_ref().map_or_else(
|
||||
|| Size {
|
||||
width: if text.is_empty() {
|
||||
0.0
|
||||
} else {
|
||||
text.chars().count() as f32 * 7.0 + 16.0
|
||||
},
|
||||
height: if text.is_empty() { 0.0 } else { 24.0 },
|
||||
},
|
||||
height: if text.is_empty() { 0.0 } else { 24.0 },
|
||||
};
|
||||
StateLabelLayout::size,
|
||||
);
|
||||
let mut offset = authored.map_or(pos(0.0, -18.0), |l| l.offset);
|
||||
let geometry = |fraction, offset: Position| {
|
||||
let anchor = point_along_polyline(points, fraction).unwrap_or(pos(0.0, 0.0));
|
||||
@@ -1474,6 +1629,7 @@ fn make_label(
|
||||
let (anchor, center, bounds) = geometry(fraction, offset);
|
||||
EdgeLabelGeometry {
|
||||
text,
|
||||
state_layout,
|
||||
fraction,
|
||||
anchor,
|
||||
center,
|
||||
|
||||
@@ -589,17 +589,6 @@ fn apply_command(
|
||||
.map(|d| d.id)
|
||||
.ok_or_else(missing)?;
|
||||
if source != *diagram {
|
||||
let destination = &p.diagrams[diagram];
|
||||
let element = p.diagrams[&source].nodes[node].element;
|
||||
if destination.projection != ProjectionKind::Traceability
|
||||
&& p.elements
|
||||
.get(&element)
|
||||
.is_none_or(|e| e.layer() != destination.layer)
|
||||
{
|
||||
return Err(ModelError(
|
||||
"Move the placement to a view in its layer or a traceability view.".into(),
|
||||
));
|
||||
}
|
||||
let placement = p
|
||||
.diagrams
|
||||
.get_mut(&source)
|
||||
|
||||
@@ -573,26 +573,16 @@ fn compile_once(
|
||||
span,
|
||||
}),
|
||||
};
|
||||
let mut migration_issue = None;
|
||||
let decoded = language::resolve_declarations(
|
||||
header.project,
|
||||
&declarations,
|
||||
&aliases,
|
||||
limits.model,
|
||||
&mut migration_issue,
|
||||
)
|
||||
.map_err(|(index, error)| {
|
||||
let path = declaration_paths.get(index).unwrap_or(&bundle.entry);
|
||||
vec![SourceDiagnostic {
|
||||
path: path.clone(),
|
||||
diagnostic: language::diagnostic_with_issue(
|
||||
&bundle.files[path],
|
||||
error,
|
||||
migration_issue,
|
||||
),
|
||||
related: Vec::new(),
|
||||
}]
|
||||
})?;
|
||||
let decoded =
|
||||
language::resolve_declarations(header.project, &declarations, &aliases, limits.model)
|
||||
.map_err(|(index, error)| {
|
||||
let path = declaration_paths.get(index).unwrap_or(&bundle.entry);
|
||||
vec![SourceDiagnostic {
|
||||
path: path.clone(),
|
||||
diagnostic: language::diagnostic(&bundle.files[path], error),
|
||||
related: Vec::new(),
|
||||
}]
|
||||
})?;
|
||||
let diagnostics = model_diagnostics(bundle, &index, &decoded.project);
|
||||
let errors: Vec<_> = diagnostics
|
||||
.iter()
|
||||
|
||||
@@ -620,14 +620,11 @@ pub fn validate(p: &Project) -> Vec<Issue> {
|
||||
text(&mut out, d.id, "name", &d.name);
|
||||
text(&mut out, d.id, "description", &d.description);
|
||||
crate::scenario_layout::validate_diagram(p, d, &mut out);
|
||||
// Ordinary projections are reversible filters over the same authored view.
|
||||
// Retain opposite-layer visibility choices when leaving Traceability.
|
||||
let option_issues =
|
||||
if d.projection.state_machine().is_none() && d.projection.scenario().is_none() {
|
||||
crate::view_options::validate_options_cross_layer(p, &d.view_options)
|
||||
} else {
|
||||
crate::view_options::validate_options(p, d.layer, &d.view_options)
|
||||
};
|
||||
let option_issues = if d.projection == ProjectionKind::Traceability {
|
||||
crate::view_options::validate_options_cross_layer(p, &d.view_options)
|
||||
} else {
|
||||
crate::view_options::validate_options(p, d.layer, &d.view_options)
|
||||
};
|
||||
for issue in option_issues {
|
||||
error(&mut out, d.id, "view_options", issue.field, issue.message);
|
||||
}
|
||||
@@ -801,10 +798,8 @@ pub fn validate(p: &Project) -> Vec<Issue> {
|
||||
);
|
||||
}
|
||||
match p.elements.get(&n.element) {
|
||||
Some(e)
|
||||
if (d.projection.state_machine().is_none()
|
||||
&& d.projection.scenario().is_none())
|
||||
|| e.layer() == d.layer => {}
|
||||
Some(e) if d.projection == ProjectionKind::Traceability || e.layer() == d.layer => {
|
||||
}
|
||||
_ => error(
|
||||
&mut out,
|
||||
n.id,
|
||||
|
||||
@@ -218,9 +218,7 @@ pub fn validate_options(p: &Project, layer: Layer, options: &ViewOptions) -> Vec
|
||||
validate_options_in(p, Some(layer), options)
|
||||
}
|
||||
|
||||
/// Ordinary saved views retain references from either architecture layer so
|
||||
/// projection changes preserve authored visibility choices. Projection decides
|
||||
/// which layer is visible; typed State/Scenario views use layer-scoped validation.
|
||||
/// Traceability views admit references from either architecture layer.
|
||||
pub fn validate_options_cross_layer(p: &Project, options: &ViewOptions) -> Vec<OptionError> {
|
||||
validate_options_in(p, None, options)
|
||||
}
|
||||
|
||||
@@ -1,205 +0,0 @@
|
||||
//! Current latent presentation must not broaden frozen source/JSON admission.
|
||||
use oa_core::{view_options::*, *};
|
||||
|
||||
fn legacy_json(project: &Project, version: u32) -> Vec<u8> {
|
||||
let mut value = serde_json::to_value(project).unwrap();
|
||||
value["schema_version"] = version.into();
|
||||
for diagram in value["diagrams"].as_object_mut().unwrap().values_mut() {
|
||||
let fields = diagram.as_object_mut().unwrap();
|
||||
fields.remove("layout");
|
||||
if version < 6 {
|
||||
fields.remove("view_options");
|
||||
}
|
||||
}
|
||||
serde_json::to_vec(&value).unwrap()
|
||||
}
|
||||
|
||||
fn model_issue(error: persistence::FileError) -> validation::Issue {
|
||||
match error {
|
||||
persistence::FileError::Model { mut issues, .. } => issues.remove(0),
|
||||
other => panic!("Expected a located model issue, got {other:?}"),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn frozen_3_through_6_reject_cross_layer_nodes_but_keep_mixed_traceability() {
|
||||
let node_id = Id::parse_str("00000000-0000-4000-8000-000000000004").unwrap();
|
||||
for version in 3..=6 {
|
||||
let source = format!(
|
||||
"arcadia {version}; project compat \"Compatibility\" id \"00000000-0000-4000-8000-000000000001\" {{\n\
|
||||
sa_function work \"Counterpart\" id \"00000000-0000-4000-8000-000000000002\" {{}}\n\
|
||||
diagram view \"OA concern\" id \"00000000-0000-4000-8000-000000000003\" {{ layer Oa; projection Traceability; }}\n\
|
||||
node occurrence id \"00000000-0000-4000-8000-000000000004\" {{ diagram @view; element @work; }}\n}}"
|
||||
);
|
||||
let mixed = language::parse(&source).unwrap();
|
||||
assert_eq!(
|
||||
persistence::decode(&legacy_json(&mixed, version)).unwrap(),
|
||||
mixed
|
||||
);
|
||||
|
||||
let ordinary = source.replace("projection Traceability", "projection Overview");
|
||||
let same_layer = ordinary.replace("layer Oa", "layer Sa");
|
||||
let ordinary_project = language::parse(&same_layer).unwrap();
|
||||
assert_eq!(
|
||||
persistence::decode(&legacy_json(&ordinary_project, version)).unwrap(),
|
||||
ordinary_project
|
||||
);
|
||||
let errors = language::parse(&ordinary).unwrap_err();
|
||||
// Source3 already reported migration errors with the offending location.
|
||||
let code = if version == 3 {
|
||||
"migration_error"
|
||||
} else {
|
||||
"diagram_layer"
|
||||
};
|
||||
assert!(
|
||||
errors.iter().any(|error| error.code == code
|
||||
&& error.line == 4
|
||||
&& error.message.contains("selected layer")),
|
||||
"{version}: {errors:?}"
|
||||
);
|
||||
|
||||
let mut latent = mixed.clone();
|
||||
let diagram = latent.diagrams.values_mut().next().unwrap();
|
||||
diagram.projection = ProjectionKind::Overview;
|
||||
let node = diagram.nodes.values().next().unwrap().id;
|
||||
assert_eq!(node, node_id);
|
||||
if version >= 4 {
|
||||
let diagnostic = errors
|
||||
.iter()
|
||||
.find(|error| error.code == "diagram_layer")
|
||||
.unwrap();
|
||||
assert_eq!(diagnostic.object_id, Some(node_id));
|
||||
assert_eq!(diagnostic.field.as_deref(), Some("element"));
|
||||
let bundle = source_project::SourceBundle {
|
||||
entry: "model.arcadia".into(),
|
||||
files: std::collections::BTreeMap::from([("model.arcadia".into(), ordinary)]),
|
||||
};
|
||||
let errors =
|
||||
source_project::compile_bundle(&bundle, source_project::ProjectLimits::default())
|
||||
.unwrap_err();
|
||||
let diagnostic = &errors
|
||||
.iter()
|
||||
.find(|error| error.diagnostic.code == "diagram_layer")
|
||||
.unwrap()
|
||||
.diagnostic;
|
||||
assert_eq!(diagnostic.object_id, Some(node_id));
|
||||
assert_eq!(diagnostic.field.as_deref(), Some("element"));
|
||||
}
|
||||
let issue = model_issue(persistence::decode(&legacy_json(&latent, version)).unwrap_err());
|
||||
assert_eq!(issue.code, "diagram_layer");
|
||||
assert_eq!(issue.element, Some(node));
|
||||
assert_eq!(issue.field.as_deref(), Some("element"));
|
||||
// The exact same record is valid under the current presentation contract.
|
||||
assert_eq!(language::parse(&language::format(&latent)).unwrap(), latent);
|
||||
assert_eq!(
|
||||
persistence::decode(&serde_json::to_vec(&latent).unwrap()).unwrap(),
|
||||
latent
|
||||
);
|
||||
let mut dangling = mixed;
|
||||
dangling
|
||||
.diagrams
|
||||
.values_mut()
|
||||
.next()
|
||||
.unwrap()
|
||||
.nodes
|
||||
.values_mut()
|
||||
.next()
|
||||
.unwrap()
|
||||
.element = Id::parse_str("00000000-0000-4000-8000-000000000005").unwrap();
|
||||
let issue = model_issue(persistence::decode(&legacy_json(&dangling, version)).unwrap_err());
|
||||
assert_eq!(issue.code, "diagram_layer");
|
||||
assert_eq!(issue.element, Some(node));
|
||||
assert_eq!(issue.field.as_deref(), Some("element"));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn frozen_6_checks_every_layer_sensitive_saved_selector_before_upgrade() {
|
||||
let mut project = Project::empty();
|
||||
let a = project
|
||||
.add_element(Kind::Activity, Layer::Oa, "A", None)
|
||||
.unwrap();
|
||||
let b = project
|
||||
.add_element(Kind::Activity, Layer::Oa, "B", None)
|
||||
.unwrap();
|
||||
let edge = project.relate(RelationKind::Interaction, "Interaction", a, b);
|
||||
let category = project
|
||||
.add_element(Kind::ExchangeCategory, Layer::Oa, "Work category", None)
|
||||
.unwrap();
|
||||
let participant_category = project
|
||||
.add_element(
|
||||
Kind::ExchangeCategory,
|
||||
Layer::Oa,
|
||||
"Participant category",
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
*project
|
||||
.elements
|
||||
.get_mut(&participant_category)
|
||||
.unwrap()
|
||||
.shared_mut()
|
||||
.unwrap() = SharedBody::ExchangeCategory {
|
||||
family: ExchangeFamily::Participant,
|
||||
exchanges: vec![],
|
||||
};
|
||||
let context = project
|
||||
.add_element(Kind::Process, Layer::Oa, "Process", None)
|
||||
.unwrap();
|
||||
let diagram = project.ensure_diagram(Layer::Sa);
|
||||
for (field, options) in [
|
||||
(
|
||||
"hidden_edges",
|
||||
ViewOptions {
|
||||
hidden_edges: vec![edge],
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
(
|
||||
"work_categories",
|
||||
ViewOptions {
|
||||
work_categories: CategorySelection::Any(vec![category]),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
(
|
||||
"participant_categories",
|
||||
ViewOptions {
|
||||
participant_categories: CategorySelection::Any(vec![participant_category]),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
(
|
||||
"work_contexts",
|
||||
ViewOptions {
|
||||
work_contexts: ContextSelection::Any(vec![context]),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
] {
|
||||
project.diagrams.get_mut(&diagram).unwrap().view_options = options;
|
||||
let issue = model_issue(persistence::decode(&legacy_json(&project, 6)).unwrap_err());
|
||||
assert_eq!(issue.code, "view_options");
|
||||
assert_eq!(issue.element, Some(diagram));
|
||||
assert_eq!(issue.field.as_deref(), Some(field));
|
||||
let current_source = language::format(&project);
|
||||
assert_eq!(language::parse(¤t_source).unwrap(), project);
|
||||
let source6 = current_source.replacen("arcadia 7;", "arcadia 6;", 1);
|
||||
let errors = language::parse(&source6).unwrap_err();
|
||||
let diagnostic = errors
|
||||
.iter()
|
||||
.find(|error| error.code == "view_options")
|
||||
.unwrap();
|
||||
assert_eq!(diagnostic.object_id, Some(diagram));
|
||||
assert_eq!(diagnostic.field.as_deref(), Some(field));
|
||||
|
||||
project.diagrams.get_mut(&diagram).unwrap().projection = ProjectionKind::Traceability;
|
||||
assert_eq!(
|
||||
persistence::decode(&legacy_json(&project, 6)).unwrap(),
|
||||
project
|
||||
);
|
||||
let source6 = language::format(&project).replacen("arcadia 7;", "arcadia 6;", 1);
|
||||
assert_eq!(language::parse(&source6).unwrap(), project);
|
||||
project.diagrams.get_mut(&diagram).unwrap().projection = ProjectionKind::Overview;
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
use oa_core::{source_project::*, view_options::*, *};
|
||||
|
||||
fn fixture(layer: Layer) -> (Project, Id, Id, Id, Id) {
|
||||
let mut p = Project::empty();
|
||||
let oa = p
|
||||
.add_element(Kind::Activity, Layer::Oa, "Assess alarm", None)
|
||||
.unwrap();
|
||||
let oa2 = p
|
||||
.add_element(Kind::Activity, Layer::Oa, "Respond", None)
|
||||
.unwrap();
|
||||
let sa = p
|
||||
.add_element(Kind::Function, Layer::Sa, "Assess alarm", None)
|
||||
.unwrap();
|
||||
let edge = p.relate(RelationKind::Interaction, "Alarm", oa, oa2);
|
||||
let category = p
|
||||
.add_element(Kind::ExchangeCategory, Layer::Oa, "Alarm data", None)
|
||||
.unwrap();
|
||||
*p.elements.get_mut(&category).unwrap().shared_mut().unwrap() = SharedBody::ExchangeCategory {
|
||||
family: ExchangeFamily::Work,
|
||||
exchanges: vec![edge],
|
||||
};
|
||||
let context = p
|
||||
.add_element(Kind::Process, Layer::Oa, "Alarm handling", None)
|
||||
.unwrap();
|
||||
let d = p.ensure_diagram(layer);
|
||||
p.diagrams.get_mut(&d).unwrap().projection = ProjectionKind::Traceability;
|
||||
for (i, element) in [oa, oa2, sa].into_iter().enumerate() {
|
||||
p.place(
|
||||
d,
|
||||
element,
|
||||
Position {
|
||||
x: 300. * i as f32,
|
||||
y: 40.,
|
||||
},
|
||||
);
|
||||
}
|
||||
p.diagrams.get_mut(&d).unwrap().view_options = ViewOptions {
|
||||
hidden_edges: vec![edge],
|
||||
work_categories: CategorySelection::Any(vec![category]),
|
||||
work_contexts: ContextSelection::Any(vec![context]),
|
||||
..Default::default()
|
||||
};
|
||||
validate_candidate(&p).unwrap();
|
||||
(p, d, oa, sa, category)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn projection_switching_preserves_complete_model_history_and_all_serializations() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
let (baseline, diagram, _, _, _) = fixture(layer);
|
||||
for projection in [
|
||||
ProjectionKind::Overview,
|
||||
ProjectionKind::Decomposition,
|
||||
ProjectionKind::Allocation,
|
||||
ProjectionKind::FunctionalDataflow,
|
||||
ProjectionKind::Capabilities,
|
||||
] {
|
||||
let mut expected = baseline.clone();
|
||||
expected.diagrams.get_mut(&diagram).unwrap().projection = projection;
|
||||
let mut session = Session::new(baseline.clone());
|
||||
session
|
||||
.execute(Command::EditDiagram(
|
||||
diagram,
|
||||
expected.diagrams[&diagram].clone(),
|
||||
))
|
||||
.unwrap();
|
||||
assert_eq!(session.project(), &expected);
|
||||
let view = projection::project_view(session.project(), diagram);
|
||||
assert!(
|
||||
view.nodes
|
||||
.iter()
|
||||
.all(|n| expected.elements[&n.element].layer() == layer)
|
||||
);
|
||||
assert_eq!(
|
||||
view,
|
||||
projection::project_view_with_index(&expected, diagram, &ViewIndex::new(&expected))
|
||||
);
|
||||
let source = language::format(&expected);
|
||||
assert_eq!(language::parse(&source).unwrap(), expected);
|
||||
assert_eq!(
|
||||
persistence::decode(&serde_json::to_vec(&expected).unwrap()).unwrap(),
|
||||
expected
|
||||
);
|
||||
let bundle = format_bundle(&expected);
|
||||
assert_eq!(
|
||||
compile_bundle(&bundle, ProjectLimits::default())
|
||||
.unwrap()
|
||||
.decoded
|
||||
.project,
|
||||
expected
|
||||
);
|
||||
session.undo();
|
||||
assert_eq!(session.project(), &baseline);
|
||||
assert!(!session.can_undo());
|
||||
session.redo();
|
||||
assert_eq!(session.project(), &expected);
|
||||
session
|
||||
.execute(Command::EditDiagram(
|
||||
diagram,
|
||||
baseline.diagrams[&diagram].clone(),
|
||||
))
|
||||
.unwrap();
|
||||
assert_eq!(session.project(), &baseline);
|
||||
assert_eq!(
|
||||
projection::project_view(session.project(), diagram),
|
||||
projection::project_view(&baseline, diagram)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn projection_switching_does_not_admit_missing_elements_or_invalid_filter_kinds() {
|
||||
let (mut p, d, oa, _, category) = fixture(Layer::Sa);
|
||||
p.diagrams.get_mut(&d).unwrap().projection = ProjectionKind::Allocation;
|
||||
validate_candidate(&p).unwrap();
|
||||
let valid = p.clone();
|
||||
let node = p.diagrams[&d]
|
||||
.nodes
|
||||
.values()
|
||||
.find(|n| n.element == oa)
|
||||
.unwrap()
|
||||
.id;
|
||||
p.diagrams
|
||||
.get_mut(&d)
|
||||
.unwrap()
|
||||
.nodes
|
||||
.get_mut(&node)
|
||||
.unwrap()
|
||||
.element = Id::new_v4();
|
||||
assert!(validate_candidate(&p).is_err());
|
||||
p = valid.clone();
|
||||
p.diagrams.get_mut(&d).unwrap().view_options.work_categories = CategorySelection::Any(vec![oa]);
|
||||
assert!(validate_candidate(&p).is_err());
|
||||
p = valid;
|
||||
p.elements.remove(&category);
|
||||
assert!(validate_candidate(&p).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn projection_switching_keeps_typed_state_membership_strict() {
|
||||
let (mut p, d, _, _, _) = fixture(Layer::Sa);
|
||||
let system = p
|
||||
.add_element(Kind::System, Layer::Sa, "System", None)
|
||||
.unwrap();
|
||||
let machine = p
|
||||
.add_element(Kind::StateMachine, Layer::Sa, "Modes", Some(system))
|
||||
.unwrap();
|
||||
p.diagrams.get_mut(&d).unwrap().projection = ProjectionKind::StateMachine { machine };
|
||||
assert!(
|
||||
validation::validate(&p)
|
||||
.iter()
|
||||
.any(|i| i.code == "state_diagram_member")
|
||||
);
|
||||
assert!(validate_candidate(&p).is_err());
|
||||
}
|
||||
@@ -67,18 +67,7 @@ fn source6_traceability_default_keeps_both_layers_and_indexed_projection_matches
|
||||
.any(|e| e.id == interaction)
|
||||
);
|
||||
p.diagrams.get_mut(&d).unwrap().projection = ProjectionKind::Overview;
|
||||
validate_candidate(&p).unwrap();
|
||||
let ordinary = projection::project_view_with_index(&p, d, &index);
|
||||
assert!(
|
||||
ordinary
|
||||
.nodes
|
||||
.iter()
|
||||
.all(|n| p.elements[&n.element].layer() == Layer::Oa)
|
||||
);
|
||||
assert!(ordinary.edges.iter().any(|e| e.id == interaction));
|
||||
assert!(!ordinary.edges.iter().any(|e| e.id == fe));
|
||||
assert_eq!(p.diagrams[&d].nodes.len(), 4);
|
||||
assert_eq!(p.diagrams[&d].view_options.hidden_edges, vec![fe]);
|
||||
assert!(validate_candidate(&p).is_err());
|
||||
p.diagrams.get_mut(&d).unwrap().projection = ProjectionKind::Traceability;
|
||||
p.diagrams.get_mut(&d).unwrap().view_options.relation_kinds = RelationKinds::Only(vec![]);
|
||||
assert!(
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
use oa_core::{projection::project_diagram, routing::*, *};
|
||||
|
||||
fn fixture() -> (Project, Id, Id) {
|
||||
let mut project = language::parse(include_str!(
|
||||
"../../../harness/experiments/edge-attachments-20260922/native-fixture.arcadia"
|
||||
))
|
||||
.unwrap();
|
||||
let edge = Id::parse_str("ea202922-0033-4000-8000-000000000041").unwrap();
|
||||
let diagram = Id::parse_str("ea202922-0033-4000-8000-000000000200").unwrap();
|
||||
let relation = project.relations.get_mut(&edge).unwrap();
|
||||
relation.name = "Ready\nfor review".into();
|
||||
if let RelationBody::StateTransition { guard, .. } = &mut relation.body {
|
||||
*guard = "request_ready".into();
|
||||
}
|
||||
(project, diagram, edge)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_two_block_layout_separates_lines_and_keeps_authored_geometry_and_project() {
|
||||
let (project, diagram, edge) = fixture();
|
||||
let before = project.clone();
|
||||
let diagram = &project.diagrams[&diagram];
|
||||
let view = project_diagram(&project, diagram);
|
||||
let routed = route_diagram(&project, diagram, &view);
|
||||
let edge_geometry = &routed.edges[&edge];
|
||||
let label = &edge_geometry.label;
|
||||
let layout = label.state_layout.as_ref().unwrap();
|
||||
assert_eq!(layout.title_lines, ["Ready", "for review"]);
|
||||
assert_eq!(
|
||||
layout.summary_lines,
|
||||
["External · Completion [request_ready]"]
|
||||
);
|
||||
assert_eq!(label.text, "External · Completion [request_ready]");
|
||||
assert_eq!(layout.title_line_position(1), Position { x: 5., y: 12. });
|
||||
assert_eq!(layout.summary_line_position(0), Position { x: 5., y: 24. });
|
||||
assert_eq!(
|
||||
label.bounds.size,
|
||||
Size {
|
||||
width: 269.,
|
||||
height: 36.
|
||||
}
|
||||
);
|
||||
let authored = diagram
|
||||
.routes
|
||||
.iter()
|
||||
.find(|r| r.edge == edge)
|
||||
.unwrap()
|
||||
.label
|
||||
.as_ref()
|
||||
.unwrap();
|
||||
assert_eq!(label.fraction, authored.fraction);
|
||||
let anchor = point_along_polyline(&edge_geometry.points, authored.fraction).unwrap();
|
||||
assert_eq!(label.anchor, anchor);
|
||||
assert_eq!(
|
||||
label.center,
|
||||
Position {
|
||||
x: anchor.x + authored.offset.x,
|
||||
y: anchor.y + authored.offset.y
|
||||
}
|
||||
);
|
||||
assert_eq!(project, before);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_display_breaks_tabs_and_blank_lines_are_single_sourced() {
|
||||
let summary = "A sufficiently long unchanged summary";
|
||||
for title in [
|
||||
"Ready\nfor review",
|
||||
"Ready\r\nfor review",
|
||||
"Ready\rfor review",
|
||||
"Ready\u{85}for review",
|
||||
"Ready\u{2028}for review",
|
||||
"Ready\u{2029}for review",
|
||||
] {
|
||||
let layout = StateLabelLayout::new(title, summary, &|s| s.chars().count() as f32);
|
||||
assert_eq!(layout.title_lines, ["Ready", "for review"]);
|
||||
assert_eq!(layout.summary_line_position(0).y, 24.);
|
||||
}
|
||||
let layout = StateLabelLayout::new("Ready\n\nfor\treview\n", summary, &|s| {
|
||||
s.chars().count() as f32
|
||||
});
|
||||
assert_eq!(layout.title_lines, ["Ready", "", "for review", ""]);
|
||||
assert_eq!(layout.summary_line_position(0).y, 48.);
|
||||
assert_eq!(layout.size().height, 60.);
|
||||
let empty = StateLabelLayout::new("", "", &|_| 0.);
|
||||
assert!(empty.title_lines.is_empty() && empty.summary_lines.is_empty());
|
||||
assert_eq!(empty.size().height, 24.);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_summary_raw_prefix_and_title_budget_survive_display_normalization() {
|
||||
let (mut project, diagram, edge) = fixture();
|
||||
let relation = project.relations.get_mut(&edge).unwrap();
|
||||
relation.name = "T".repeat(80);
|
||||
if let RelationBody::StateTransition { guard, .. } = &mut relation.body {
|
||||
*guard = format!("first\r\n{}", "guard".repeat(20));
|
||||
}
|
||||
let full = state_transition_summary(&project, &project.relations[&edge]);
|
||||
let raw: String = full.chars().take(47).chain(std::iter::once('…')).collect();
|
||||
let d = &project.diagrams[&diagram];
|
||||
let routed = route_diagram(&project, d, &project_diagram(&project, d));
|
||||
let label = &routed.edges[&edge].label;
|
||||
assert_eq!(label.text, raw);
|
||||
assert!(label.text.contains("\r\n"));
|
||||
let layout = label.state_layout.as_ref().unwrap();
|
||||
assert_eq!(layout.title_lines, [format!("{}…", "T".repeat(56))]);
|
||||
assert_eq!(
|
||||
layout.summary_lines,
|
||||
raw.replace("\r\n", "\n")
|
||||
.split('\n')
|
||||
.map(str::to_owned)
|
||||
.collect::<Vec<_>>()
|
||||
);
|
||||
assert_eq!(label.text.chars().count(), 48);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn supplied_measurement_controls_settled_and_preview_state_bounds_only() {
|
||||
let (project, diagram, edge) = fixture();
|
||||
let d = &project.diagrams[&diagram];
|
||||
let view = project_diagram(&project, d);
|
||||
let baseline = route_diagram(&project, d, &view);
|
||||
let wide = |_: &str| 400.;
|
||||
let measured = route_diagram_with_state_label_measurement(&project, d, &view, &wide);
|
||||
let label = &measured.edges[&edge].label;
|
||||
assert_eq!(
|
||||
label.bounds.size,
|
||||
Size {
|
||||
width: 410.,
|
||||
height: 36.
|
||||
}
|
||||
);
|
||||
assert_eq!(label.center, baseline.edges[&edge].label.center);
|
||||
assert_eq!(measured.edges[&edge].points, baseline.edges[&edge].points);
|
||||
let preview =
|
||||
route_edge_preview_with_state_label_measurement(&project, d, &view, &measured, edge, &wide);
|
||||
assert_eq!(preview.edges[&edge].label, *label);
|
||||
let mut ordinary = d.clone();
|
||||
ordinary.projection = ProjectionKind::Allocation;
|
||||
let ordinary_measured =
|
||||
route_diagram_with_state_label_measurement(&project, &ordinary, &view, &wide);
|
||||
let ordinary_default = route_diagram(&project, &ordinary, &view);
|
||||
assert!(ordinary_measured.edges[&edge].label.state_layout.is_none());
|
||||
assert_eq!(ordinary_measured, ordinary_default);
|
||||
}
|
||||
@@ -4,8 +4,6 @@ pub(crate) mod architecture_authoring;
|
||||
mod architecture_authoring_tests;
|
||||
#[cfg(test)]
|
||||
mod behavior_removal_tests;
|
||||
#[cfg(test)]
|
||||
mod canvas_selection_tests;
|
||||
mod checkpoints;
|
||||
#[cfg(test)]
|
||||
mod diagram_focus_tests;
|
||||
@@ -383,7 +381,6 @@ pub enum Message {
|
||||
Behavior(crate::behavior::Event),
|
||||
Layer(Layer),
|
||||
Select(Id),
|
||||
CanvasSelect(crate::route_edit::Context, Id),
|
||||
EditProperties(Id),
|
||||
SelectNode(Id),
|
||||
DiagramSelection(multiselect::Event),
|
||||
@@ -1174,13 +1171,7 @@ impl App {
|
||||
if id != self.selected {
|
||||
self.selected_attachment = None;
|
||||
}
|
||||
if self.selected == id
|
||||
&& !process_preview
|
||||
&& self
|
||||
.project()
|
||||
.layer_of(id)
|
||||
.is_none_or(|layer| layer == self.layer)
|
||||
{
|
||||
if self.selected == id && !process_preview {
|
||||
return;
|
||||
}
|
||||
if !self.apply() {
|
||||
@@ -1226,24 +1217,6 @@ impl App {
|
||||
}
|
||||
self.refresh_draft();
|
||||
}
|
||||
/// Inspect an already validated canvas target without following its model layer.
|
||||
fn inspect_canvas_target(&mut self, id: Id) -> bool {
|
||||
if self.selected == id {
|
||||
return true;
|
||||
}
|
||||
if !self.project().contains(id) || !self.apply() {
|
||||
return false;
|
||||
}
|
||||
if !self.project().contains(id) {
|
||||
return false;
|
||||
}
|
||||
self.selected = id;
|
||||
self.selected_node = None;
|
||||
self.selected_attachment = None;
|
||||
self.selected_bend = None;
|
||||
self.refresh_draft();
|
||||
true
|
||||
}
|
||||
fn reveal_explorer_selection(&mut self) {
|
||||
if let Some(group) = self.explorer_index.group(self.selected) {
|
||||
self.explorer_groups_collapsed.remove(&group);
|
||||
@@ -1390,11 +1363,6 @@ impl App {
|
||||
{
|
||||
return Task::none();
|
||||
}
|
||||
if let Message::CanvasSelect(captured, _) = &message
|
||||
&& (self.page != Page::Diagram || self.route_context() != Some(*captured))
|
||||
{
|
||||
return Task::none();
|
||||
}
|
||||
// Selection can change without advancing the captured canvas context.
|
||||
if let Message::Route(
|
||||
crate::route_edit::Event::Commit(captured, changed, ..)
|
||||
@@ -2150,7 +2118,6 @@ impl App {
|
||||
Message::Command(Command::Layout(diagram)) => self.saved_scenario_diagram(*diagram),
|
||||
Message::Projection(projection) => active || projection.scenario().is_some(),
|
||||
Message::SelectNode(_)
|
||||
| Message::CanvasSelect(..)
|
||||
| Message::PlaceSelected
|
||||
| Message::HideSelected
|
||||
| Message::ToggleCollapse
|
||||
@@ -2751,10 +2718,10 @@ impl App {
|
||||
e.kind() != Kind::Port && d.projection.includes(e.kind())
|
||||
})
|
||||
});
|
||||
if show_in_mixed_view || menu.request.canvas.is_some() {
|
||||
if !self.inspect_canvas_target(menu.request.object) {
|
||||
return Task::none();
|
||||
}
|
||||
if show_in_mixed_view {
|
||||
self.selected = menu.request.object;
|
||||
self.selected_attachment = None;
|
||||
self.refresh_draft();
|
||||
} else {
|
||||
self.select(menu.request.object);
|
||||
}
|
||||
@@ -2766,15 +2733,7 @@ impl App {
|
||||
}
|
||||
self.reconcile_multiselect();
|
||||
self.selected_bend = menu.request.bend.map(|i| (menu.request.object, i));
|
||||
let action = match *action {
|
||||
Message::EditProperties(id)
|
||||
if menu.request.canvas.is_some() && id == menu.request.object =>
|
||||
{
|
||||
Message::InspectorTab(crate::navigation::InspectorTab::Properties)
|
||||
}
|
||||
action => action,
|
||||
};
|
||||
return self.update(action);
|
||||
return self.update(*action);
|
||||
}
|
||||
Message::CreateContextElement(kind, child) => {
|
||||
self.create_kind = kind;
|
||||
@@ -2930,14 +2889,6 @@ impl App {
|
||||
self.status = "Property draft reverted".into();
|
||||
}
|
||||
Message::Select(id) => self.select(id),
|
||||
Message::CanvasSelect(context, id) => {
|
||||
let view = project_view(self.project(), context.diagram);
|
||||
if view.ports.iter().any(|port| port.element == id)
|
||||
|| view.edges.iter().any(|edge| edge.id == id)
|
||||
{
|
||||
self.inspect_canvas_target(id);
|
||||
}
|
||||
}
|
||||
Message::DiagramSelection(event) => self.multiselect_event(event),
|
||||
Message::EditProperties(id) => {
|
||||
self.select(id);
|
||||
@@ -3385,7 +3336,7 @@ impl App {
|
||||
self.workflow = Some(crate::workflow::Workflow::relationship_kind(
|
||||
self.project(),
|
||||
self.selected,
|
||||
self.project().layer_of(self.selected).unwrap_or(self.layer),
|
||||
self.layer,
|
||||
kind,
|
||||
incoming,
|
||||
));
|
||||
@@ -4411,18 +4362,13 @@ impl App {
|
||||
self.status = "Select an SA function or participant, then choose a typed port action in Properties.".into();
|
||||
return;
|
||||
}
|
||||
let creation_layer = if child {
|
||||
self.project().layer_of(self.selected).unwrap_or(self.layer)
|
||||
} else {
|
||||
self.layer
|
||||
};
|
||||
let allocated = child
|
||||
&& self.create_kind.is_work()
|
||||
&& self
|
||||
.project()
|
||||
.elements
|
||||
.get(&self.selected)
|
||||
.is_some_and(|e| e.layer() == creation_layer && e.kind().is_performer());
|
||||
.is_some_and(|e| e.layer() == self.layer && e.kind().is_performer());
|
||||
let parent = if child && !allocated {
|
||||
Some(self.selected)
|
||||
} else {
|
||||
@@ -4430,7 +4376,7 @@ impl App {
|
||||
};
|
||||
let Some(e) = self.project().make_element(
|
||||
self.create_kind,
|
||||
creation_layer,
|
||||
self.layer,
|
||||
&format!("New {}", self.create_kind.label().to_lowercase()),
|
||||
parent,
|
||||
) else {
|
||||
@@ -4459,16 +4405,16 @@ impl App {
|
||||
.project()
|
||||
.diagrams
|
||||
.values()
|
||||
.find(|d| d.layer == creation_layer && d.projection == preferred)
|
||||
.find(|d| d.layer == self.layer && d.projection == preferred)
|
||||
.map(|d| d.id);
|
||||
if diagram_target.is_none() {
|
||||
let view = Id::new_v4();
|
||||
commands.push(Command::CreateDiagram(Diagram {
|
||||
id: view,
|
||||
alias: self.project().fresh_alias("engineering_view", "view", view),
|
||||
name: format!("{} {preferred}", creation_layer),
|
||||
name: format!("{} {preferred}", self.layer),
|
||||
description: String::new(),
|
||||
layer: creation_layer,
|
||||
layer: self.layer,
|
||||
projection: preferred,
|
||||
layout: None,
|
||||
routes: Vec::new(),
|
||||
@@ -4601,13 +4547,7 @@ impl App {
|
||||
));
|
||||
}
|
||||
if self.execute(Command::Batch(commands)) {
|
||||
let changed_view = self.active_diagram != diagram_target;
|
||||
self.active_diagram = diagram_target;
|
||||
if changed_view
|
||||
&& let Some(view) = diagram_target.and_then(|id| self.project().diagrams.get(&id))
|
||||
{
|
||||
self.layer = view.layer;
|
||||
}
|
||||
self.selected = id;
|
||||
self.inspector_tab = crate::navigation::InspectorTab::Properties;
|
||||
self.refresh_draft();
|
||||
@@ -4621,7 +4561,7 @@ impl App {
|
||||
self.workflow = Some(crate::workflow::Workflow::relationship(
|
||||
self.project(),
|
||||
self.selected,
|
||||
self.project().layer_of(self.selected).unwrap_or(self.layer),
|
||||
self.layer,
|
||||
));
|
||||
}
|
||||
fn add_trace(&mut self) {
|
||||
@@ -5146,9 +5086,17 @@ impl App {
|
||||
&project_view(self.project(), context.diagram),
|
||||
id,
|
||||
);
|
||||
if !self.inspect_canvas_target(id) {
|
||||
self.connection = Some(session);
|
||||
return;
|
||||
if session.tool == crate::connection_tool::Tool::Allocation
|
||||
&& self.project().diagrams[&context.diagram].projection
|
||||
== ProjectionKind::Traceability
|
||||
{
|
||||
// Mixed views can allocate either perspective. Choosing
|
||||
// a visible source must not navigate to its preferred view.
|
||||
self.selected = id;
|
||||
self.selected_attachment = None;
|
||||
self.refresh_draft();
|
||||
} else {
|
||||
self.select(id);
|
||||
}
|
||||
self.status = if session.candidates.is_empty() {
|
||||
"No compatible targets are visible. Expand containers or show a compatible endpoint in this view; Esc cancels drawing.".into()
|
||||
@@ -5293,7 +5241,7 @@ impl App {
|
||||
if route.waypoints.len() >= 128 {
|
||||
return;
|
||||
}
|
||||
let geometry = oa_core::routing::route_diagram(self.project(), diagram, &view);
|
||||
let geometry = crate::state_label::route_diagram(self.project(), diagram, &view);
|
||||
let edge = &geometry.edges[&self.selected];
|
||||
// Mandatory port leads are inside the card's clearance. A pin
|
||||
// starts beyond those leads, including coincident short stubs.
|
||||
@@ -5373,7 +5321,7 @@ impl App {
|
||||
self.pan = iced::Vector::new(30., 30.);
|
||||
return;
|
||||
}
|
||||
let geometry = oa_core::routing::route_diagram(
|
||||
let geometry = crate::state_label::route_diagram(
|
||||
self.project(),
|
||||
&self.project().diagrams[&self.active_diagram.unwrap()],
|
||||
&view,
|
||||
|
||||
@@ -920,7 +920,7 @@ impl App {
|
||||
};
|
||||
let frozen = affected.map(|affected| {
|
||||
let d = &self.project().diagrams[&diagram];
|
||||
let routed = routing::route_diagram(self.project(), d, &view);
|
||||
let routed = crate::state_label::route_diagram(self.project(), d, &view);
|
||||
Arc::new(Frozen::capture(
|
||||
self.project(),
|
||||
d,
|
||||
@@ -1066,7 +1066,7 @@ impl App {
|
||||
self.reconcile_multiselect();
|
||||
}
|
||||
} else {
|
||||
let routed = Arc::new(routing::route_diagram(candidate.project(), placed.diagram(), placed.view()));
|
||||
let routed = Arc::new(crate::state_label::route_diagram(candidate.project(), placed.diagram(), placed.view()));
|
||||
preview = Some(Arc::new(Preview { token, candidate, placement: placed.into_preview(), routed }));
|
||||
}
|
||||
Ok(label)
|
||||
|
||||
@@ -89,10 +89,7 @@ async fn refused_click_keeps_field(mounted: &mut Mounted, f: &mut Fixture, field
|
||||
);
|
||||
assert!(!messages.iter().any(|m| matches!(
|
||||
m,
|
||||
Message::Select(_)
|
||||
| Message::CanvasSelect(..)
|
||||
| Message::SelectNode(_)
|
||||
| Message::MoveNode(..)
|
||||
Message::Select(_) | Message::SelectNode(_) | Message::MoveNode(..)
|
||||
)));
|
||||
assert_eq!(f.app.document.bundle(), &before);
|
||||
assert_eq!((f.app.selected, f.app.selected_node), selected);
|
||||
|
||||
@@ -237,10 +237,7 @@ fn mounted_dirty_property_press_does_not_select_apply_or_destroy_draft() {
|
||||
));
|
||||
assert!(!events.iter().any(|m| matches!(
|
||||
m,
|
||||
Message::Select(_)
|
||||
| Message::CanvasSelect(..)
|
||||
| Message::SelectNode(_)
|
||||
| Message::MoveNode(..)
|
||||
Message::Select(_) | Message::SelectNode(_) | Message::MoveNode(..)
|
||||
)));
|
||||
send(&mut f.app, events);
|
||||
assert_eq!((f.app.selected, f.app.selected_node), selection);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! Compact neutral tool palette. Tool state never changes its allocated width.
|
||||
use super::*;
|
||||
use crate::connection_tool::Tool;
|
||||
use iced::{
|
||||
Point, Rectangle, Size, Theme, mouse,
|
||||
widget::{
|
||||
@@ -12,7 +11,7 @@ use iced::{
|
||||
#[derive(Clone, Copy)]
|
||||
enum Icon {
|
||||
Element(Kind),
|
||||
Connection(Tool),
|
||||
Arrow,
|
||||
Existing,
|
||||
Select,
|
||||
Collapse(bool),
|
||||
@@ -77,59 +76,10 @@ impl canvas::Program<Message> for Icon {
|
||||
);
|
||||
}
|
||||
}
|
||||
Self::Connection(connection) => match connection {
|
||||
// The OA and SA work-flow tools share a visual family; they
|
||||
// never coexist in a palette. Keep their small glyph legible.
|
||||
Tool::Interaction | Tool::FunctionalExchange => {
|
||||
for x in [1., 11.] {
|
||||
f.stroke(
|
||||
&Path::rounded_rectangle(
|
||||
Point::new(x, 5.),
|
||||
Size::new(4., 6.),
|
||||
1.5.into(),
|
||||
),
|
||||
stroke,
|
||||
);
|
||||
}
|
||||
f.stroke(&line(&[(5., 8.), (10., 8.)]), stroke);
|
||||
f.stroke(&line(&[(7.5, 5.5), (10., 8.), (7.5, 10.5)]), stroke);
|
||||
}
|
||||
Tool::CommunicationMean => {
|
||||
// Participant endpoints, without implying a fixed direction.
|
||||
for x in [1., 11.] {
|
||||
f.stroke(
|
||||
&Path::rectangle(Point::new(x, 4.), Size::new(4., 8.)),
|
||||
stroke,
|
||||
);
|
||||
}
|
||||
f.stroke(&line(&[(5., 8.), (11., 8.)]), stroke);
|
||||
}
|
||||
Tool::BoundaryExchange => {
|
||||
// Ports on facing participant boundaries. Standard exchanges
|
||||
// are unoriented, so the generic tool has no arrowhead.
|
||||
for x in [2., 14.] {
|
||||
f.stroke(&line(&[(x, 2.), (x, 14.)]), stroke);
|
||||
}
|
||||
for x in [1., 12.] {
|
||||
f.stroke(
|
||||
&Path::rectangle(Point::new(x, 6.), Size::new(3., 4.)),
|
||||
stroke,
|
||||
);
|
||||
}
|
||||
f.stroke(&line(&[(4., 8.), (12., 8.)]), stroke);
|
||||
}
|
||||
Tool::Allocation => {
|
||||
// Work enters a performer: allocation can appear as nesting
|
||||
// rather than a relationship line in allocated-work views.
|
||||
f.stroke(&line(&[(1., 2.), (1., 14.), (15., 14.), (15., 2.)]), stroke);
|
||||
f.stroke(
|
||||
&Path::rounded_rectangle(Point::new(5., 9.), Size::new(6., 3.), 1.into()),
|
||||
stroke,
|
||||
);
|
||||
f.stroke(&line(&[(8., 1.), (8., 7.)]), stroke);
|
||||
f.stroke(&line(&[(5., 4.), (8., 7.), (11., 4.)]), stroke);
|
||||
}
|
||||
},
|
||||
Self::Arrow => {
|
||||
f.stroke(&line(&[(1., 8.), (14., 8.), (10., 4.)]), stroke);
|
||||
f.stroke(&line(&[(14., 8.), (10., 12.)]), stroke);
|
||||
}
|
||||
Self::Existing => {
|
||||
f.stroke(
|
||||
&Path::rectangle(Point::new(1., 1.), Size::new(10., 10.)),
|
||||
@@ -284,7 +234,7 @@ pub fn view(app: &App) -> Element<'_, Message> {
|
||||
}
|
||||
content = content.push(tool(
|
||||
app,
|
||||
Icon::Connection(*connection),
|
||||
Icon::Arrow,
|
||||
connection.label(),
|
||||
Message::Connection(crate::connection_edit::Event::Choose(Some(*connection))),
|
||||
app.connection
|
||||
|
||||
@@ -1,544 +0,0 @@
|
||||
//! Canvas inspection retains the displayed mixed-layer surface; navigation follows the model.
|
||||
use super::*;
|
||||
use crate::diagram_usage::Target;
|
||||
use crate::model_menu::{Event as MenuEvent, Request};
|
||||
|
||||
struct Fixture {
|
||||
app: App,
|
||||
diagram: Id,
|
||||
process: Id,
|
||||
placement: Id,
|
||||
edge: Id,
|
||||
}
|
||||
|
||||
fn fixture() -> Fixture {
|
||||
let mut p = Project::empty();
|
||||
let process = p
|
||||
.add_element(Kind::Process, Layer::Oa, "Operational process", None)
|
||||
.unwrap();
|
||||
let capability = p
|
||||
.add_element(Kind::Capability, Layer::Oa, "Operational capability", None)
|
||||
.unwrap();
|
||||
let edge = p.relate(
|
||||
RelationKind::ChainInvolvement,
|
||||
"Enables",
|
||||
process,
|
||||
capability,
|
||||
);
|
||||
p.ensure_diagram(Layer::Oa);
|
||||
let diagram = p.ensure_diagram(Layer::Sa);
|
||||
p.diagrams.get_mut(&diagram).unwrap().projection = ProjectionKind::Traceability;
|
||||
let placement = p.place(diagram, process, Position { x: 0., y: 0. });
|
||||
p.place(diagram, capability, Position { x: 500., y: 0. });
|
||||
let mut app = App::with_project(p);
|
||||
app.page = Page::Diagram;
|
||||
app.layer = Layer::Sa;
|
||||
app.active_diagram = Some(diagram);
|
||||
app.selected = diagram;
|
||||
app.refresh_draft();
|
||||
app.reconcile_multiselect();
|
||||
assert!(
|
||||
project_view(app.project(), diagram)
|
||||
.edges
|
||||
.iter()
|
||||
.any(|e| e.id == edge)
|
||||
);
|
||||
Fixture {
|
||||
app,
|
||||
diagram,
|
||||
process,
|
||||
placement,
|
||||
edge,
|
||||
}
|
||||
}
|
||||
|
||||
fn assert_surface(f: &Fixture) {
|
||||
assert_eq!(f.app.page, Page::Diagram);
|
||||
assert_eq!(f.app.layer, Layer::Sa);
|
||||
assert_eq!(f.app.active_diagram, Some(f.diagram));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mixed_projection_switch_restores_all_authored_content_and_one_step_history() {
|
||||
let mut f = fixture();
|
||||
let before = f.app.document.snapshot();
|
||||
let mut expected = before.decoded.project.clone();
|
||||
expected.diagrams.get_mut(&f.diagram).unwrap().projection = ProjectionKind::Allocation;
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::Projection(ProjectionKind::Allocation));
|
||||
assert_surface(&f);
|
||||
assert_eq!(f.app.project(), &expected);
|
||||
assert!(project_view(f.app.project(), f.diagram).nodes.is_empty());
|
||||
assert_eq!(f.app.project().diagrams[&f.diagram].nodes.len(), 2);
|
||||
let switched = f.app.document.snapshot();
|
||||
let _ = f.app.update(Message::Undo);
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &before.bundle);
|
||||
assert!(!f.app.document.can_undo());
|
||||
let _ = f.app.update(Message::Redo);
|
||||
assert_eq!(f.app.project(), &switched.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &switched.bundle);
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::Projection(ProjectionKind::Traceability));
|
||||
assert_surface(&f);
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert!(
|
||||
project_view(f.app.project(), f.diagram)
|
||||
.edges
|
||||
.iter()
|
||||
.any(|e| e.id == f.edge)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mixed_canvas_edge_and_group_inspection_preserve_surface_and_history() {
|
||||
for grouped in [false, true] {
|
||||
let mut f = fixture();
|
||||
let before = f.app.document.snapshot();
|
||||
let revision = f.app.document.revision();
|
||||
if grouped {
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::DiagramSelection(multiselect::Event::Choose(
|
||||
f.app.multiselect_context().unwrap(),
|
||||
Target::Placement(f.placement),
|
||||
multiselect::Choice::Replace,
|
||||
)));
|
||||
}
|
||||
let message = if grouped {
|
||||
Message::DiagramSelection(multiselect::Event::Choose(
|
||||
f.app.multiselect_context().unwrap(),
|
||||
Target::Edge(f.edge),
|
||||
multiselect::Choice::Add,
|
||||
))
|
||||
} else {
|
||||
Message::CanvasSelect(f.app.route_context().unwrap(), f.edge)
|
||||
};
|
||||
let _ = f.app.update(message);
|
||||
assert_surface(&f);
|
||||
assert_eq!(f.app.selected, f.edge);
|
||||
assert_eq!(f.app.draft.as_ref().unwrap().original, f.edge);
|
||||
assert_eq!(
|
||||
f.app.multiselect_snapshot().unwrap().primary(),
|
||||
Some(&Target::Edge(f.edge))
|
||||
);
|
||||
assert_eq!(
|
||||
f.app.multiselect_snapshot().unwrap().targets().len(),
|
||||
if grouped { 2 } else { 1 }
|
||||
);
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &before.bundle);
|
||||
assert_eq!(f.app.document.revision(), revision);
|
||||
assert!(!f.app.document.can_undo());
|
||||
}
|
||||
}
|
||||
|
||||
fn invoke(f: &mut Fixture, object: Id, placement: Option<Id>, action: Message) {
|
||||
let mut request = Request::object(object, iced::Point::ORIGIN);
|
||||
request.canvas = f.app.route_context();
|
||||
request.placement = placement;
|
||||
let _ = f.app.update(Message::Menu(MenuEvent::Open(request)));
|
||||
let token = f.app.model_menu.as_ref().unwrap().token;
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::Menu(MenuEvent::Invoke(token, Box::new(action))));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mixed_canvas_context_properties_and_hide_keep_the_captured_surface() {
|
||||
let mut f = fixture();
|
||||
let edge = f.edge;
|
||||
invoke(&mut f, edge, None, Message::EditProperties(edge));
|
||||
assert_surface(&f);
|
||||
assert_eq!(f.app.selected, edge);
|
||||
assert!(!f.app.document.can_undo());
|
||||
let before = f.app.document.snapshot();
|
||||
let process = f.process;
|
||||
let placement = f.placement;
|
||||
invoke(&mut f, process, Some(placement), Message::HideSelected);
|
||||
assert_surface(&f);
|
||||
assert!(
|
||||
!f.app.project().diagrams[&f.diagram]
|
||||
.nodes
|
||||
.contains_key(&placement)
|
||||
);
|
||||
assert!(f.app.project().elements.contains_key(&process));
|
||||
let _ = f.app.update(Message::Undo);
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &before.bundle);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mixed_canvas_explicit_navigation_still_follows_the_target_layer() {
|
||||
let mut f = fixture();
|
||||
let process = f.process;
|
||||
let edge = f.edge;
|
||||
invoke(&mut f, edge, None, Message::Select(process));
|
||||
assert_eq!(f.app.selected, process);
|
||||
assert_eq!(f.app.layer, Layer::Oa);
|
||||
assert_ne!(f.app.active_diagram, Some(f.diagram));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_navigation_to_the_inspected_cross_layer_object_follows_its_layer() {
|
||||
let mut f = fixture();
|
||||
let _ = f.app.update(Message::CanvasSelect(
|
||||
f.app.route_context().unwrap(),
|
||||
f.edge,
|
||||
));
|
||||
assert_surface(&f);
|
||||
assert_eq!(f.app.selected, f.edge);
|
||||
let before = f.app.document.snapshot();
|
||||
let _ = f.app.update(Message::Select(f.edge));
|
||||
assert_eq!(f.app.selected, f.edge);
|
||||
assert_eq!(f.app.layer, Layer::Oa);
|
||||
assert_ne!(f.app.active_diagram, Some(f.diagram));
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &before.bundle);
|
||||
assert!(!f.app.document.can_undo());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mixed_canvas_invalid_draft_and_stale_packets_preserve_selection() {
|
||||
let mut f = fixture();
|
||||
let context = f.app.route_context().unwrap();
|
||||
let _ = f.app.update(Message::Field("/id".into(), "-".into()));
|
||||
let draft = serde_json::to_value(f.app.draft.as_ref().unwrap().recovery_snapshot()).unwrap();
|
||||
let _ = f.app.update(Message::CanvasSelect(context, f.edge));
|
||||
assert_eq!(f.app.selected, f.diagram);
|
||||
assert_surface(&f);
|
||||
assert_eq!(
|
||||
serde_json::to_value(f.app.draft.as_ref().unwrap().recovery_snapshot()).unwrap(),
|
||||
draft
|
||||
);
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::DiagramSelection(multiselect::Event::Choose(
|
||||
f.app.multiselect_context().unwrap(),
|
||||
Target::Edge(f.edge),
|
||||
multiselect::Choice::Replace,
|
||||
)));
|
||||
assert_eq!(f.app.selected, f.diagram);
|
||||
assert_eq!(
|
||||
serde_json::to_value(f.app.draft.as_ref().unwrap().recovery_snapshot()).unwrap(),
|
||||
draft
|
||||
);
|
||||
let _ = f.app.update(Message::RevertProperties);
|
||||
f.app.canvas_epoch += 1;
|
||||
let _ = f.app.update(Message::CanvasSelect(context, f.edge));
|
||||
assert_eq!(f.app.selected, f.diagram);
|
||||
assert!(!f.app.document.can_undo());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cross_layer_port_inspection_and_connection_start_retain_the_view() {
|
||||
let mut p = Project::empty();
|
||||
let owner = p
|
||||
.add_element(Kind::Function, Layer::Sa, "Send", None)
|
||||
.unwrap();
|
||||
let port = Id::new_v4();
|
||||
let element = make_port(
|
||||
&p,
|
||||
port,
|
||||
owner,
|
||||
"Output",
|
||||
PortContract::FunctionOutput {
|
||||
outgoing_items: vec![],
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
p.elements.insert(port, element);
|
||||
p.ensure_diagram(Layer::Sa);
|
||||
let diagram = p.ensure_diagram(Layer::Oa);
|
||||
p.diagrams.get_mut(&diagram).unwrap().projection = ProjectionKind::Traceability;
|
||||
let placement = p.place(diagram, owner, Position { x: 0., y: 0. });
|
||||
let mut app = App::with_project(p);
|
||||
app.page = Page::Diagram;
|
||||
app.layer = Layer::Oa;
|
||||
app.active_diagram = Some(diagram);
|
||||
app.selected = diagram;
|
||||
app.refresh_draft();
|
||||
app.reconcile_multiselect();
|
||||
assert!(
|
||||
project_view(app.project(), diagram)
|
||||
.ports
|
||||
.iter()
|
||||
.any(|p| p.element == port)
|
||||
);
|
||||
let _ = app.update(Message::CanvasSelect(app.route_context().unwrap(), port));
|
||||
assert_eq!(app.selected, port);
|
||||
assert_eq!(app.active_diagram, Some(diagram));
|
||||
assert_eq!(app.layer, Layer::Oa);
|
||||
assert_eq!(
|
||||
app.multiselect_snapshot().unwrap().primary(),
|
||||
Some(&Target::Port { port, placement })
|
||||
);
|
||||
// Reset inspection so the endpoint path cannot pass by selecting the same ID.
|
||||
app.selected = diagram;
|
||||
app.refresh_draft();
|
||||
let context = app.route_context().unwrap();
|
||||
// Mixed canvases can retain a tool from either perspective.
|
||||
app.connection = Some(crate::connection_edit::Session::new(
|
||||
app.project(),
|
||||
&project_view(app.project(), diagram),
|
||||
context,
|
||||
crate::connection_tool::Tool::FunctionalExchange,
|
||||
));
|
||||
let _ = app.update(Message::Connection(
|
||||
crate::connection_edit::Event::Endpoint(context, port),
|
||||
));
|
||||
assert_eq!(app.selected, port);
|
||||
assert_eq!(app.layer, Layer::Oa);
|
||||
assert_eq!(app.active_diagram, Some(diagram));
|
||||
assert_eq!(app.connection.as_ref().unwrap().source, Some(port));
|
||||
assert!(!app.document.can_undo());
|
||||
}
|
||||
|
||||
fn authoring_fixture(performer: bool) -> (Fixture, Id) {
|
||||
let mut f = fixture();
|
||||
let mut project = f.app.project().clone();
|
||||
let owner = project
|
||||
.add_element(
|
||||
if performer {
|
||||
Kind::Entity
|
||||
} else {
|
||||
Kind::Activity
|
||||
},
|
||||
Layer::Oa,
|
||||
"Operational owner",
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let target = project
|
||||
.add_element(Kind::Activity, Layer::Oa, "Operational target", None)
|
||||
.unwrap();
|
||||
let placement = project.place(f.diagram, owner, Position { x: 0., y: 400. });
|
||||
project.place(f.diagram, target, Position { x: 500., y: 400. });
|
||||
f.app = App::with_project(project);
|
||||
f.app.page = Page::Diagram;
|
||||
f.app.layer = Layer::Sa;
|
||||
f.app.active_diagram = Some(f.diagram);
|
||||
f.app.selected = f.diagram;
|
||||
f.app.refresh_draft();
|
||||
f.app.reconcile_multiselect();
|
||||
f.process = owner;
|
||||
f.placement = placement;
|
||||
(f, target)
|
||||
}
|
||||
|
||||
fn assert_source_pair(app: &App) {
|
||||
let compiled = oa_core::source_project::compile_bundle(
|
||||
app.document.bundle(),
|
||||
oa_core::source_project::ProjectLimits::default(),
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(&compiled.decoded.project, app.project());
|
||||
assert_eq!(&compiled.bundle, app.document.bundle());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mixed_canvas_relationship_actions_keep_operational_source_and_commit_one_step() {
|
||||
for context_action in [false, true] {
|
||||
let (mut f, target) = authoring_fixture(false);
|
||||
let before = f.app.document.snapshot();
|
||||
let owner = f.process;
|
||||
let placement = f.placement;
|
||||
if context_action {
|
||||
invoke(
|
||||
&mut f,
|
||||
owner,
|
||||
Some(placement),
|
||||
Message::AddRelationKind(RelationKind::Interaction, false),
|
||||
);
|
||||
} else {
|
||||
let _ = f.app.update(Message::SelectNode(placement));
|
||||
let _ = f.app.update(Message::AddRelation);
|
||||
}
|
||||
assert_surface(&f);
|
||||
let Some(crate::workflow::Workflow::Relation(relation)) = &f.app.workflow else {
|
||||
panic!("relationship form did not open: {}", f.app.status);
|
||||
};
|
||||
assert_eq!(
|
||||
relation.source.as_ref().map(|source| source.id),
|
||||
Some(owner)
|
||||
);
|
||||
assert_eq!(relation.kind, RelationKind::Interaction);
|
||||
let saved = f
|
||||
.app
|
||||
.workflow
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.recovery_snapshot()
|
||||
.unwrap();
|
||||
assert_eq!(saved["Relation"]["layer"], "Oa");
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::Workflow(crate::workflow::Event::Target(Choice {
|
||||
id: target,
|
||||
label: "Operational target".into(),
|
||||
})));
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::Workflow(crate::workflow::Event::Apply));
|
||||
assert!(f.app.workflow.is_none(), "{}", f.app.status);
|
||||
let created: Vec<_> = f
|
||||
.app
|
||||
.project()
|
||||
.relations
|
||||
.values()
|
||||
.filter(|relation| !before.decoded.project.relations.contains_key(&relation.id))
|
||||
.collect();
|
||||
assert_eq!(created.len(), 1);
|
||||
assert_eq!(
|
||||
(created[0].kind(), created[0].source(), created[0].target()),
|
||||
(RelationKind::Interaction, owner, target)
|
||||
);
|
||||
assert_source_pair(&f.app);
|
||||
let _ = f.app.update(Message::Undo);
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &before.bundle);
|
||||
assert!(!f.app.document.can_undo());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mixed_canvas_add_child_command_uses_parent_layer_for_containment_and_allocation() {
|
||||
for performer in [false, true] {
|
||||
let (mut f, _) = authoring_fixture(performer);
|
||||
let before = f.app.document.snapshot();
|
||||
let owner = f.process;
|
||||
let placement = f.placement;
|
||||
invoke(
|
||||
&mut f,
|
||||
owner,
|
||||
Some(placement),
|
||||
Message::CreateContextElement(Kind::Activity, true),
|
||||
);
|
||||
assert_surface(&f);
|
||||
let created: Vec<_> = f
|
||||
.app
|
||||
.project()
|
||||
.elements
|
||||
.values()
|
||||
.filter(|element| !before.decoded.project.elements.contains_key(&element.id))
|
||||
.collect();
|
||||
assert_eq!(created.len(), 1, "{}", f.app.status);
|
||||
let child = created[0].id;
|
||||
assert_eq!(created[0].kind(), Kind::Activity);
|
||||
assert_eq!(created[0].layer(), Layer::Oa);
|
||||
assert_eq!(
|
||||
created[0].parent,
|
||||
if performer { None } else { Some(owner) }
|
||||
);
|
||||
let allocations: Vec<_> = f
|
||||
.app
|
||||
.project()
|
||||
.relations
|
||||
.values()
|
||||
.filter(|relation| !before.decoded.project.relations.contains_key(&relation.id))
|
||||
.collect();
|
||||
assert_eq!(allocations.len(), usize::from(performer));
|
||||
if performer {
|
||||
assert_eq!(
|
||||
(
|
||||
allocations[0].kind(),
|
||||
allocations[0].source(),
|
||||
allocations[0].target()
|
||||
),
|
||||
(RelationKind::Allocation, owner, child)
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
f.app.project().diagrams[&f.diagram]
|
||||
.nodes
|
||||
.values()
|
||||
.any(|node| node.element == child)
|
||||
);
|
||||
assert_source_pair(&f.app);
|
||||
let _ = f.app.update(Message::Undo);
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &before.bundle);
|
||||
assert!(!f.app.document.can_undo());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mixed_canvas_root_creation_still_uses_the_active_perspective() {
|
||||
let (mut f, _) = authoring_fixture(false);
|
||||
let _ = f.app.update(Message::SelectNode(f.placement));
|
||||
let before = f.app.document.snapshot();
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::CreateContextElement(Kind::Function, false));
|
||||
assert_surface(&f);
|
||||
let created: Vec<_> = f
|
||||
.app
|
||||
.project()
|
||||
.elements
|
||||
.values()
|
||||
.filter(|element| !before.decoded.project.elements.contains_key(&element.id))
|
||||
.collect();
|
||||
assert_eq!(created.len(), 1, "{}", f.app.status);
|
||||
assert_eq!(created[0].kind(), Kind::Function);
|
||||
assert_eq!(created[0].layer(), Layer::Sa);
|
||||
assert_eq!(created[0].parent, None);
|
||||
assert_source_pair(&f.app);
|
||||
let _ = f.app.update(Message::Undo);
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &before.bundle);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn child_creation_navigates_to_a_parent_layer_preferred_view_only_when_needed() {
|
||||
for existing_preferred in [false, true] {
|
||||
let (mut f, _) = authoring_fixture(false);
|
||||
let mut project = f.app.project().clone();
|
||||
for diagram in project
|
||||
.diagrams
|
||||
.values_mut()
|
||||
.filter(|d| d.layer == Layer::Oa)
|
||||
{
|
||||
diagram.projection = if existing_preferred {
|
||||
ProjectionKind::Allocation
|
||||
} else {
|
||||
ProjectionKind::Overview
|
||||
};
|
||||
}
|
||||
project.diagrams.get_mut(&f.diagram).unwrap().projection = ProjectionKind::Capabilities;
|
||||
f.app = App::with_project(project);
|
||||
let _ = f.app.update(Message::Select(f.process));
|
||||
let _ = f.app.update(Message::Diagram(Choice {
|
||||
id: f.diagram,
|
||||
label: "System capabilities".into(),
|
||||
}));
|
||||
assert_eq!(f.app.selected, f.process);
|
||||
assert_eq!(f.app.layer, Layer::Sa);
|
||||
assert_eq!(f.app.active_diagram, Some(f.diagram));
|
||||
let before = f.app.document.snapshot();
|
||||
let _ = f
|
||||
.app
|
||||
.update(Message::CreateContextElement(Kind::Activity, true));
|
||||
assert_eq!(f.app.layer, Layer::Oa, "{}", f.app.status);
|
||||
let diagram = f.app.active_diagram.unwrap();
|
||||
assert_ne!(diagram, f.diagram);
|
||||
assert_eq!(f.app.project().diagrams[&diagram].layer, Layer::Oa);
|
||||
assert_eq!(
|
||||
f.app.project().diagrams[&diagram].projection,
|
||||
ProjectionKind::Allocation
|
||||
);
|
||||
assert_eq!(
|
||||
f.app.project().diagrams.len(),
|
||||
before.decoded.project.diagrams.len() + usize::from(!existing_preferred)
|
||||
);
|
||||
assert_eq!(
|
||||
f.app.project().elements[&f.app.selected].parent,
|
||||
Some(f.process)
|
||||
);
|
||||
assert_source_pair(&f.app);
|
||||
let _ = f.app.update(Message::Undo);
|
||||
assert_eq!(f.app.project(), &before.decoded.project);
|
||||
assert_eq!(f.app.document.bundle(), &before.bundle);
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ impl App {
|
||||
};
|
||||
let diagram = &self.project().diagrams[&context.diagram];
|
||||
let view = projection::project_diagram(self.project(), diagram);
|
||||
let bounds = routing::route_diagram(self.project(), diagram, &view).bounds;
|
||||
let bounds = crate::state_label::route_diagram(self.project(), diagram, &view).bounds;
|
||||
let viewport = self.behavior.diagram.viewport.unwrap_or(iced::Size::new(
|
||||
(self.window_size.width - 610.).max(280.),
|
||||
(self.window_size.height - 320.).max(240.),
|
||||
|
||||
@@ -744,7 +744,7 @@ pub(crate) fn diagram_usages(
|
||||
}
|
||||
}
|
||||
}
|
||||
for edge in routing::route_diagram(project, diagram, view)
|
||||
for edge in crate::state_label::route_diagram(project, diagram, view)
|
||||
.edges
|
||||
.values()
|
||||
{
|
||||
@@ -754,10 +754,10 @@ pub(crate) fn diagram_usages(
|
||||
if edge.id == subject || edge.label.text.is_empty() {
|
||||
continue;
|
||||
}
|
||||
// Routing already shortens external summaries before the canvas applies
|
||||
// its width limit. Compare against precisely that doubly shortened text.
|
||||
let painted = short(&edge.label.text, edge.label.bounds.size.width - 10., 10.);
|
||||
if let Some(role) = transition_label_role_in_text(project, relation, subject, &painted) {
|
||||
// The shared plan paints the complete retained raw summary. Keep its
|
||||
// original prefix here: display normalization must not shift field offsets.
|
||||
let painted = &edge.label.text;
|
||||
if let Some(role) = transition_label_role_in_text(project, relation, subject, painted) {
|
||||
result.push(Usage {
|
||||
subject,
|
||||
surface: Surface::Saved(diagram.id),
|
||||
@@ -1078,7 +1078,7 @@ impl StateCanvas<'_> {
|
||||
}
|
||||
let view = projection::project_diagram(self.project, &diagram);
|
||||
let routed = if let Some(gesture) = state.bend.as_ref().filter(|_| bend_preview.is_some()) {
|
||||
routing::route_edge_preview(
|
||||
crate::state_label::route_edge_preview(
|
||||
self.project,
|
||||
&diagram,
|
||||
&view,
|
||||
@@ -1086,7 +1086,7 @@ impl StateCanvas<'_> {
|
||||
gesture.route.edge,
|
||||
)
|
||||
} else {
|
||||
routing::route_diagram(self.project, &diagram, &view)
|
||||
crate::state_label::route_diagram(self.project, &diagram, &view)
|
||||
};
|
||||
let symbol_labels = symbol_labels(self.project, &view, &routed);
|
||||
let scene = Arc::new(Scene {
|
||||
@@ -1153,6 +1153,19 @@ impl StateCanvas<'_> {
|
||||
.map(|n| n.element)
|
||||
}
|
||||
fn hit(&self, scene: &Scene, world: Point) -> Option<Hit> {
|
||||
// State labels paint opaque backgrounds above nodes and rows. Select
|
||||
// the last painted label at an overlapping pixel, including its padding.
|
||||
// Endpoint/bend handling remains ahead of this ordinary hit path.
|
||||
if let Some(edge) = scene.routed.edges.values().rev().find(|edge| {
|
||||
edge.label.state_layout.is_some()
|
||||
&& Rectangle::new(
|
||||
point(edge.label.bounds.position),
|
||||
Size::new(edge.label.bounds.size.width, edge.label.bounds.size.height),
|
||||
)
|
||||
.contains(world)
|
||||
}) {
|
||||
return Some(Hit::Transition(edge.id));
|
||||
}
|
||||
let node = self.node_at(scene, world);
|
||||
if let Some(node) = node {
|
||||
if let Some((relation, _)) = state_action_rows(self.project, node)
|
||||
@@ -2107,21 +2120,29 @@ impl canvas::Program<Event> for StateCanvas<'_> {
|
||||
Size::new(label.bounds.size.width, label.bounds.size.height),
|
||||
Color::WHITE,
|
||||
);
|
||||
let width = label.bounds.size.width - 10.;
|
||||
label_text(
|
||||
frame,
|
||||
short(self.project.named(edge.id), width, 10.),
|
||||
point(label.bounds.position) + Vector::new(5., 0.),
|
||||
10.,
|
||||
color,
|
||||
);
|
||||
label_text(
|
||||
frame,
|
||||
short(&label.text, width, 10.),
|
||||
point(label.bounds.position) + Vector::new(5., 12.),
|
||||
10.,
|
||||
style::MUTED,
|
||||
);
|
||||
if let Some(plan) = &label.state_layout {
|
||||
for (line, offset, ink) in plan
|
||||
.title_lines
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(index, line)| (line, plan.title_line_position(index), color))
|
||||
.chain(plan.summary_lines.iter().enumerate().map(|(index, line)| {
|
||||
(line, plan.summary_line_position(index), style::MUTED)
|
||||
}))
|
||||
{
|
||||
frame.fill_text(Text {
|
||||
content: line.clone(),
|
||||
position: point(label.bounds.position)
|
||||
+ Vector::new(offset.x, offset.y),
|
||||
size: routing::StateLabelLayout::FONT_SIZE.into(),
|
||||
line_height: iced::widget::text::LineHeight::Absolute(
|
||||
routing::StateLabelLayout::LINE_HEIGHT.into(),
|
||||
),
|
||||
color: ink,
|
||||
..Default::default()
|
||||
});
|
||||
}
|
||||
}
|
||||
if active
|
||||
&& self
|
||||
.current_selection()
|
||||
@@ -2595,6 +2616,7 @@ mod tests {
|
||||
|
||||
include!("state_bend_tests.rs");
|
||||
include!("state_multiselect_canvas_tests.rs");
|
||||
include!("state_label_canvas_tests.rs");
|
||||
|
||||
struct Fixture {
|
||||
project: Project,
|
||||
@@ -2803,6 +2825,45 @@ mod tests {
|
||||
assert!(!retained_label_field("1234A678", "1234…", 4));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_label_usage_keeps_raw_crlf_prefix_for_later_typed_fields() {
|
||||
let mut f = fixture();
|
||||
let first = f
|
||||
.project
|
||||
.add_element(Kind::Event, Layer::Sa, "漢\r\nB", None)
|
||||
.unwrap();
|
||||
let second = f
|
||||
.project
|
||||
.add_element(Kind::Event, Layer::Sa, "Visible", None)
|
||||
.unwrap();
|
||||
let edge = f
|
||||
.project
|
||||
.relate(RelationKind::StateTransition, "Ready\nfor review", f.a, f.b);
|
||||
if let RelationBody::StateTransition { triggers, .. } =
|
||||
&mut f.project.relations.get_mut(&edge).unwrap().body
|
||||
{
|
||||
*triggers = vec![first, second];
|
||||
}
|
||||
let diagram = &f.project.diagrams[&f.diagram];
|
||||
let view = projection::project_diagram(&f.project, diagram);
|
||||
let routed = crate::state_label::route_diagram(&f.project, diagram, &view);
|
||||
let label = &routed.edges[&edge].label;
|
||||
assert_eq!(label.text, "External · 漢\r\nB OR Visible");
|
||||
assert_eq!(
|
||||
label.state_layout.as_ref().unwrap().summary_lines,
|
||||
["External · 漢", "B OR Visible"]
|
||||
);
|
||||
let usages = diagram_usages(&f.project, diagram, &view, second);
|
||||
assert!(
|
||||
usages
|
||||
.iter()
|
||||
.any(|u| u.target == Target::Edge(edge) && u.role == "transition trigger")
|
||||
);
|
||||
// Feeding normalized display text to raw-prefix matching would lose
|
||||
// the second field at CRLF. Its raw name and source remain unchanged.
|
||||
assert_eq!(f.project.named(first), "漢\r\nB");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn diagram_usage_external_labels_obey_routing_cutoff_while_internal_rows_retain_full_summary() {
|
||||
use crate::diagram_usage::Target;
|
||||
@@ -2837,9 +2898,9 @@ mod tests {
|
||||
}
|
||||
let diagram = &f.project.diagrams[&f.diagram];
|
||||
let view = projection::project_diagram(&f.project, diagram);
|
||||
let routed = routing::route_diagram(&f.project, diagram, &view);
|
||||
let routed = crate::state_label::route_diagram(&f.project, diagram, &view);
|
||||
let edge = &routed.edges[&external];
|
||||
let painted = short(&edge.label.text, edge.label.bounds.size.width - 10., 10.);
|
||||
let painted = &edge.label.text;
|
||||
// Independent painted-text oracle: 11 prefix characters + 35 As, then
|
||||
// only the space before OR survives the routing limit.
|
||||
assert_eq!(edge.label.text, format!("External · {} …", "A".repeat(35)));
|
||||
|
||||
@@ -328,7 +328,7 @@ pub fn bend_route(
|
||||
}
|
||||
let stored = project.diagrams.get(&diagram)?;
|
||||
let view = projection::project_diagram(project, stored);
|
||||
let geometry = oa_core::routing::route_diagram(project, stored, &view)
|
||||
let geometry = crate::state_label::route_diagram(project, stored, &view)
|
||||
.edges
|
||||
.remove(&relation)?;
|
||||
(!geometry.custom_suspended).then_some(geometry)
|
||||
|
||||
@@ -0,0 +1,463 @@
|
||||
// Included in state_canvas::tests. Fixed world points exercise the real scene
|
||||
// and Program input, rather than choosing a successful point from returned bounds.
|
||||
|
||||
fn multiline_label_fixture() -> (Fixture, Id, Id) {
|
||||
let mut f = fixture();
|
||||
let work = f
|
||||
.project
|
||||
.add_element(Kind::Function, Layer::Sa, "Record request", None)
|
||||
.unwrap();
|
||||
let action = f
|
||||
.project
|
||||
.relate(RelationKind::StateAction, "Record shared work", f.a, work);
|
||||
if let RelationBody::StateAction { phase, .. } =
|
||||
&mut f.project.relations.get_mut(&action).unwrap().body
|
||||
{
|
||||
*phase = StateActionKind::Entry;
|
||||
}
|
||||
let generated = f
|
||||
.project
|
||||
.relate(RelationKind::StateTransition, "Ready\nfor review", f.b, f.c);
|
||||
let edge = Id::from_u128(36_001);
|
||||
let mut relation = f.project.relations.remove(&generated).unwrap();
|
||||
relation.id = edge;
|
||||
if let RelationBody::StateTransition { guard, .. } = &mut relation.body {
|
||||
*guard = "request_ready".into();
|
||||
}
|
||||
f.project.relations.insert(edge, relation);
|
||||
// B is (760,180), 224x94. Its bottom midpoint is (872,274).
|
||||
// Fraction zero plus this authored offset fixes the label center at (440,260),
|
||||
// over A's entry row (y244..270), independently of text width/routing choices.
|
||||
f.project
|
||||
.diagrams
|
||||
.get_mut(&f.diagram)
|
||||
.unwrap()
|
||||
.routes
|
||||
.push(EdgeRoute {
|
||||
edge,
|
||||
waypoints: vec![],
|
||||
source_attachment: Some(EdgeAttachment {
|
||||
side: PortAnchorSide::Bottom,
|
||||
offset: 0.5,
|
||||
}),
|
||||
target_attachment: Some(EdgeAttachment {
|
||||
side: PortAnchorSide::Top,
|
||||
offset: 0.5,
|
||||
}),
|
||||
label: Some(EdgeLabel {
|
||||
fraction: 0.,
|
||||
offset: Position { x: -432., y: -14. },
|
||||
}),
|
||||
});
|
||||
validate_candidate(&f.project).unwrap();
|
||||
(f, edge, action)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_multiline_label_owns_covered_row_and_node_pixels_but_not_exposed_row() {
|
||||
let (f, edge, action) = multiline_label_fixture();
|
||||
let before = f.project.clone();
|
||||
for zoom in [0.5, 1., 2.] {
|
||||
let canvas = canvas(&f, Tool::Select, zoom); // Nonzero pan and canvas origin.
|
||||
let scene = canvas.scene(&State::default()).unwrap();
|
||||
let label = &scene.routed.edges[&edge].label;
|
||||
let layout = label
|
||||
.state_layout
|
||||
.as_ref()
|
||||
.expect("dedicated State label plan");
|
||||
assert_eq!(layout.title_lines, ["Ready", "for review"]);
|
||||
assert_eq!(
|
||||
layout.summary_lines,
|
||||
["External · Completion [request_ready]"]
|
||||
);
|
||||
assert_eq!(label.center, Position { x: 440., y: 260. });
|
||||
assert_eq!(label.bounds.size.height, 36.);
|
||||
let node = scene.view.nodes.iter().find(|n| n.element == f.a).unwrap();
|
||||
let row = state_action_rows(&f.project, node)[0].1;
|
||||
assert!(row.contains(Point::new(440., 260.)));
|
||||
assert!(!row.contains(Point::new(440., 272.)));
|
||||
// Second title cell covers a row; summary covers the State header below it.
|
||||
for at in [Point::new(440., 260.), Point::new(440., 272.)] {
|
||||
assert_eq!(canvas.hit(&scene, at), Some(Hit::Transition(edge)));
|
||||
let events = click(&canvas, &mut State::default(), at);
|
||||
assert!(
|
||||
matches!(events.as_slice(), [Event::Select(context, id)]
|
||||
if *context == canvas.context && *id == edge),
|
||||
"{events:?}"
|
||||
);
|
||||
}
|
||||
let exposed = Point::new(200., 260.);
|
||||
assert!(row.contains(exposed));
|
||||
assert_eq!(
|
||||
canvas.hit(&scene, exposed),
|
||||
Some(Hit::Row {
|
||||
placement: node.id,
|
||||
relation: action
|
||||
})
|
||||
);
|
||||
let events = click(&canvas, &mut State::default(), exposed);
|
||||
assert!(
|
||||
matches!(events.as_slice(), [Event::Select(_, id)] if *id == action),
|
||||
"{events:?}"
|
||||
);
|
||||
for (at, object, target) in [
|
||||
(Point::new(440., 272.), edge, Target::Edge(edge)),
|
||||
(
|
||||
exposed,
|
||||
action,
|
||||
Target::StateRow {
|
||||
placement: node.id,
|
||||
relation: action,
|
||||
},
|
||||
),
|
||||
] {
|
||||
let mut state = State::default();
|
||||
let at = screen(&canvas, at);
|
||||
motion(&canvas, &mut state, at, at);
|
||||
assert!(
|
||||
matches!(input(&canvas, &mut state, mouse::Event::ButtonPressed(mouse::Button::Right), at),
|
||||
Some(Event::ContextMenu { object: actual, selection_target: Some(actual_target), .. })
|
||||
if actual == object && actual_target == target)
|
||||
);
|
||||
}
|
||||
}
|
||||
assert_eq!(
|
||||
f.project, before,
|
||||
"Hit testing and input cannot author layout or semantics"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_overlapping_label_background_selects_last_painted_even_if_lower_is_selected() {
|
||||
let (mut f, lower, _) = multiline_label_fixture();
|
||||
let upper = Id::from_u128(36_002);
|
||||
let mut relation = f.project.relations[&lower].clone();
|
||||
relation.id = upper;
|
||||
relation.alias = "second_multiline_transition".into();
|
||||
f.project.relations.insert(upper, relation);
|
||||
let mut route = f.project.diagrams[&f.diagram].routes[0].clone();
|
||||
route.edge = upper;
|
||||
// Reverse authored route order: stable edge paint order must still decide.
|
||||
f.project
|
||||
.diagrams
|
||||
.get_mut(&f.diagram)
|
||||
.unwrap()
|
||||
.routes
|
||||
.insert(0, route);
|
||||
validate_candidate(&f.project).unwrap();
|
||||
let mut canvas = canvas(&f, Tool::Select, 1.);
|
||||
canvas.selected = lower;
|
||||
let selection = group_selection(&canvas, [Target::Edge(lower)]);
|
||||
canvas.selection = Some(&selection);
|
||||
let scene = canvas.scene(&State::default()).unwrap();
|
||||
assert_eq!(
|
||||
scene.routed.edges[&lower].label.bounds,
|
||||
scene.routed.edges[&upper].label.bounds
|
||||
);
|
||||
let at = Point::new(440., 260.);
|
||||
assert_eq!(canvas.hit(&scene, at), Some(Hit::Transition(upper)));
|
||||
let events = click(&canvas, &mut State::default(), at);
|
||||
assert!(
|
||||
matches!(events.as_slice(), [Event::Selection(SelectionEvent::Choose(_, Target::Edge(id), Choice::Replace))]
|
||||
if *id == upper),
|
||||
"{events:?}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_multiline_label_and_exposed_row_keep_shift_identity_and_refuse_mixed_drag() {
|
||||
let (f, edge, action) = multiline_label_fixture();
|
||||
let before = f.project.clone();
|
||||
let mut canvas = canvas(&f, Tool::Select, 0.75);
|
||||
let row = Target::StateRow {
|
||||
placement: placement(&f, f.a),
|
||||
relation: action,
|
||||
};
|
||||
let selection = group_selection(&canvas, [Target::Edge(edge), row.clone()]);
|
||||
let snapshot = selection
|
||||
.snapshot(selection_context(canvas.context))
|
||||
.unwrap();
|
||||
canvas.selection = Some(&selection);
|
||||
canvas.selected = edge;
|
||||
for (world, target) in [
|
||||
(Point::new(440., 260.), Target::Edge(edge)),
|
||||
(Point::new(200., 260.), row),
|
||||
] {
|
||||
let at = screen(&canvas, world);
|
||||
let mut state = State::default();
|
||||
assert!(
|
||||
canvas::Program::update(
|
||||
&canvas,
|
||||
&mut state,
|
||||
&canvas::Event::Keyboard(keyboard::Event::ModifiersChanged(
|
||||
keyboard::Modifiers::SHIFT
|
||||
)),
|
||||
bounds(),
|
||||
mouse::Cursor::Unavailable
|
||||
)
|
||||
.is_none()
|
||||
);
|
||||
motion(&canvas, &mut state, at, at);
|
||||
assert!(
|
||||
matches!(input(&canvas, &mut state, mouse::Event::ButtonPressed(mouse::Button::Left), at),
|
||||
Some(Event::Selection(SelectionEvent::Choose(context, actual, Choice::Toggle)))
|
||||
if context == selection_context(canvas.context) && actual == target)
|
||||
);
|
||||
assert!(state.group.is_none() && state.press.is_none() && state.bend.is_none());
|
||||
assert!(
|
||||
input(
|
||||
&canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonReleased(mouse::Button::Left),
|
||||
at
|
||||
)
|
||||
.is_none()
|
||||
);
|
||||
|
||||
let mut state = State::default();
|
||||
motion(&canvas, &mut state, at, at);
|
||||
assert!(
|
||||
input(
|
||||
&canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonPressed(mouse::Button::Left),
|
||||
at
|
||||
)
|
||||
.is_none()
|
||||
);
|
||||
assert!(state.group.is_some() && state.press.is_none() && state.bend.is_none());
|
||||
let end = at + Vector::new(30., 20.);
|
||||
motion(&canvas, &mut state, end, end);
|
||||
assert!(canvas.group_preview_key(&state, Some(bounds())).is_none());
|
||||
assert!(
|
||||
matches!(input(&canvas, &mut state, mouse::Event::ButtonReleased(mouse::Button::Left), end),
|
||||
Some(Event::Selection(SelectionEvent::Refuse(actual, _))) if actual == snapshot)
|
||||
);
|
||||
assert!(state.group.is_none() && state.bend_preview.is_none());
|
||||
}
|
||||
assert_eq!(
|
||||
selection
|
||||
.snapshot(selection_context(canvas.context))
|
||||
.unwrap(),
|
||||
snapshot
|
||||
);
|
||||
assert_eq!(f.project, before);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_multiline_label_group_preview_replaces_old_hit_rectangle_and_cancel_restores_it() {
|
||||
let (f, edge, action) = multiline_label_fixture();
|
||||
let before = f.project.clone();
|
||||
let mut canvas = canvas(&f, Tool::Select, 0.75);
|
||||
let selection = group_selection(
|
||||
&canvas,
|
||||
[
|
||||
Target::Placement(placement(&f, f.b)),
|
||||
Target::Placement(placement(&f, f.c)),
|
||||
],
|
||||
);
|
||||
canvas.selection = Some(&selection);
|
||||
canvas.selected = f.c;
|
||||
let mut state = State::default();
|
||||
let baseline = canvas.scene(&state).unwrap();
|
||||
let old = Point::new(440., 260.);
|
||||
let moved = Point::new(440., 580.);
|
||||
assert_eq!(canvas.hit(&baseline, old), Some(Hit::Transition(edge)));
|
||||
let start = screen(&canvas, Point::new(780., 200.));
|
||||
let end = start + Vector::new(0., 320. * canvas.scale());
|
||||
motion(&canvas, &mut state, start, end);
|
||||
assert!(
|
||||
input(
|
||||
&canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonPressed(mouse::Button::Left),
|
||||
end
|
||||
)
|
||||
.is_none()
|
||||
);
|
||||
assert!(state.group.is_some());
|
||||
motion(&canvas, &mut state, end, end);
|
||||
let preview = canvas.scene_with_bounds(&state, Some(bounds())).unwrap();
|
||||
assert_eq!(
|
||||
preview.routed.edges[&edge].label.center,
|
||||
Position { x: 440., y: 580. }
|
||||
);
|
||||
assert_eq!(
|
||||
preview.routed.edges[&edge].label.state_layout,
|
||||
baseline.routed.edges[&edge].label.state_layout
|
||||
);
|
||||
assert_eq!(canvas.hit(&preview, moved), Some(Hit::Transition(edge)));
|
||||
assert_eq!(
|
||||
canvas.hit(&preview, old),
|
||||
Some(Hit::Row {
|
||||
placement: placement(&f, f.a),
|
||||
relation: action
|
||||
})
|
||||
);
|
||||
assert_eq!(f.project, before, "Group preview is derived only");
|
||||
assert!(
|
||||
group_key(
|
||||
&canvas,
|
||||
&mut state,
|
||||
keyboard::key::Named::Escape,
|
||||
keyboard::Modifiers::empty()
|
||||
)
|
||||
.is_none()
|
||||
);
|
||||
assert!(state.group.is_none());
|
||||
let restored = canvas.scene_with_bounds(&state, Some(bounds())).unwrap();
|
||||
assert_eq!(
|
||||
restored.routed.edges[&edge].label,
|
||||
baseline.routed.edges[&edge].label
|
||||
);
|
||||
assert_eq!(canvas.hit(&restored, old), Some(Hit::Transition(edge)));
|
||||
assert_ne!(canvas.hit(&restored, moved), Some(Hit::Transition(edge)));
|
||||
assert!(
|
||||
input(
|
||||
&canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonReleased(mouse::Button::Left),
|
||||
end
|
||||
)
|
||||
.is_none()
|
||||
);
|
||||
assert_eq!(f.project, before);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_multiline_label_group_commit_matches_fixed_project_and_one_step_history() {
|
||||
let (f, edge, _) = multiline_label_fixture();
|
||||
let b = placement(&f, f.b);
|
||||
let c = placement(&f, f.c);
|
||||
let before = f.project.clone();
|
||||
// Declare the complete expected model before driving input. No event, preview,
|
||||
// movement planner or resulting document supplies the expected displacement.
|
||||
let mut expected = before.clone();
|
||||
for id in [b, c] {
|
||||
let node = expected
|
||||
.diagrams
|
||||
.get_mut(&f.diagram)
|
||||
.unwrap()
|
||||
.nodes
|
||||
.get_mut(&id)
|
||||
.unwrap();
|
||||
node.position.x += 40.;
|
||||
node.position.y += 40.;
|
||||
}
|
||||
let original_route = before.diagrams[&f.diagram].routes[0].clone();
|
||||
let mut document = Document::from_project(before.clone(), Default::default()).unwrap();
|
||||
let original_source = document.bundle().clone();
|
||||
let mut view_canvas = canvas(&f, Tool::Select, 0.75);
|
||||
let selection = group_selection(&view_canvas, [Target::Placement(b), Target::Placement(c)]);
|
||||
let snapshot = selection
|
||||
.snapshot(selection_context(view_canvas.context))
|
||||
.unwrap();
|
||||
view_canvas.selection = Some(&selection);
|
||||
view_canvas.selected = f.c;
|
||||
let mut state = State::default();
|
||||
let baseline = view_canvas.scene(&state).unwrap();
|
||||
let baseline_label = &baseline.routed.edges[&edge].label;
|
||||
assert_eq!(baseline_label.center, Position { x: 440., y: 260. });
|
||||
// Explicit 0.75 scale: thirty screen pixels is the declared forty world
|
||||
// units. The nonzero pan/origin and ordered pointer helpers stay in play.
|
||||
let start = screen(&view_canvas, Point::new(780., 200.));
|
||||
let end = start + Vector::new(30., 30.);
|
||||
motion(&view_canvas, &mut state, start, end);
|
||||
assert!(
|
||||
input(
|
||||
&view_canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonPressed(mouse::Button::Left),
|
||||
end
|
||||
)
|
||||
.is_none()
|
||||
);
|
||||
assert!(state.group.is_some());
|
||||
motion(&view_canvas, &mut state, end, end);
|
||||
let preview = view_canvas
|
||||
.scene_with_bounds(&state, Some(bounds()))
|
||||
.unwrap();
|
||||
let preview_label = &preview.routed.edges[&edge].label;
|
||||
assert_eq!(preview_label.center, Position { x: 480., y: 300. });
|
||||
assert_eq!(
|
||||
preview_label.bounds.position,
|
||||
Position {
|
||||
x: baseline_label.bounds.position.x + 40.,
|
||||
y: baseline_label.bounds.position.y + 40.,
|
||||
}
|
||||
);
|
||||
assert_eq!(preview_label.bounds.size, baseline_label.bounds.size);
|
||||
assert_eq!(preview_label.state_layout, baseline_label.state_layout);
|
||||
assert_eq!(
|
||||
f.project, before,
|
||||
"Preview must not author its derived label"
|
||||
);
|
||||
let event = input(
|
||||
&view_canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonReleased(mouse::Button::Left),
|
||||
end,
|
||||
)
|
||||
.unwrap();
|
||||
let Event::Selection(SelectionEvent::Move(actual_snapshot, delta)) = event else {
|
||||
panic!("Expected a group movement event, got {event:?}");
|
||||
};
|
||||
assert_eq!(actual_snapshot, snapshot);
|
||||
assert_eq!(delta, Position { x: 40., y: 40. });
|
||||
assert!(state.group.is_none() && state.press.is_none());
|
||||
assert!(
|
||||
input(
|
||||
&view_canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonReleased(mouse::Button::Left),
|
||||
end
|
||||
)
|
||||
.is_none()
|
||||
);
|
||||
// This is the same production snapshot-to-command boundary used by App's
|
||||
// SelectionEvent::Move handler; App admission has its existing separate tests.
|
||||
let ids = crate::app::multiselect::placements(&actual_snapshot).unwrap();
|
||||
let command =
|
||||
oa_core::diagram_edit::translate_placements(document.project(), f.diagram, &ids, delta)
|
||||
.unwrap();
|
||||
document.execute(command).unwrap();
|
||||
assert_eq!(document.project(), &expected);
|
||||
assert_eq!(
|
||||
document.project().diagrams[&f.diagram].routes[0],
|
||||
original_route,
|
||||
"Authored fraction, offset, attachments and empty waypoints remain exact"
|
||||
);
|
||||
let committed = StateCanvas {
|
||||
project: document.project(),
|
||||
..canvas(&f, Tool::Select, 0.75)
|
||||
}
|
||||
.scene(&State::default())
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
committed.routed.edges[&edge].label, *preview_label,
|
||||
"Measured settled label, including raw text and every line cell, matches preview"
|
||||
);
|
||||
let edited_source = document.bundle().clone();
|
||||
assert_ne!(
|
||||
edited_source, original_source,
|
||||
"The group move is a real source edit"
|
||||
);
|
||||
assert!(document.undo());
|
||||
assert_eq!(document.project(), &before);
|
||||
assert_eq!(document.bundle(), &original_source);
|
||||
assert!(
|
||||
!document.undo(),
|
||||
"One group release produces exactly one history entry"
|
||||
);
|
||||
assert!(document.redo());
|
||||
assert_eq!(document.project(), &expected);
|
||||
assert_eq!(document.bundle(), &edited_source);
|
||||
assert!(!document.redo());
|
||||
assert_eq!(
|
||||
selection
|
||||
.snapshot(selection_context(view_canvas.context))
|
||||
.unwrap(),
|
||||
snapshot
|
||||
);
|
||||
assert_eq!(f.project, before);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::{
|
||||
app::Message,
|
||||
route_edit::{self, Context, Event as RouteEvent, Gesture, Handle, point, position},
|
||||
state_label::route_diagram,
|
||||
style,
|
||||
views::short,
|
||||
};
|
||||
@@ -13,7 +14,7 @@ use iced::{
|
||||
};
|
||||
use oa_core::{
|
||||
projection::{ProjectedNode, ProjectedView, project_view},
|
||||
routing::{RoutedView, route_diagram},
|
||||
routing::{RoutedView, StateLabelLayout},
|
||||
*,
|
||||
};
|
||||
use std::{
|
||||
@@ -34,6 +35,9 @@ mod lifecycle_tests;
|
||||
#[path = "diagram/port_hit_tests.rs"]
|
||||
mod port_hit_tests;
|
||||
#[cfg(test)]
|
||||
#[path = "diagram/state_label_input_tests.rs"]
|
||||
mod state_label_input_tests;
|
||||
#[cfg(test)]
|
||||
#[path = "diagram/view_options_tests.rs"]
|
||||
mod view_options_tests;
|
||||
|
||||
@@ -325,7 +329,12 @@ impl DiagramCanvas<'_> {
|
||||
request.bend = Some(index);
|
||||
return request;
|
||||
}
|
||||
if let Some(port) = self.hit_port(&scene.view, local) {
|
||||
if let Some(edge) = self.hit_state_label(&scene.routed, local) {
|
||||
request.object = edge;
|
||||
request.route_point =
|
||||
routing::project_onto_polyline(&scene.routed.edges[&edge].points, position(world))
|
||||
.map(|p| p.point);
|
||||
} else if let Some(port) = self.hit_port(&scene.view, local) {
|
||||
request.object = port.element;
|
||||
} else if let Some(node) = self.hit(&scene.view, local) {
|
||||
request.object = self.project.diagrams[&self.diagram].nodes[&node].element;
|
||||
@@ -424,13 +433,35 @@ impl DiagramCanvas<'_> {
|
||||
})
|
||||
.map(|(end, owner, _)| (end, owner))
|
||||
}
|
||||
fn hit_state_label(&self, routed: &RoutedView, p: Point) -> Option<Id> {
|
||||
let world = self.world(p);
|
||||
// State labels paint after nodes, in BTree order. Hit the frontmost first.
|
||||
routed
|
||||
.edges
|
||||
.values()
|
||||
.rev()
|
||||
.find(|edge| {
|
||||
edge.label.state_layout.is_some()
|
||||
&& !edge.label.text.is_empty()
|
||||
&& Rectangle::new(
|
||||
point(edge.label.bounds.position),
|
||||
Size::new(edge.label.bounds.size.width, edge.label.bounds.size.height),
|
||||
)
|
||||
.contains(world)
|
||||
})
|
||||
.map(|edge| edge.id)
|
||||
}
|
||||
fn hit_label(&self, routed: &RoutedView, p: Point) -> Option<Id> {
|
||||
if let Some(edge) = self.hit_state_label(routed, p) {
|
||||
return Some(edge);
|
||||
}
|
||||
let p = self.world(p);
|
||||
routed
|
||||
.edges
|
||||
.values()
|
||||
.filter(|edge| {
|
||||
!edge.label.text.is_empty()
|
||||
edge.label.state_layout.is_none()
|
||||
&& !edge.label.text.is_empty()
|
||||
&& Rectangle::new(
|
||||
point(edge.label.bounds.position),
|
||||
Size::new(edge.label.bounds.size.width, edge.label.bounds.size.height),
|
||||
@@ -569,7 +600,7 @@ impl DiagramCanvas<'_> {
|
||||
.as_ref()
|
||||
.filter(|g| g.context == self.context)
|
||||
{
|
||||
oa_core::routing::route_edge_preview(
|
||||
crate::state_label::route_edge_preview(
|
||||
self.project,
|
||||
&diagram,
|
||||
&view,
|
||||
@@ -962,8 +993,11 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
|
||||
);
|
||||
}
|
||||
let label = &edge.label;
|
||||
if self.hit(view, p).is_none()
|
||||
&& !label.text.is_empty()
|
||||
if (if label.state_layout.is_some() {
|
||||
self.hit_state_label(&scene.routed, p) == Some(edge.id)
|
||||
} else {
|
||||
self.hit(view, p).is_none()
|
||||
}) && !label.text.is_empty()
|
||||
&& Rectangle::new(
|
||||
point(label.bounds.position),
|
||||
Size::new(label.bounds.size.width, label.bounds.size.height),
|
||||
@@ -982,6 +1016,9 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
|
||||
return Some(Action::capture());
|
||||
}
|
||||
}
|
||||
if let Some(edge) = self.hit_state_label(&scene.routed, p) {
|
||||
return Some(Action::publish(Message::Select(edge)).and_capture());
|
||||
}
|
||||
if let Some(port) = self.hit_port(view, p) {
|
||||
if self.editable
|
||||
&& let Some(owner) = view.nodes.iter().find(|n| n.id == port.owner)
|
||||
@@ -993,10 +1030,7 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
|
||||
world,
|
||||
));
|
||||
}
|
||||
return Some(
|
||||
Action::publish(Message::CanvasSelect(self.context, port.element))
|
||||
.and_capture(),
|
||||
);
|
||||
return Some(Action::publish(Message::Select(port.element)).and_capture());
|
||||
}
|
||||
if let Some(id) = self.hit(view, p) {
|
||||
let position = self
|
||||
@@ -1013,7 +1047,7 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
|
||||
.hit_label(&scene.routed, p)
|
||||
.or_else(|| self.hit_association_label(&scene.routed, p))
|
||||
{
|
||||
Some(Action::publish(Message::CanvasSelect(self.context, id)).and_capture())
|
||||
Some(Action::publish(Message::Select(id)).and_capture())
|
||||
} else if let Some((id, segment)) = self.hit_edge(&scene.routed, p) {
|
||||
if id == self.selected
|
||||
&& self.editable
|
||||
@@ -1029,7 +1063,7 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
|
||||
self.begin_route(state, world, Handle::Bend(index), route);
|
||||
Some(Action::capture())
|
||||
} else {
|
||||
Some(Action::publish(Message::CanvasSelect(self.context, id)).and_capture())
|
||||
Some(Action::publish(Message::Select(id)).and_capture())
|
||||
}
|
||||
} else {
|
||||
state.pan_start = Some((mouse::Button::Left, p));
|
||||
@@ -1351,7 +1385,7 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
|
||||
Stroke::default().with_color(color).with_width(1.7),
|
||||
);
|
||||
}
|
||||
if !routed.label.text.is_empty() {
|
||||
if routed.label.state_layout.is_none() && !routed.label.text.is_empty() {
|
||||
let label = &routed.label;
|
||||
f.fill_rectangle(
|
||||
point(label.bounds.position),
|
||||
@@ -1490,6 +1524,47 @@ impl canvas::Program<Message> for DiagramCanvas<'_> {
|
||||
f.fill(&Path::circle(center, 1.5), color);
|
||||
}
|
||||
}
|
||||
// State labels follow nodes, matching the dedicated State canvas layer.
|
||||
for routed in scene.routed.edges.values() {
|
||||
let label = &routed.label;
|
||||
let active = self.selected == routed.id
|
||||
|| highlighted.contains(&routed.id)
|
||||
|| self.selection_contains(crate::diagram_usage::Target::Edge(routed.id));
|
||||
if label.state_layout.is_some() && !label.text.is_empty() {
|
||||
f.fill_rectangle(
|
||||
point(label.bounds.position),
|
||||
Size::new(label.bounds.size.width, label.bounds.size.height),
|
||||
Color::WHITE,
|
||||
);
|
||||
if let Some(plan) = &label.state_layout {
|
||||
for (lines, title) in [(&plan.title_lines, true), (&plan.summary_lines, false)]
|
||||
{
|
||||
for (index, line) in lines.iter().enumerate() {
|
||||
let offset = if title {
|
||||
plan.title_line_position(index)
|
||||
} else {
|
||||
plan.summary_line_position(index)
|
||||
};
|
||||
f.fill_text(Text {
|
||||
content: line.clone(),
|
||||
position: point(label.bounds.position)
|
||||
+ Vector::new(offset.x, offset.y),
|
||||
color: if title {
|
||||
if active { style::TEAL } else { style::INK }
|
||||
} else {
|
||||
style::MUTED
|
||||
},
|
||||
size: StateLabelLayout::FONT_SIZE.into(),
|
||||
line_height: iced::widget::text::LineHeight::Absolute(
|
||||
StateLabelLayout::LINE_HEIGHT.into(),
|
||||
),
|
||||
..Default::default()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(bounds) = self.navigation_focus {
|
||||
f.stroke(
|
||||
&Path::rectangle(bounds.position(), bounds.size()),
|
||||
@@ -1946,6 +2021,34 @@ impl std::fmt::Display for ExportError {
|
||||
}
|
||||
impl std::error::Error for ExportError {}
|
||||
|
||||
fn edge_label_svg(label: &routing::EdgeLabelGeometry) -> String {
|
||||
if label.text.is_empty() {
|
||||
return String::new();
|
||||
}
|
||||
let mut svg = format!(
|
||||
"<rect x=\"{}\" y=\"{}\" width=\"{}\" height=\"{}\" fill=\"white\"/>",
|
||||
label.bounds.position.x,
|
||||
label.bounds.position.y,
|
||||
label.bounds.size.width,
|
||||
label.bounds.size.height
|
||||
);
|
||||
if let Some(plan) = &label.state_layout {
|
||||
for (lines, title) in [(&plan.title_lines, true), (&plan.summary_lines, false)] {
|
||||
for (index, line) in lines.iter().enumerate() {
|
||||
let offset = if title {
|
||||
plan.title_line_position(index)
|
||||
} else {
|
||||
plan.summary_line_position(index)
|
||||
};
|
||||
svg.push_str(&format!("<text x=\"{}\" y=\"{}\" dominant-baseline=\"text-before-edge\" xml:space=\"preserve\" font-family=\"sans-serif\" font-size=\"{}\" fill=\"{}\">{}</text>", label.bounds.position.x + offset.x, label.bounds.position.y + offset.y, StateLabelLayout::FONT_SIZE, hex(if title { style::INK } else { style::MUTED }), escape(line)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
svg.push_str(&format!("<text x=\"{}\" y=\"{}\" text-anchor=\"middle\" dominant-baseline=\"central\" font-family=\"sans-serif\" font-size=\"13\" fill=\"#637487\">{}</text>",label.center.x,label.center.y,escape(&label.text)));
|
||||
}
|
||||
svg
|
||||
}
|
||||
|
||||
pub fn export_svg(p: &Project, diagram: Id) -> Result<String, ExportError> {
|
||||
let d = p
|
||||
.diagrams
|
||||
@@ -2032,8 +2135,8 @@ pub fn export_svg(p: &Project, diagram: Id) -> Result<String, ExportError> {
|
||||
.join(" ");
|
||||
svg.push_str(&format!("<path data-edge=\"{}\" d=\"{path}\" fill=\"none\" stroke=\"#8999a9\" stroke-width=\"1.5\"{dashed}{arrow}><title>{}</title></path>",edge.id,escape(p.named(edge.id))));
|
||||
let label = &route.label;
|
||||
if !label.text.is_empty() {
|
||||
svg.push_str(&format!("<rect x=\"{}\" y=\"{}\" width=\"{}\" height=\"{}\" fill=\"white\"/><text x=\"{}\" y=\"{}\" text-anchor=\"middle\" dominant-baseline=\"central\" font-family=\"sans-serif\" font-size=\"13\" fill=\"#637487\">{}</text>",label.bounds.position.x,label.bounds.position.y,label.bounds.size.width,label.bounds.size.height,label.center.x,label.center.y,escape(&label.text)));
|
||||
if label.state_layout.is_none() {
|
||||
svg.push_str(&edge_label_svg(label));
|
||||
}
|
||||
if let Some(relation) = p.relations.get(&edge.id) {
|
||||
for end in routing::association_end_geometry(relation, route) {
|
||||
@@ -2092,6 +2195,11 @@ pub fn export_svg(p: &Project, diagram: Id) -> Result<String, ExportError> {
|
||||
}
|
||||
svg.push_str("</g>");
|
||||
}
|
||||
for route in routed.edges.values() {
|
||||
if route.label.state_layout.is_some() {
|
||||
svg.push_str(&edge_label_svg(&route.label));
|
||||
}
|
||||
}
|
||||
svg.push_str("</svg>");
|
||||
Ok(svg)
|
||||
}
|
||||
@@ -2444,7 +2552,7 @@ mod tests {
|
||||
.unwrap()
|
||||
.into_inner()
|
||||
.0;
|
||||
assert!(matches!(selected,Some(Message::CanvasSelect(_, id)) if id==port.element));
|
||||
assert!(matches!(selected,Some(Message::Select(id)) if id==port.element));
|
||||
let request = canvas.context_request(
|
||||
&state,
|
||||
click,
|
||||
@@ -2949,6 +3057,94 @@ mod tests {
|
||||
);
|
||||
assert!(state.route_drag.is_none());
|
||||
}
|
||||
#[test]
|
||||
fn state_svg_paints_separate_escaped_lines_at_shared_layout_origins() {
|
||||
let plan = StateLabelLayout::new(
|
||||
"Ready\r\nfor <review>&",
|
||||
"External\nCompletion [ready]",
|
||||
&|line| line.len() as f32 * 8.0,
|
||||
);
|
||||
let label = routing::EdgeLabelGeometry {
|
||||
text: "External\nCompletion [ready]".into(),
|
||||
fraction: 0.5,
|
||||
anchor: Position { x: 0.0, y: 0.0 },
|
||||
center: Position { x: 0.0, y: 0.0 },
|
||||
bounds: routing::RoutingBounds {
|
||||
position: Position { x: 100.0, y: 200.0 },
|
||||
size: plan.size(),
|
||||
},
|
||||
state_layout: Some(plan),
|
||||
};
|
||||
let svg = edge_label_svg(&label);
|
||||
assert_eq!(svg.matches("<text ").count(), 4);
|
||||
for (y, color, text) in [
|
||||
(200, "#18212c", "Ready"),
|
||||
(212, "#18212c", "for <review>&"),
|
||||
(224, "#4b5968", "External"),
|
||||
(236, "#4b5968", "Completion [ready]"),
|
||||
] {
|
||||
assert!(svg.contains(&format!("<text x=\"105\" y=\"{y}\" dominant-baseline=\"text-before-edge\" xml:space=\"preserve\" font-family=\"sans-serif\" font-size=\"10\" fill=\"{color}\">{text}</text>")), "{svg}");
|
||||
}
|
||||
assert!(svg.contains("height=\"48\""));
|
||||
assert!(!svg.contains("text-anchor=\"middle\""));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_export_routes_measured_multiline_label_above_nodes() {
|
||||
let mut p = Project::empty();
|
||||
let owner = p
|
||||
.add_element(Kind::Entity, Layer::Oa, "Crew", None)
|
||||
.unwrap();
|
||||
let machine = p
|
||||
.add_element(Kind::StateMachine, Layer::Oa, "Modes", Some(owner))
|
||||
.unwrap();
|
||||
let region = p
|
||||
.add_element(Kind::Region, Layer::Oa, "Main", Some(machine))
|
||||
.unwrap();
|
||||
let a = p
|
||||
.add_element(Kind::State, Layer::Oa, "Source state", Some(region))
|
||||
.unwrap();
|
||||
let b = p
|
||||
.add_element(Kind::State, Layer::Oa, "Target state", Some(region))
|
||||
.unwrap();
|
||||
let edge = p.relate(RelationKind::StateTransition, "Ready\nfor <review>&", a, b);
|
||||
let diagram = Id::new_v4();
|
||||
p.diagrams.insert(
|
||||
diagram,
|
||||
Diagram {
|
||||
id: diagram,
|
||||
alias: "state_export".into(),
|
||||
name: "State export".into(),
|
||||
description: String::new(),
|
||||
layer: Layer::Oa,
|
||||
projection: ProjectionKind::StateMachine { machine },
|
||||
view_options: Default::default(),
|
||||
nodes: BTreeMap::new(),
|
||||
layout: None,
|
||||
routes: vec![],
|
||||
},
|
||||
);
|
||||
p.place(diagram, a, Position { x: 100.0, y: 100.0 });
|
||||
p.place(diagram, b, Position { x: 600.0, y: 100.0 });
|
||||
let view = project_view(&p, diagram);
|
||||
let routed = route_diagram(&p, &p.diagrams[&diagram], &view);
|
||||
let label = &routed.edges[&edge].label;
|
||||
let plan = label.state_layout.as_ref().unwrap();
|
||||
assert_eq!(plan.title_lines, ["Ready", "for <review>&"]);
|
||||
assert_eq!(plan.summary_lines.len(), 1);
|
||||
assert_eq!(label.bounds.size.height, 36.0);
|
||||
let svg = export_svg(&p, diagram).unwrap();
|
||||
let label_svg = edge_label_svg(label);
|
||||
assert!(svg.ends_with(&format!("{label_svg}</svg>")));
|
||||
assert!(svg.find("Target state</text>").unwrap() < svg.find("Ready</text>").unwrap());
|
||||
assert!(svg.contains("for <review>&</text>"));
|
||||
assert!(svg.contains(&format!(
|
||||
"x=\"{}\" y=\"{}\" dominant-baseline=\"text-before-edge\"",
|
||||
label.bounds.position.x + 5.0,
|
||||
label.bounds.position.y + 24.0
|
||||
)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn routed_svg_has_same_polyline_label_and_bounds_as_canvas_scene() {
|
||||
let (mut p, diagram, edge) = route_fixture();
|
||||
@@ -3057,7 +3253,7 @@ mod tests {
|
||||
let mut state = State::default();
|
||||
assert_eq!(canvas.hit_association_label(&routed, at), Some(edge));
|
||||
assert!(
|
||||
matches!(pointer(&canvas,&mut state,mouse::Event::ButtonPressed(mouse::Button::Left),at),Some(Message::CanvasSelect(_, id)) if id==edge)
|
||||
matches!(pointer(&canvas,&mut state,mouse::Event::ButtonPressed(mouse::Button::Left),at),Some(Message::Select(id)) if id==edge)
|
||||
);
|
||||
assert!(
|
||||
state.route_drag.is_none(),
|
||||
@@ -3107,7 +3303,7 @@ mod tests {
|
||||
let center = scene.routed.edges[&edge].label.center;
|
||||
let screen = point(center) + canvas.pan;
|
||||
assert!(
|
||||
matches!(pointer(&canvas,&mut state,mouse::Event::ButtonPressed(mouse::Button::Left),screen),Some(Message::CanvasSelect(_, id)) if id==edge)
|
||||
matches!(pointer(&canvas,&mut state,mouse::Event::ButtonPressed(mouse::Button::Left),screen),Some(Message::Select(id)) if id==edge)
|
||||
);
|
||||
canvas.selected = edge;
|
||||
pointer(
|
||||
|
||||
@@ -196,8 +196,27 @@ impl DiagramCanvas<'_> {
|
||||
let pointer = cursor.position()?;
|
||||
let local = Point::new(pointer.x - bounds.x, pointer.y - bounds.y);
|
||||
let scene = self.scene(state);
|
||||
let world = self.world(local);
|
||||
// Preserve foreground selected handles without bypassing Shift or the
|
||||
// mixed-group admission/refusal lifecycle below.
|
||||
let state_handle = self.project.diagrams[&self.diagram]
|
||||
.projection
|
||||
.state_machine()
|
||||
.is_some()
|
||||
&& scene.routed.edges.get(&self.selected).is_some_and(|edge| {
|
||||
!edge.custom_suspended
|
||||
&& (self.attachment_at(&scene, world).is_some()
|
||||
|| edge
|
||||
.pins
|
||||
.iter()
|
||||
.any(|pin| world.distance(point(*pin)) <= 8. / self.zoom))
|
||||
});
|
||||
let target = if self.allocation_surface() {
|
||||
self.allocation_press_target(&scene, local)
|
||||
} else if state_handle {
|
||||
Some(Target::Edge(self.selected))
|
||||
} else if let Some(id) = self.hit_state_label(&scene.routed, local) {
|
||||
Some(Target::Edge(id))
|
||||
} else if let Some(port) = self.hit_port(&scene.view, local) {
|
||||
Some(Target::Port {
|
||||
port: port.element,
|
||||
|
||||
@@ -179,7 +179,7 @@ fn coalesced_port_drag_commits_once_through_app_and_source_history() {
|
||||
zoom,
|
||||
);
|
||||
assert_eq!(messages.len(), 2);
|
||||
assert!(matches!(&messages[0],Message::CanvasSelect(_, id)if *id==output));
|
||||
assert!(matches!(&messages[0],Message::Select(id)if *id==output));
|
||||
assert!(
|
||||
matches!(&messages[1],Message::PortAnchor(port_edit::Event::Commit(_,_,anchor))if anchor.port==output&&anchor.side==PortAnchorSide::Top)
|
||||
);
|
||||
@@ -251,7 +251,7 @@ fn menu_captured_motion_must_not_turn_following_click_into_old_port_drag() {
|
||||
b,
|
||||
);
|
||||
let picked = match &press {
|
||||
Message::CanvasSelect(_, id) => Some(*id),
|
||||
Message::Select(id) => Some(*id),
|
||||
_ => None,
|
||||
};
|
||||
let release_debug = format!("{release:?}");
|
||||
@@ -300,7 +300,7 @@ fn drag_from_already_selected_stationary_port_keeps_source_between_batches() {
|
||||
.filter_map(|e| event(&c, &mut state, e, b))
|
||||
.collect();
|
||||
assert!(
|
||||
matches!(messages.first(),Some(Message::CanvasSelect(_, id)) if *id==output),
|
||||
matches!(messages.first(),Some(Message::Select(id)) if *id==output),
|
||||
"Stationary source was lost between batches: {messages:?}"
|
||||
);
|
||||
assert!(
|
||||
|
||||
@@ -165,7 +165,7 @@ fn nested_owner_palette_selection_drag_and_context_menu_pick_the_same_port() {
|
||||
.unwrap()
|
||||
.into_inner()
|
||||
.0;
|
||||
assert!(matches!(press, Some(Message::CanvasSelect(_, id)) if id == port.element));
|
||||
assert!(matches!(press, Some(Message::Select(id)) if id == port.element));
|
||||
assert_eq!(state.port_drag.as_ref().unwrap().anchor.port, port.element);
|
||||
let menu = canvas.context_request(&state, at, bounds);
|
||||
assert_eq!(menu.object, port.element);
|
||||
|
||||
@@ -375,7 +375,7 @@ mod tests {
|
||||
messages.extend(message);
|
||||
}
|
||||
}
|
||||
assert!(matches!(messages.first(), Some(Message::CanvasSelect(_, id)) if *id == port));
|
||||
assert!(matches!(messages.first(), Some(Message::Select(id)) if *id == port));
|
||||
assert!(
|
||||
matches!(messages.last(), Some(Message::PortAnchor(crate::port_edit::Event::Commit(_, _, anchor))) if anchor.port == port && anchor.side == PortAnchorSide::Top)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
use super::*;
|
||||
use crate::{
|
||||
app::multiselect::{Choice, Event, context},
|
||||
diagram_selection::Selection,
|
||||
diagram_usage::Target,
|
||||
};
|
||||
|
||||
fn fixture() -> (Project, Id, Id, Id, Id) {
|
||||
let mut p = Project::empty();
|
||||
let owner = p
|
||||
.add_element(Kind::Entity, Layer::Oa, "Crew", None)
|
||||
.unwrap();
|
||||
let machine = p
|
||||
.add_element(Kind::StateMachine, Layer::Oa, "Modes", Some(owner))
|
||||
.unwrap();
|
||||
let region = p
|
||||
.add_element(Kind::Region, Layer::Oa, "Main", Some(machine))
|
||||
.unwrap();
|
||||
let a = p
|
||||
.add_element(Kind::State, Layer::Oa, "A", Some(region))
|
||||
.unwrap();
|
||||
let b = p
|
||||
.add_element(Kind::State, Layer::Oa, "B", Some(region))
|
||||
.unwrap();
|
||||
let mut edges = [
|
||||
p.relate(RelationKind::StateTransition, "Ready\nfor review", a, b),
|
||||
p.relate(RelationKind::StateTransition, "Ready\nfor review", a, b),
|
||||
];
|
||||
edges.sort();
|
||||
let diagram = Id::new_v4();
|
||||
p.diagrams.insert(
|
||||
diagram,
|
||||
Diagram {
|
||||
id: diagram,
|
||||
alias: "state_input".into(),
|
||||
name: "State input".into(),
|
||||
description: String::new(),
|
||||
layer: Layer::Oa,
|
||||
projection: ProjectionKind::StateMachine { machine },
|
||||
view_options: Default::default(),
|
||||
nodes: BTreeMap::new(),
|
||||
layout: None,
|
||||
routes: edges
|
||||
.iter()
|
||||
.map(|edge| EdgeRoute {
|
||||
edge: *edge,
|
||||
source_attachment: None,
|
||||
target_attachment: None,
|
||||
waypoints: vec![Position { x: 200., y: 150. }],
|
||||
label: None,
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
);
|
||||
let node = p.place(diagram, a, Position { x: 100., y: 100. });
|
||||
p.place(diagram, b, Position { x: 650., y: 100. });
|
||||
let routed = route_diagram(&p, &p.diagrams[&diagram], &project_view(&p, diagram));
|
||||
for route in &mut p.diagrams.get_mut(&diagram).unwrap().routes {
|
||||
let label = &routed.edges[&route.edge].label;
|
||||
route.label = Some(EdgeLabel {
|
||||
fraction: label.fraction,
|
||||
offset: Position {
|
||||
x: 200. - label.anchor.x,
|
||||
y: 150. - label.anchor.y,
|
||||
},
|
||||
});
|
||||
}
|
||||
(p, diagram, edges[0], edges[1], node)
|
||||
}
|
||||
|
||||
fn canvas(p: &Project, diagram: Id, selected: Id, zoom: f32) -> DiagramCanvas<'_> {
|
||||
DiagramCanvas {
|
||||
selection: None,
|
||||
project: p,
|
||||
view_index: None,
|
||||
diagram,
|
||||
selected,
|
||||
navigation_focus: None,
|
||||
zoom,
|
||||
pan: Vector::new(100., 100.),
|
||||
context: Context {
|
||||
document: p.id,
|
||||
diagram,
|
||||
revision: 0,
|
||||
epoch: 0,
|
||||
},
|
||||
selected_bend: None,
|
||||
selected_attachment: None,
|
||||
editable: true,
|
||||
placing: false,
|
||||
connection: None,
|
||||
allocation: None,
|
||||
}
|
||||
}
|
||||
fn screen(canvas: &DiagramCanvas<'_>, y: f32) -> Point {
|
||||
Point::new(
|
||||
200. * canvas.zoom + canvas.pan.x,
|
||||
y * canvas.zoom + canvas.pan.y,
|
||||
)
|
||||
}
|
||||
fn pointer(
|
||||
canvas: &DiagramCanvas<'_>,
|
||||
state: &mut State,
|
||||
event: mouse::Event,
|
||||
at: Point,
|
||||
) -> Option<Message> {
|
||||
canvas::Program::update(
|
||||
canvas,
|
||||
state,
|
||||
&canvas::Event::Mouse(event),
|
||||
Rectangle::with_size(Size::new(1800., 1200.)),
|
||||
mouse::Cursor::Available(at),
|
||||
)
|
||||
.and_then(|a| a.into_inner().0)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_generic_front_label_beats_node_and_selected_back_label_at_three_zooms() {
|
||||
for zoom in [0.5, 1., 1.5] {
|
||||
let (p, diagram, low, high, _) = fixture();
|
||||
let mut canvas = canvas(&p, diagram, low, zoom);
|
||||
// Ten world pixels below center remains on both labels but avoids bends.
|
||||
let at = screen(&canvas, 160.);
|
||||
let scene = canvas.scene(&State::default());
|
||||
assert!(canvas.hit(&scene.view, at).is_some());
|
||||
assert_eq!(canvas.hit_label(&scene.routed, at), Some(high));
|
||||
// Selected bends have a screen radius: move further down at half zoom.
|
||||
let at = if zoom == 0.5 {
|
||||
screen(&canvas, 167.)
|
||||
} else {
|
||||
at
|
||||
};
|
||||
assert_eq!(
|
||||
canvas
|
||||
.context_request(
|
||||
&State::default(),
|
||||
at,
|
||||
Rectangle::with_size(Size::new(1800., 1200.))
|
||||
)
|
||||
.object,
|
||||
high
|
||||
);
|
||||
let mut state = State::default();
|
||||
assert!(
|
||||
matches!(pointer(&canvas, &mut state, mouse::Event::ButtonPressed(mouse::Button::Left), at), Some(Message::Select(id)) if id == high)
|
||||
);
|
||||
assert!(state.drag.is_none() && state.route_drag.is_none());
|
||||
canvas.selected = high;
|
||||
let mut state = State::default();
|
||||
pointer(
|
||||
&canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonPressed(mouse::Button::Left),
|
||||
at,
|
||||
);
|
||||
assert!(matches!(
|
||||
state.route_drag.as_ref().map(|g| &g.handle),
|
||||
Some(Handle::Label { .. })
|
||||
));
|
||||
canvas.editable = false;
|
||||
let mut state = State::default();
|
||||
assert!(
|
||||
matches!(pointer(&canvas, &mut state, mouse::Event::ButtonPressed(mouse::Button::Left), at), Some(Message::Select(id)) if id == high)
|
||||
);
|
||||
assert!(state.drag.is_none() && state.route_drag.is_none());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_generic_shift_label_and_handle_keep_exact_targets_and_mixed_refusal() {
|
||||
let (p, diagram, low, high, node) = fixture();
|
||||
let base = canvas(&p, diagram, low, 1.);
|
||||
let mut single_state = State::default();
|
||||
assert!(
|
||||
matches!(pointer(&base, &mut single_state, mouse::Event::ButtonPressed(mouse::Button::Left), screen(&base, 150.)), Some(Message::Route(RouteEvent::SelectBend(id, 0))) if id == low)
|
||||
);
|
||||
assert!(matches!(
|
||||
single_state.route_drag.as_ref().map(|g| &g.handle),
|
||||
Some(Handle::Bend(0))
|
||||
));
|
||||
let mut selection = Selection::new(context(base.context).scope);
|
||||
selection.add(Target::Edge(low), |_| true);
|
||||
selection.add(Target::Placement(node), |_| true);
|
||||
let canvas = DiagramCanvas {
|
||||
selection: Some(&selection),
|
||||
..base
|
||||
};
|
||||
for (y, expected) in [(160., high), (150., low)] {
|
||||
let mut state = State {
|
||||
modifiers: iced::keyboard::Modifiers::SHIFT,
|
||||
..State::default()
|
||||
};
|
||||
assert!(
|
||||
matches!(pointer(&canvas, &mut state, mouse::Event::ButtonPressed(mouse::Button::Left), screen(&canvas,y)), Some(Message::DiagramSelection(Event::Choose(_, Target::Edge(id), Choice::Toggle))) if id == expected)
|
||||
);
|
||||
assert!(state.drag.is_none() && state.route_drag.is_none());
|
||||
}
|
||||
let mut state = State::default();
|
||||
let at = screen(&canvas, 150.);
|
||||
assert_eq!(
|
||||
canvas
|
||||
.context_request(&state, at, Rectangle::with_size(Size::new(1800., 1200.)))
|
||||
.bend,
|
||||
Some(0)
|
||||
);
|
||||
pointer(
|
||||
&canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonPressed(mouse::Button::Left),
|
||||
at,
|
||||
);
|
||||
assert!(state.group.is_some() && state.route_drag.is_none());
|
||||
let moved = at + Vector::new(20., 20.);
|
||||
pointer(
|
||||
&canvas,
|
||||
&mut state,
|
||||
mouse::Event::CursorMoved { position: moved },
|
||||
moved,
|
||||
);
|
||||
assert!(matches!(
|
||||
pointer(
|
||||
&canvas,
|
||||
&mut state,
|
||||
mouse::Event::ButtonReleased(mouse::Button::Left),
|
||||
moved
|
||||
),
|
||||
Some(Message::DiagramSelection(Event::Refuse(_, _)))
|
||||
));
|
||||
assert!(state.route_drag.is_none() && state.drag.is_none());
|
||||
}
|
||||
@@ -6,7 +6,7 @@ impl DiagramCanvas<'_> {
|
||||
pub(crate) fn work_dirty_point(&self, bounds: Rectangle, screen: Point) -> bool {
|
||||
let diagram = &self.project.diagrams[&self.diagram];
|
||||
let view = self.projected(diagram);
|
||||
let routed = routing::route_diagram(self.project, diagram, &view);
|
||||
let routed = crate::state_label::route_diagram(self.project, diagram, &view);
|
||||
self.work_dirty_press(
|
||||
&view,
|
||||
&routed,
|
||||
|
||||
@@ -327,7 +327,7 @@ pub(crate) fn saved_usages_for(p: &Project, subject: Id, only_diagram: Option<Id
|
||||
"state machine view"
|
||||
}
|
||||
.into(),
|
||||
bounds: routed_bounds(routing::route_diagram(p, diagram, &view).bounds),
|
||||
bounds: routed_bounds(crate::state_label::route_diagram(p, diagram, &view).bounds),
|
||||
});
|
||||
}
|
||||
for node in &view.nodes {
|
||||
@@ -407,7 +407,7 @@ pub(crate) fn saved_usages_for(p: &Project, subject: Id, only_diagram: Option<Id
|
||||
}
|
||||
}
|
||||
if view.edges.iter().any(|edge| edge.id == subject)
|
||||
&& let Some(edge) = routing::route_diagram(p, diagram, &view)
|
||||
&& let Some(edge) = crate::state_label::route_diagram(p, diagram, &view)
|
||||
.edges
|
||||
.get(&subject)
|
||||
{
|
||||
|
||||
@@ -322,7 +322,6 @@ fn article(topic: Topic) -> Article {
|
||||
"Show a correspondence between OA and SA",
|
||||
&[
|
||||
"Choose OA ↔ SA traceability in View content. Changing this setting does not create counterparts or add their placements, so an existing single-layer diagram can initially look unchanged.",
|
||||
"Switching back to Architecture or another single-layer projection shows only that view's layer. The other layer's placements, routing and saved visibility remain stored; return to OA ↔ SA traceability to show them again, subject to the view's filters. Selecting a displayed card, port or line and opening its Properties keeps the current view and perspective.",
|
||||
"Use Review layer traces to inspect named Operational and System endpoints and the meaning of their link. This opens the model's layer-trace list with no search restriction; traces between relationships are reviewed here rather than drawn between element cards.",
|
||||
"In the chosen architecture view, use Add existing elements. The chooser offers compatible elements from both layers. Select an existing endpoint and click its position in the canvas; repeat for the other end if needed. This adds a placement, not a new semantic element or trace. For port correspondences, place the ports' owners.",
|
||||
"The view shows correspondence lines alongside ordinary relationships. The shown-line count reflects the current projection and visibility settings, not trace coverage. If a line is hidden, use View visibility and inspect Saved view visibility; placing an endpoint does not remove explicit hides or filters.",
|
||||
|
||||
@@ -34,6 +34,7 @@ mod source_navigation;
|
||||
mod source_rename;
|
||||
mod source_tree;
|
||||
mod source_workspace;
|
||||
mod state_label;
|
||||
mod style;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//! Desktop routing uses the same font/shaping defaults as canvas text.
|
||||
use iced::advanced::{
|
||||
graphics::text::Paragraph,
|
||||
text::{self, Paragraph as _},
|
||||
};
|
||||
use oa_core::{
|
||||
Diagram, Id, Project,
|
||||
projection::ProjectedView,
|
||||
routing::{self, RoutedView, StateLabelLayout},
|
||||
};
|
||||
|
||||
fn measure_line(line: &str) -> f32 {
|
||||
let defaults = iced::widget::canvas::Text::default();
|
||||
Paragraph::with_text(text::Text {
|
||||
content: line,
|
||||
bounds: iced::Size::INFINITE,
|
||||
size: StateLabelLayout::FONT_SIZE.into(),
|
||||
line_height: text::LineHeight::Absolute(StateLabelLayout::LINE_HEIGHT.into()),
|
||||
font: defaults.font,
|
||||
align_x: defaults.align_x,
|
||||
align_y: defaults.align_y,
|
||||
shaping: defaults.shaping,
|
||||
wrapping: text::Wrapping::None,
|
||||
})
|
||||
.min_width()
|
||||
}
|
||||
|
||||
pub fn route_diagram(project: &Project, diagram: &Diagram, view: &ProjectedView) -> RoutedView {
|
||||
routing::route_diagram_with_state_label_measurement(project, diagram, view, &measure_line)
|
||||
}
|
||||
|
||||
pub fn route_edge_preview(
|
||||
project: &Project,
|
||||
diagram: &Diagram,
|
||||
view: &ProjectedView,
|
||||
baseline: &RoutedView,
|
||||
edge: Id,
|
||||
) -> RoutedView {
|
||||
routing::route_edge_preview_with_state_label_measurement(
|
||||
project,
|
||||
diagram,
|
||||
view,
|
||||
baseline,
|
||||
edge,
|
||||
&measure_line,
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn wide_glyphs_use_shaped_width_instead_of_character_estimate() {
|
||||
let wide = "W".repeat(40);
|
||||
let narrow = "i".repeat(40);
|
||||
let width = measure_line(&wide);
|
||||
assert!(width > measure_line(&narrow) * 2.0);
|
||||
assert!(width > 40.0 * 7.0);
|
||||
let plan = StateLabelLayout::new(&wide, &wide, &measure_line);
|
||||
assert_eq!(
|
||||
plan.size().width,
|
||||
width + 2.0 * StateLabelLayout::HORIZONTAL_PADDING
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unicode_fallback_and_combining_text_have_finite_measured_bounds() {
|
||||
for line in ["漢字 Ελληνικά العربية", "e\u{301} cafe\u{301}", "🙂 🧭"]
|
||||
{
|
||||
let width = measure_line(line);
|
||||
assert!(width.is_finite() && width > 0.0, "{line:?}: {width}");
|
||||
let plan = StateLabelLayout::new(line, line, &measure_line);
|
||||
assert_eq!(
|
||||
plan.size().width,
|
||||
width + 2.0 * StateLabelLayout::HORIZONTAL_PADDING
|
||||
);
|
||||
}
|
||||
assert!(measure_line("e\u{301}") < measure_line("ee"));
|
||||
}
|
||||
}
|
||||
@@ -372,150 +372,3 @@ async fn source6_http_explicit_communication_ports_preview_apply_and_restart_pre
|
||||
assert_pair(&reopened);
|
||||
server.stop().await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn mixed_traceability_projection_roundtrip_preserves_dormant_http_state() {
|
||||
let f = fixture();
|
||||
let mut model = compile_bundle(&f.bundle, ProjectLimits::default())
|
||||
.unwrap()
|
||||
.decoded
|
||||
.project;
|
||||
let view = model.diagrams.get_mut(&f.diagram).unwrap();
|
||||
view.layer = Layer::Sa;
|
||||
view.projection = ProjectionKind::Traceability;
|
||||
// The OA placements and category are intentionally opposite the view's layer.
|
||||
view.view_options.hidden_edges = vec![f.mean];
|
||||
for (index, element) in f.sa.into_iter().enumerate() {
|
||||
model.place(
|
||||
f.diagram,
|
||||
element,
|
||||
Position {
|
||||
x: index as f32 * 400.,
|
||||
y: 300.,
|
||||
},
|
||||
);
|
||||
}
|
||||
let mut bundle = f.bundle.clone();
|
||||
bundle.files.insert(
|
||||
bundle.entry.clone(),
|
||||
format!(
|
||||
"// Authored source-6 engineering rationale\n{}",
|
||||
oa_core::language::format(&model).replacen(
|
||||
"{\n",
|
||||
"{\n include \"notes.arcadia\";\n",
|
||||
1
|
||||
)
|
||||
),
|
||||
);
|
||||
let directory = tempfile::tempdir().unwrap();
|
||||
let server = TestServer::start(directory.path(), None).await;
|
||||
let original = import(&server, &bundle).await;
|
||||
assert_pair(&original);
|
||||
let resource = original.resource_id;
|
||||
let mixed = oa_core::projection::project_view(&original.model, f.diagram);
|
||||
assert!(
|
||||
f.oa.iter()
|
||||
.chain(&f.sa)
|
||||
.all(|id| mixed.nodes.iter().any(|n| n.element == *id))
|
||||
);
|
||||
|
||||
let mut ordinary = original.model.diagrams[&f.diagram].clone();
|
||||
ordinary.projection = ProjectionKind::Allocation;
|
||||
let response = transact(
|
||||
&server,
|
||||
&original,
|
||||
vec![Command::EditDiagram(f.diagram, ordinary.clone())],
|
||||
)
|
||||
.await;
|
||||
let status = response.status();
|
||||
let etag = response
|
||||
.headers()
|
||||
.get("etag")
|
||||
.map(|v| v.to_str().unwrap().to_owned());
|
||||
let result: Value = response.json().await.unwrap();
|
||||
assert_eq!(status, StatusCode::OK, "{result}");
|
||||
assert_eq!(result["changed"], true);
|
||||
assert_eq!(result["dry_run"], false);
|
||||
assert_eq!(result["revision"], original.revision + 1);
|
||||
let changed = server.get(resource).await;
|
||||
assert_eq!(etag.as_deref(), Some(changed.etag().as_str()));
|
||||
let mut expected = original.model.clone();
|
||||
expected.diagrams.insert(f.diagram, ordinary.clone());
|
||||
assert_eq!(
|
||||
changed.model, expected,
|
||||
"only the projection changes; dormant state is retained"
|
||||
);
|
||||
assert_pair(&changed);
|
||||
assert_eq!(
|
||||
changed.source_project.files["notes.arcadia"],
|
||||
bundle.files["notes.arcadia"]
|
||||
);
|
||||
assert!(
|
||||
changed.source_project.files[&bundle.entry]
|
||||
.starts_with("// Authored source-6 engineering rationale\n")
|
||||
);
|
||||
let projected = oa_core::projection::project_view(&changed.model, f.diagram);
|
||||
assert!(projected.nodes.iter().all(|n| !f.oa.contains(&n.element)));
|
||||
assert!(
|
||||
f.sa.iter()
|
||||
.all(|id| projected.nodes.iter().any(|n| n.element == *id))
|
||||
);
|
||||
|
||||
// A dormant option still must name an existing category. Rejection must not
|
||||
// advance the ETag or rewrite either side of the persisted model/source pair.
|
||||
let disk = directory.path().join(format!("{resource}.json"));
|
||||
let accepted_bytes = std::fs::read(&disk).unwrap();
|
||||
ordinary.view_options.participant_categories = CategorySelection::Any(vec![Id::new_v4()]);
|
||||
let rejected = transact(
|
||||
&server,
|
||||
&changed,
|
||||
vec![Command::EditDiagram(f.diagram, ordinary)],
|
||||
)
|
||||
.await;
|
||||
assert_eq!(rejected.status(), StatusCode::UNPROCESSABLE_ENTITY);
|
||||
let retained = server.get(resource).await;
|
||||
assert_eq!(retained.etag(), changed.etag());
|
||||
assert_eq!(
|
||||
serde_json::to_value(&retained).unwrap(),
|
||||
serde_json::to_value(&changed).unwrap()
|
||||
);
|
||||
assert_eq!(std::fs::read(&disk).unwrap(), accepted_bytes);
|
||||
server.stop().await;
|
||||
|
||||
let server = TestServer::start(directory.path(), None).await;
|
||||
let reopened = server.get(resource).await;
|
||||
assert_eq!(
|
||||
serde_json::to_value(&reopened).unwrap(),
|
||||
serde_json::to_value(&changed).unwrap()
|
||||
);
|
||||
assert_pair(&reopened);
|
||||
let response = transact(
|
||||
&server,
|
||||
&reopened,
|
||||
vec![Command::EditDiagram(
|
||||
f.diagram,
|
||||
original.model.diagrams[&f.diagram].clone(),
|
||||
)],
|
||||
)
|
||||
.await;
|
||||
let status = response.status();
|
||||
let result: Value = response.json().await.unwrap();
|
||||
assert_eq!(status, StatusCode::OK, "{result}");
|
||||
assert_eq!(result["changed"], true);
|
||||
assert_eq!(result["revision"], changed.revision + 1);
|
||||
let restored = server.get(resource).await;
|
||||
assert_eq!(restored.model, original.model);
|
||||
assert_pair(&restored);
|
||||
assert_eq!(
|
||||
restored.source_project.files["notes.arcadia"],
|
||||
bundle.files["notes.arcadia"]
|
||||
);
|
||||
let projected = oa_core::projection::project_view(&restored.model, f.diagram);
|
||||
assert!(
|
||||
f.oa.iter()
|
||||
.chain(&f.sa)
|
||||
.all(|id| projected.nodes.iter().any(|n| n.element == *id))
|
||||
);
|
||||
assert!(!projected.edges.iter().any(|edge| edge.id == f.mean));
|
||||
server.stop().await;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ schemas["ViewOptions"] = obj({
|
||||
"coverage": {**ref("Coverage"), "default": "All"},
|
||||
"work_contexts": {**ref("ContextSelection"), "default": "All"},
|
||||
"exchange_labels": {**ref("ExchangeLabels"), "default": "Name"}}, [])
|
||||
schemas["ViewOptions"]["description"] = "Presentation only. Independent predicates intersect; category members union within a family. Only([]) hides all relations and traces. Any([]) remains an explicit empty selection. String projections preserve both-layer hidden/category/context references and latent placements; only Traceability renders both layers. Typed StateMachine/Scenario views retain layer-scoped admission. Filtering preserves unfiltered automatic port positions."
|
||||
schemas["ViewOptions"]["description"] = "Presentation only. Independent predicates intersect; category members union within a family. Only([]) hides all relations and traces. Any([]) remains an explicit empty selection. Traceability permits both-layer hidden/category/context references; ordinary projections require the diagram layer. Filtering preserves unfiltered automatic port positions."
|
||||
schemas["Diagram"]["properties"]["view_options"] = {**ref("ViewOptions"), "default": {}}
|
||||
|
||||
def upsert_variant(variants, name, value):
|
||||
|
||||
+2
-9
@@ -570,15 +570,8 @@ retain their identities and contracts; migration does not silently replace them.
|
||||
``coverage`` and ``work_contexts``, and ``Name`` for ``exchange_labels``.
|
||||
``{"Only":[]}`` hides all relation and trace lines; ``{"Any":[]}`` preserves
|
||||
an explicit empty category/context selection. Category members union within
|
||||
each family, and independent filters intersect. String projections permit saved
|
||||
references and placements from both layers. Only ``Traceability`` renders both;
|
||||
other string projections filter to the diagram's declared layer. ``EditDiagram``
|
||||
may change between these projections without deleting latent placements, routes
|
||||
or visibility choices. Returning to Traceability restores their applicability.
|
||||
Typed StateMachine/Scenario views retain their strict membership and layer checks.
|
||||
Missing objects, wrong reference kinds/families and duplicate selections remain
|
||||
invalid. Frozen versions 1–6 keep their prior layer admission before migration;
|
||||
older version-7 implementations may reject these newly accepted ordinary views.
|
||||
each family, and independent filters intersect. ``Traceability`` permits
|
||||
references from both layers; ordinary projections require the diagram's layer.
|
||||
These presentation choices preserve semantic records, routes, placements and
|
||||
the automatic port positions derived from unfiltered eligible exchanges.
|
||||
|
||||
|
||||
+2
-20
@@ -409,12 +409,8 @@ filters rather than widening them to All.
|
||||
|
||||
Traceability views retain their established two-layer projection: default options
|
||||
preserve eligible OA and SA lines. Their hidden-edge, category and context
|
||||
references may therefore select either layer. Ordinary string projections retain
|
||||
these references from either layer as saved presentation choices; they still
|
||||
render only their declared layer. Switching projections MUST preserve those
|
||||
choices, including explicit empty selections. Existing-object, reference-kind,
|
||||
family and uniqueness constraints still apply. Typed StateMachine and Scenario
|
||||
views retain layer-scoped reference admission. A filter never hides the other
|
||||
references may therefore select either layer. All ordinary projections require
|
||||
these references in the declared diagram layer. A filter never hides the other
|
||||
layer merely because the Traceability diagram has an OA or SA layer label.
|
||||
|
||||
Versions 1–5 reject the new relation, category constructor, diagram field (even
|
||||
@@ -1077,20 +1073,6 @@ capabilities with their involvement, exploitation, include, extend and
|
||||
generalization links. Decomposition and Overview retain general containment;
|
||||
Overview also exposes all relationships. These string projections hide
|
||||
inapplicable placements without deleting them or changing semantic records.
|
||||
This includes opposite-layer placements retained after leaving Traceability.
|
||||
Changing between string projections changes only the projection value; placement
|
||||
identities, positions, sizes, collapsed state, port anchors, routes and visibility
|
||||
choices remain authored. Returning to Traceability restores their applicability.
|
||||
Ordinary views MUST NOT render opposite-layer nodes, parents, ports or lines.
|
||||
This current-version admission correction does not broaden frozen source/JSON
|
||||
versions 1–6: their layer-scoped placement and visibility checks remain required
|
||||
before migration. Earlier version-7 implementations can reject ordinary views
|
||||
containing these retained opposite-layer records.
|
||||
|
||||
The explicit RelocateNode operation moves a placement to a different diagram
|
||||
only when its element belongs to the destination layer or the destination is
|
||||
Traceability. Retaining an existing hidden placement through a projection change
|
||||
does not authorize a relocation that immediately hides it in another layer.
|
||||
|
||||
A StateMachine projection MUST reference an existing StateMachine in the
|
||||
diagram's layer. Its placements MUST refer to that machine, its Regions, or
|
||||
|
||||
+1
-1
@@ -12490,7 +12490,7 @@
|
||||
},
|
||||
"required": [],
|
||||
"additionalProperties": false,
|
||||
"description": "Presentation only. Independent predicates intersect; category members union within a family. Only([]) hides all relations and traces. Any([]) remains an explicit empty selection. String projections preserve both-layer hidden/category/context references and latent placements; only Traceability renders both layers. Typed StateMachine/Scenario views retain layer-scoped admission. Filtering preserves unfiltered automatic port positions."
|
||||
"description": "Presentation only. Independent predicates intersect; category members union within a family. Only([]) hides all relations and traces. Any([]) remains an explicit empty selection. Traceability permits both-layer hidden/category/context references; ordinary projections require the diagram layer. Filtering preserves unfiltered automatic port positions."
|
||||
},
|
||||
"CommunicationPortChoice": {
|
||||
"oneOf": [
|
||||
|
||||
@@ -498,3 +498,9 @@ editing remains separate from semantic reconnect. The [decision and evidence
|
||||
map](edge-attachments-20260922.md) records alternatives, lifecycle rules,
|
||||
independent falsifiers, evaluators and the Process/Scenario applicability limits.
|
||||
This is branch-specific work; it does not establish an integrated release.
|
||||
|
||||
## External State transition label measurement — 2026-09-24
|
||||
|
||||
Issue #36's reproduced collision comes from a two-line title painted in space reserved for one line, with bounds sized from its summary. Adopt one derived hard-line plan measured before routing, shared by paint/hit/preview/focus/SVG. Preserve raw excerpt provenance, authored centers/routes and model/source bytes. Desktop measures with the canvas Paragraph defaults; core retains an explicit approximate fallback. Opaque State label backgrounds own covered hits in reverse paint order while selected handles and group admission retain precedence.
|
||||
|
||||
The [contract](state-label-layout-contract.md) is authoritative for exact rules and alternatives. The [verification](experiments/state-label-layout-20260924/README.md) records the width-estimate and generic-hit falsifiers, independent review, scoped Windows outcomes, restored-window input limitation and reasons not to infer universal font or collision-free layout support. Revisit if new ink-overhang, shaping, routing-cost, or authored-occlusion evidence invalidates the bounded design. Dynamic node/row sizing and source/model changes were deliberately excluded.
|
||||
|
||||
+9
-1
@@ -1,4 +1,12 @@
|
||||
# Integrated prerelease source checkpoint — 2026-09-24 UTC
|
||||
# Verified branch checkpoint — State label follow-up
|
||||
|
||||
This branch's code through **70bdcdf8fec1728e971cd90ad7f79a1df99777ff** corrects external State transition title/summary layout and measured label hit areas. The [contract](state-label-layout-contract.md) and [verification](experiments/state-label-layout-20260924/README.md) identify exact source, commands, native fixtures, original evidence and limits. Windows focused core68, full desktop1540/7 existing ignores, formatting, strict workspace/all-target Clippy, builds, and six maximized-window B/W/U Save/reopen checks pass. Restored-window coordinate input remains an explicit native-test limitation. This is branch-specific evidence, not merged-main or complete-application acceptance; live integration status is [issue36](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/36).
|
||||
|
||||
The separate [September24 integrated prerelease](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/releases/tag/v0.2.0-preview.integrated.20260924) is published at **715036e132677dd2bc2fb37ed316d93dc9987aec** with owner publication receipt **76acfb11085ae36bd65971f5f1cf34f45d362ada**. The label follow-up does not replace that tag or its artifacts. Linux remains excluded. Later private analysis branch status must be read from Gitea and that branch, not inferred from this checkpoint.
|
||||
|
||||
## Historical source checkpoint inherited from715036e — 2026-09-24 UTC
|
||||
|
||||
The source-preparation statements below describe that earlier checkpoint. Its then-pending prerelease gates were subsequently completed in the publication linked above; its other scoped evidence retains its original code versions.
|
||||
|
||||
This branch assembles peer contributions for the Windows prerelease in issue37.
|
||||
[PROJECT_GOAL.md](../PROJECT_GOAL.md) remains authoritative. The complete OA/SA
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Connection tool icons
|
||||
|
||||
Branch candidate for [#41](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/41), based on published Windows preview source `715036e132677dd2bc2fb37ed316d93dc9987aec`. This is not integrated or native acceptance.
|
||||
|
||||
The reported collapsed palette repeats one arrow for three different tools. Extend the existing Rust/Iced canvas glyphs at their actual 16×16 size: work endpoints plus an arrow for Interaction/Functional exchange, neutral participant endpoints for Communication means, facing component ports for Boundary exchange, and work entering a performer for Allocation. The first pair never coexist in one perspective. Unoriented generic tools must not imply a fixed direction.
|
||||
|
||||
Letter badges were rejected as language-dependent and cramped. Different arrow/dash styles risk confusing tool identity with relation direction. Native endpoint/container shapes fit the existing icon system without font or asset dependencies. Preserve button dimensions, explicit labels/tooltips, ordering, messages, availability and selection rules.
|
||||
|
||||
Independent source critique found no blocker and confirmed the tool semantics and Iced API use. Actual-size legibility remains unverified, particularly the exchange arrow, port details and possible download/import interpretation of Allocation. Verify enabled, disabled, hovered and selected palettes in both perspectives, expansion/collapse, tool activation, representative relation creation and cancellation. Existing keyboard/accessibility behavior must be checked, not inferred from hover labels. Reuse semantic connection tests; geometry hashes alone are not an identification or usability evaluator.
|
||||
|
||||
Linux remains excluded by the existing user pause. Live ownership and integration status belong to the linked issue.
|
||||
@@ -0,0 +1,2 @@
|
||||
# Preserve receipt and review bytes exactly as bound by the evidence indexes.
|
||||
* -text whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol
|
||||
@@ -0,0 +1,85 @@
|
||||
# State transition multiline label verification
|
||||
|
||||
Issue [#36](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/36), Codex-ytr83r/root. Tested production/test source is **70bdcdf8fec1728e971cd90ad7f79a1df99777ff**, based on released **715036e132677dd2bc2fb37ed316d93dc9987aec**. Subsequent commits containing this evidence are documentation-only. The September 24 prerelease remains unchanged. Integration ownership and status belong to the issue.
|
||||
|
||||
## Outcome and boundary
|
||||
|
||||
The original `Ready\nfor review` title no longer collides with its summary. Routing prepares a shared, measured hard-line plan used by canvas paint, hit boxes, previews, focus/Fit and SVG. Opaque State labels receive hits before covered node/row pixels, in reverse paint order; exposed action rows retain their identity. Authored geometry and all semantic/source data remain unchanged. See the [contract](../../state-label-layout-contract.md) for the retained excerpt budgets, separators, measurement and scope.
|
||||
|
||||
The bounded Windows implementation passed its focused core gates, full desktop suite, formatting, strict workspace/all-target Clippy, product builds, and maximized-window native B/W/U Save/reopen checks. A later isolated trial also passed Home Open and all three transition text-row hits at restored1442×932/displayed79%, preserving all nine source files and the entire Project. The earlier unsuccessful restored1442×842 attempt and Home-button discrepancy remain explicit in [observations](observations.md) and [independent native review](native-review.md); the later success does not establish their cause. No all-window input or universal Unicode rendering claim follows. This is a follow-up contribution, not a replacement release or complete application acceptance.
|
||||
|
||||
## Automated checks
|
||||
|
||||
Windows x86_64-pc-windows-gnullvm, Rust1.98.1, locked/offline dependencies, one build job, no incremental compilation. All completed successful gates preserve identical source inventories before/after.
|
||||
|
||||
| Gate | Source | Result |
|
||||
| --- | --- | --- |
|
||||
| `cargo test --locked --offline -p oa-core --test state_label_layout -- --test-threads=1` | 2af40c7e | 4 passed |
|
||||
| `cargo test --locked --offline -p oa-core --test group_movement --test release_routing --test release_states --test routing_geometry --test routing_labels --test state_diagrams -- --test-threads=1` | 2af40c7e | 64 passed |
|
||||
| `cargo test --locked --offline -p oa-desktop --bin arcadia-studio -- --test-threads=1` | 70bdcdf8 | 1540 passed, 0 failed, 7 unchanged existing manual/diagnostic ignores |
|
||||
| `cargo fmt --all -- --check` | 70bdcdf8 | passed |
|
||||
| `cargo clippy --locked --offline --workspace --all-targets -- -D warnings` | 70bdcdf8 | passed, no warnings |
|
||||
| `cargo build -p oa-desktop --bin arcadia-studio --locked --offline --message-format=json-render-diagnostics` | 70bdcdf8 | passed |
|
||||
| `cargo build -p oa-core --example attachment_snapshot --locked --offline --message-format=json-render-diagnostics` | 70bdcdf8 | passed |
|
||||
|
||||
Core production/tests did not change after2af40c7e. Desktop adds12 passing regressions, with no removed or changed baseline outcomes. They cover width-dominating text and Unicode measurements, raw-prefix typed-reference provenance, covered/exposed row and overlapping-label selection, Shift/mixed-group refusal, generic fallback canvas, preview cancellation, fixed(+40,+40) complete-Project group commit/one-step Undo/Redo, and SVG line positions/order. These are scoped checks; the full workspace test suite was not repeated for this follow-up.
|
||||
|
||||
Preserved failure: desktop gate03 at66278ed3 failed compilation with E0382 in a new test; no tests ran. Commit70bdcdf8 adds `row.clone()` in that test only. Its failed receipt remains failed; later success does not relabel it. The [source review](source-review.md) also preserves and closes the earlier generic-fallback hit-order finding at the source-review level.
|
||||
|
||||
## Native trial
|
||||
|
||||
The exact original nine-file fixture comes from peerbed7f825fd00ec32299032a664a5f5d753aad86d, `harness/experiments/state-multiselect-20260923/native/evidence.zip`, SHA256`1d08c1bc6af4856a569ddd320ddf5403a302b8d9437750663a498541e489d663`.
|
||||
|
||||
B is original; W changes only the transition title to40 W characters; U changes only that title to CRLF/CJK/combining/ZWJ/trailing-newline text. Independent complete-Project oracles and exact source bytes are frozen before GUI input. At the actual maximized1605×872 window, displayed68% and82% scales show separated/contained lines. Inspector aliases establish label-versus-exposed-action selection. Native group movement M is unexecuted; the fixed movement/history regression supplies that separate evidence.
|
||||
|
||||
All six pure-layout checkpoints passed: initial Save and fresh-process reopen/Save for B/W/U. Each preserves the entire Project and all nine source files byte-for-byte. Two isolated-profile processes exited0 after parent-observed Alt+F4, with empty logs and immutable binaries/source inputs unchanged. The [independent review](native-review.md) checks original images, complete models, every source-file hash and both process logs. Recorded zoom percentages are rounded; no exact100% or DPI calibration is claimed.
|
||||
|
||||
Preserved GUI:119440896 bytes, SHA256`0401341388025544185455ad5520aa2c1b79ca1387d1a57c2bb0bddb8b23754a`. Runtime libunwind.dll SHA256`aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a`. The supplemental bundle reader was built from the same candidate/compiler and is separate from the Cargo product artifacts.
|
||||
|
||||
## Reusable evidence
|
||||
|
||||
### Supplemental restored-window trial, September 25
|
||||
|
||||
The [supplemental observations](restored-native-observations.md) record the same
|
||||
preserved70bdcdf8 executable, rechecked before launch, with a fresh isolated copy
|
||||
of B and a private recent-model profile. At1442×932/displayed79%, Home Open loaded
|
||||
the fixture. First title, second title, and summary clicks each selected stable
|
||||
transition alias `between`; the latter two followed independently observed
|
||||
selection of `state_b`. Pure Save preserved all nine source files byte-for-byte
|
||||
and the complete expected Project. Alt+F4 termination was observed and both GUI
|
||||
logs were empty, but the watcher returned a null exit code; this is not exit0
|
||||
evidence. The initial incorrect direct snapshot invocation rejected includes;
|
||||
the established converter-then-snapshot verification subsequently passed.
|
||||
That invocation error is preserved narratively; its original stderr was replaced
|
||||
by the successful rerun's empty log. The [independent supplemental review](restored-native-review.md)
|
||||
checks all ten original images, archive members, source/model comparisons and
|
||||
tool hashes, and retains this evidence limitation.
|
||||
|
||||
[Supplemental ZIP](restored-native-evidence.zip):888553 bytes,
|
||||
SHA256`f120509338fb0ac55480ce11929381fb1a46fecf7d3a1c8869c395335f0eba0a`.
|
||||
Its45 evidence members plus manifest include original captures, source copies,
|
||||
verification scripts/results and launch/close records. Executables/DLLs are
|
||||
excluded. The [integrity receipt](restored-native-integrity.json) records successful
|
||||
CRC and every member length/hash checks. Historical builder paths require local
|
||||
relocation. Earlier failures remain unexplained; this bounded success does not
|
||||
replace the previous evidence or establish acceptance at other window sizes.
|
||||
|
||||
A subsequent bounded attempt to obtain the original1442×842 size was
|
||||
**unexecuted**: supported UI resizing yielded932→921→732 heights and tool
|
||||
target/bounds errors. The fixture was never opened or saved. Its unchanged
|
||||
bytes/model establish copied-fixture integrity only. [Exact observations and
|
||||
errors](restored842-observations.md) preserve this outcome without diagnosing an
|
||||
application defect. [Attempt ZIP](restored842-attempt.zip):661746 bytes,
|
||||
SHA256`3efb41d79a9dab70d7026ba83a7f9ec60a319fab79a8f0a383f3ce7a71b0f42f`;
|
||||
[integrity receipt](restored842-integrity.json). The original height-specific
|
||||
acceptance gap remains open.
|
||||
|
||||
### Original trial and automated gates
|
||||
|
||||
- [Native evidence ZIP](native-evidence.zip):2886914 bytes, SHA256`039add524eb99ce855c2dc5680eec01c1d5b7f23024025c428125b9771a8e687`.
|
||||
- [Native archive receipt](native-archive.json) and [member/relocation index](native-collection.json) preserve original paths and hashes; these paths describe the builder machine and are not peer-accessible dependencies. The ZIP carries original captures, metadata, source fixtures/oracles, checkpoint/process/helper receipts and hash-bound scripts, plus unchanged parent observations and review. Binary/cache payloads are excluded with their hashes retained.
|
||||
- [Automated evidence ZIP](automated-evidence.zip):6244436 bytes, SHA256`7706302ef7ee5d160a23ff2d562bedb8911b4e6d7ad4c941544088974b539b6e`,113 verified members. Its [index](automated-index.json), [integrity receipt](automated-integrity.json), and [scope note](automated-README.md) retain both successful and failed command records, frozen build environment, exact source inventories, compiler/dependency receipts and reproducible helper sources. Consult original per-command results rather than adding counts from different scopes.
|
||||
|
||||
Native archive member bytes and exact member set were read back after creation; all six independent model comparisons and source-snapshot checks passed, both process receipts were clean, and no bound input changed. The collector establishes archive integrity, not visual correctness by itself.
|
||||
|
||||
To reproduce on another Windows machine: check out70bdcdf8, use the project Windows build instructions, run the commands above, obtain the pinned peer fixture, and use the preserved trial/launcher recipes with newly generated local build/admission paths. Never reuse the builder's historical absolute paths or claim its binaries were rebuilt locally. Linux remains excluded by the user's current instruction. External SVG viewer font substitution, authored label occlusion of nodes, dynamic State row/header sizing, and broader State/Process congestion remain limitations outside this fix.
|
||||
@@ -0,0 +1,11 @@
|
||||
# #36 automated evidence archive
|
||||
|
||||
Original gate01–09 and supplemental converter receipts/logs, preserved byte-for-byte.
|
||||
|
||||
Source attribution remains per gate:01/02 at2af40c7e,03 at66278ed3,04–09 and converter at70bdcdf8. Gate03 is the retained E0382 compile failure (exit101, no tests executed); gate04 is its later corrected run. Seven existing ignored desktop tests remain ignored. See raw command results and test-evidence note. No full-workspace, native GUI or overall acceptance claim is made here.
|
||||
|
||||
The ZIP includes source inventories, frozen environments, Cargo JSON artifact ownership, original compiler/library hash inventories, process-command logs, scripts and attributed review notes. Executable/runtime/rlib payloads are omitted; index.json records their exact hashes, sizes and original paths. Historical absolute paths inside receipts are unchanged. This archive is evidence, not a runnable distribution; reproduce against each identified source commit using the retained commands/environment/toolchain bindings.
|
||||
|
||||
Existing notes describe their own review scope/time and may identify findings resolved later; they are not silently rewritten by packaging. Parent-owned native observations and captures belong in their separate native evidence archive.
|
||||
|
||||
Packaging verifies exact ZIP member names/count and decompressed SHA256/length for every member, including this README and index. integrity.json outside ZIP identifies the final ZIP and confirms original gate/converter inventories unchanged. No build/helper/GUI was executed and no publication performed by packaging.
|
||||
Binary file not shown.
@@ -0,0 +1,866 @@
|
||||
{
|
||||
"created_utc": "2026-09-25T00:06:28.817849+00:00",
|
||||
"gates": [
|
||||
{
|
||||
"name": "01-core-layout",
|
||||
"source_commit": "2af40c7e27ed9750b9585c07369dbf17a046a92d",
|
||||
"argv": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-core",
|
||||
"--test",
|
||||
"state_label_layout",
|
||||
"--",
|
||||
"--test-threads=1"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\command\\result.json",
|
||||
"bytes": 4180,
|
||||
"sha256": "902fe24f6304c830f90edb060004d9ffcc218102ee19615171aa82afd7fdfe1f"
|
||||
},
|
||||
"classification": "completed_command",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
},
|
||||
{
|
||||
"name": "02-core-routing-state",
|
||||
"source_commit": "2af40c7e27ed9750b9585c07369dbf17a046a92d",
|
||||
"argv": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-core",
|
||||
"--test",
|
||||
"group_movement",
|
||||
"--test",
|
||||
"release_routing",
|
||||
"--test",
|
||||
"release_states",
|
||||
"--test",
|
||||
"routing_geometry",
|
||||
"--test",
|
||||
"routing_labels",
|
||||
"--test",
|
||||
"state_diagrams",
|
||||
"--",
|
||||
"--test-threads=1"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\command\\result.json",
|
||||
"bytes": 4382,
|
||||
"sha256": "6d102bf5b2e715316233f47756cb21215209045360ae736235974651435c6652"
|
||||
},
|
||||
"classification": "completed_command",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
},
|
||||
{
|
||||
"name": "03-desktop-tests",
|
||||
"source_commit": "66278ed33b95961d1c129e2ddc172c567effbf9b",
|
||||
"argv": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-desktop",
|
||||
"--bin",
|
||||
"arcadia-studio",
|
||||
"--",
|
||||
"--test-threads=1"
|
||||
],
|
||||
"exit_code": 101,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\command\\result.json",
|
||||
"bytes": 4185,
|
||||
"sha256": "a8e98b66b01f9965f0d49d9f9a4b83fd25e543295c29d8cefc575e98d2346e2c"
|
||||
},
|
||||
"classification": "failed_compile_no_tests",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
},
|
||||
{
|
||||
"name": "04-desktop-tests",
|
||||
"source_commit": "70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"argv": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-desktop",
|
||||
"--bin",
|
||||
"arcadia-studio",
|
||||
"--",
|
||||
"--test-threads=1"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\command\\result.json",
|
||||
"bytes": 4187,
|
||||
"sha256": "868aeace11d5307be72c01db0bb64347aed700c70fac3efb3ae0ac92d5c32707"
|
||||
},
|
||||
"classification": "completed_command",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
},
|
||||
{
|
||||
"name": "05-format",
|
||||
"source_commit": "70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"argv": [
|
||||
"cargo",
|
||||
"fmt",
|
||||
"--all",
|
||||
"--",
|
||||
"--check"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\command\\result.json",
|
||||
"bytes": 4066,
|
||||
"sha256": "09bdbca3090cb92eab436b37f209440d394b4501a6f24ea55006fc3854dc2f07"
|
||||
},
|
||||
"classification": "completed_command",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
},
|
||||
{
|
||||
"name": "06-clippy",
|
||||
"source_commit": "70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"argv": [
|
||||
"cargo",
|
||||
"clippy",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"--workspace",
|
||||
"--all-targets",
|
||||
"--",
|
||||
"-D",
|
||||
"warnings"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\command\\result.json",
|
||||
"bytes": 4141,
|
||||
"sha256": "226cf432707a66c7baf6d4b866ac101a39d00a46628b3b61162694add7d04a88"
|
||||
},
|
||||
"classification": "completed_command",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
},
|
||||
{
|
||||
"name": "07-gui",
|
||||
"source_commit": "70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"argv": [
|
||||
"cargo",
|
||||
"build",
|
||||
"-p",
|
||||
"oa-desktop",
|
||||
"--bin",
|
||||
"arcadia-studio",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"--message-format=json-render-diagnostics"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\command\\result.json",
|
||||
"bytes": 4171,
|
||||
"sha256": "28a5726e4001652a59f1a8aab47539cf256a48a350b9749d9d3349d0950a80a1"
|
||||
},
|
||||
"classification": "completed_command",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
},
|
||||
{
|
||||
"name": "08-snapshot",
|
||||
"source_commit": "70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"argv": [
|
||||
"cargo",
|
||||
"build",
|
||||
"-p",
|
||||
"oa-core",
|
||||
"--example",
|
||||
"attachment_snapshot",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"--message-format=json-render-diagnostics"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\command\\result.json",
|
||||
"bytes": 4191,
|
||||
"sha256": "cee7277ae91a41507481755755b2aacc85e3d0696db5bb30f9800a0c4c56e180"
|
||||
},
|
||||
"classification": "completed_command",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
},
|
||||
{
|
||||
"name": "09-converter-wrapper",
|
||||
"source_commit": "70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"argv": [
|
||||
"C:/Users/User/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/python.exe",
|
||||
"C:/Users/User/Documents/Git/ARCADIA-Studio/.local/prerelease-native-preflight-20260924/build_converter-full-deps.py",
|
||||
"--repo",
|
||||
"C:/Users/User/Documents/Git/ARCADIA-Studio/.local/state-label-layout-20260924",
|
||||
"--source-commit",
|
||||
"70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"--environment",
|
||||
"C:/Users/User/Documents/Git/ARCADIA-Studio/.local/state-label-checks-20260924/07-gui/environment.json",
|
||||
"--output",
|
||||
"C:/Users/User/Documents/Git/ARCADIA-Studio/.local/state-label-converter-70bdcdf8-20260924"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"runner_failure": null,
|
||||
"inputs_unchanged": true,
|
||||
"result": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\command\\result.json",
|
||||
"bytes": 4670,
|
||||
"sha256": "0c2a93749eb99e8c2e1456437bc65b07edf0ce20dd4731ec764711bea315fa03"
|
||||
},
|
||||
"classification": "completed_command",
|
||||
"scope": "Recorded scoped command outcome, not overall acceptance"
|
||||
}
|
||||
],
|
||||
"converter_source_commit": "70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"converter_summary": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\summary.json",
|
||||
"bytes": 5561,
|
||||
"sha256": "4772bd6f5025566fe41d0b03d69e9b5b9bd907e2cc72deb36bfed32d43becf8d"
|
||||
},
|
||||
"members": {
|
||||
"gates/01-core-layout/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/01-core-layout/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\orchestration.log",
|
||||
"bytes": 171,
|
||||
"sha256": "4806d5c8b5392bbea0ed7797ffb84e215cd61636a4aa95a73435a102daeb5133"
|
||||
},
|
||||
"gates/02-core-routing-state/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/02-core-routing-state/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\orchestration.log",
|
||||
"bytes": 178,
|
||||
"sha256": "8a707fb3a4e2be95f733de9d229bf12c392749dc882123b61addbe6f9ed1b59b"
|
||||
},
|
||||
"gates/03-desktop-tests/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/03-desktop-tests/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\orchestration.log",
|
||||
"bytes": 175,
|
||||
"sha256": "fd4070b4fde5bdd51a4c3d1fd3201fb6c829aab6e17a4e228287e032679caafa"
|
||||
},
|
||||
"gates/04-desktop-tests/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/04-desktop-tests/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\orchestration.log",
|
||||
"bytes": 173,
|
||||
"sha256": "81e3d7ae505b357442a6844c9158822192dff18c3dbe565d64d9bfa451f03cc2"
|
||||
},
|
||||
"gates/05-format/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/05-format/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\orchestration.log",
|
||||
"bytes": 166,
|
||||
"sha256": "ecaeb74a7d9fb5897d9745c06a8976e4d84850e8b8db3ff86cb672fca21c2256"
|
||||
},
|
||||
"gates/06-clippy/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/06-clippy/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\orchestration.log",
|
||||
"bytes": 166,
|
||||
"sha256": "ecab94bc7c7fb6c367df2a0e26ebf8136b6dc78ced18a4517208e6364a88a37f"
|
||||
},
|
||||
"gates/07-gui/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/07-gui/native-artifact-relocation.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\native-artifact-relocation.json",
|
||||
"bytes": 5301,
|
||||
"sha256": "11fde1495bcfe19d97e7e596705af09c5f9baa7e805029af0d362c68e3bcc2f3"
|
||||
},
|
||||
"gates/07-gui/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\orchestration.log",
|
||||
"bytes": 163,
|
||||
"sha256": "bcaeb79c30f2249579b9fd8b31bc4d70cb8bba29d928f885eee87d0978beceae"
|
||||
},
|
||||
"gates/07-gui/summary.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\summary.json",
|
||||
"bytes": 7825,
|
||||
"sha256": "b5b5cf0d9e5518dbe1a37bbc665bdf968e762fc47634d89b095e48563664b964"
|
||||
},
|
||||
"gates/08-snapshot/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/08-snapshot/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\orchestration.log",
|
||||
"bytes": 168,
|
||||
"sha256": "1ef9cc7cc2fd057f21ea2a169137bfdcd6799745d23c4478005b549e6eb547a0"
|
||||
},
|
||||
"gates/09-converter-wrapper/environment.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\environment.json",
|
||||
"bytes": 9477,
|
||||
"sha256": "5ade2b585de0ba1e7471948d2b9a6fb7bb43cb3fc7ae3d92fda4d5bc682a4f83"
|
||||
},
|
||||
"gates/09-converter-wrapper/orchestration.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\orchestration.log",
|
||||
"bytes": 177,
|
||||
"sha256": "a2b44604b2e86a82212032893f57e3aef0905450a6fc3c7da7c90b632d9c08ed"
|
||||
},
|
||||
"gates/01-core-layout/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/01-core-layout/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\command\\context.json",
|
||||
"bytes": 3535,
|
||||
"sha256": "84fabf0a67ff5903fa62928b271132acae52ab11b9af46992f14fa4c1c98db6a"
|
||||
},
|
||||
"gates/01-core-layout/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\command\\inputs-after.json",
|
||||
"bytes": 1745987,
|
||||
"sha256": "b96d7ae8c2c7dfc9533de522951ebd38b9b74ab13bfb000fdf723e52fc4ef6cb"
|
||||
},
|
||||
"gates/01-core-layout/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\command\\inputs-before.json",
|
||||
"bytes": 1745987,
|
||||
"sha256": "b96d7ae8c2c7dfc9533de522951ebd38b9b74ab13bfb000fdf723e52fc4ef6cb"
|
||||
},
|
||||
"gates/01-core-layout/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\command\\output.log",
|
||||
"bytes": 441,
|
||||
"sha256": "95fb11393f2d0ee4345644372501f1bb7d94059f7c7ec8c3e73f2742c5a1869f"
|
||||
},
|
||||
"gates/01-core-layout/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\command\\result.json",
|
||||
"bytes": 4180,
|
||||
"sha256": "902fe24f6304c830f90edb060004d9ffcc218102ee19615171aa82afd7fdfe1f"
|
||||
},
|
||||
"gates/01-core-layout/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\01-core-layout\\command\\stderr.log",
|
||||
"bytes": 329,
|
||||
"sha256": "ad6e55a7f9d133c1171d59895bb0b42dd9e8db249b77c711fc8e586c960afa38"
|
||||
},
|
||||
"gates/02-core-routing-state/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/02-core-routing-state/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\command\\context.json",
|
||||
"bytes": 3721,
|
||||
"sha256": "3a9c2164e24755a1f8e677bbbaca9efa123c01a83688f2a7a1ece480be5d9051"
|
||||
},
|
||||
"gates/02-core-routing-state/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\command\\inputs-after.json",
|
||||
"bytes": 1745987,
|
||||
"sha256": "b96d7ae8c2c7dfc9533de522951ebd38b9b74ab13bfb000fdf723e52fc4ef6cb"
|
||||
},
|
||||
"gates/02-core-routing-state/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\command\\inputs-before.json",
|
||||
"bytes": 1745987,
|
||||
"sha256": "b96d7ae8c2c7dfc9533de522951ebd38b9b74ab13bfb000fdf723e52fc4ef6cb"
|
||||
},
|
||||
"gates/02-core-routing-state/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\command\\output.log",
|
||||
"bytes": 5918,
|
||||
"sha256": "e0d83aa7e2daf6a708ff05f270bfd42c62e7256c9bb021d0f82a89ce82e76a72"
|
||||
},
|
||||
"gates/02-core-routing-state/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\command\\result.json",
|
||||
"bytes": 4382,
|
||||
"sha256": "6d102bf5b2e715316233f47756cb21215209045360ae736235974651435c6652"
|
||||
},
|
||||
"gates/02-core-routing-state/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\02-core-routing-state\\command\\stderr.log",
|
||||
"bytes": 1007,
|
||||
"sha256": "7bab937f221dbe4bf6a814a2b4b96436ae6412a4abd63e227152cd039c725ede"
|
||||
},
|
||||
"gates/03-desktop-tests/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/03-desktop-tests/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\command\\context.json",
|
||||
"bytes": 3535,
|
||||
"sha256": "65baf5817cf901ff2346f3ef4a0edc7782a66c36ccf299699fced70aec1cad1e"
|
||||
},
|
||||
"gates/03-desktop-tests/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\command\\inputs-after.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "927af387a86f8be0af148ea8d75a610c73d588b7056108d9b7199ae300ca977e"
|
||||
},
|
||||
"gates/03-desktop-tests/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\command\\inputs-before.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "927af387a86f8be0af148ea8d75a610c73d588b7056108d9b7199ae300ca977e"
|
||||
},
|
||||
"gates/03-desktop-tests/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\command\\output.log",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/03-desktop-tests/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\command\\result.json",
|
||||
"bytes": 4185,
|
||||
"sha256": "a8e98b66b01f9965f0d49d9f9a4b83fd25e543295c29d8cefc575e98d2346e2c"
|
||||
},
|
||||
"gates/03-desktop-tests/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\03-desktop-tests\\command\\stderr.log",
|
||||
"bytes": 1530,
|
||||
"sha256": "a572854597b1b47c5df352f769a3c785024f836107fade2300a5e6ed1ceee733"
|
||||
},
|
||||
"gates/04-desktop-tests/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/04-desktop-tests/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\command\\context.json",
|
||||
"bytes": 3535,
|
||||
"sha256": "78622cb7fbd144369aae5932a464a79afc8a5c038063d93b59ddc8e21e6c5627"
|
||||
},
|
||||
"gates/04-desktop-tests/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\command\\inputs-after.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/04-desktop-tests/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\command\\inputs-before.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/04-desktop-tests/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\command\\output.log",
|
||||
"bytes": 179631,
|
||||
"sha256": "af4d05f303f7a68357992c7d7d893d7c8856389826c89118a0632e2a01fdf346"
|
||||
},
|
||||
"gates/04-desktop-tests/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\command\\result.json",
|
||||
"bytes": 4187,
|
||||
"sha256": "868aeace11d5307be72c01db0bb64347aed700c70fac3efb3ae0ac92d5c32707"
|
||||
},
|
||||
"gates/04-desktop-tests/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\04-desktop-tests\\command\\stderr.log",
|
||||
"bytes": 325,
|
||||
"sha256": "7b552c022264730769bb9855e876b15b60725dcc11775a5f312c683e439f1929"
|
||||
},
|
||||
"gates/05-format/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/05-format/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\command\\context.json",
|
||||
"bytes": 3435,
|
||||
"sha256": "9503502416d1b1592711c0ff823ad86ffad43e32a26343195164e1a04ae90188"
|
||||
},
|
||||
"gates/05-format/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\command\\inputs-after.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/05-format/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\command\\inputs-before.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/05-format/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\command\\output.log",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/05-format/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\command\\result.json",
|
||||
"bytes": 4066,
|
||||
"sha256": "09bdbca3090cb92eab436b37f209440d394b4501a6f24ea55006fc3854dc2f07"
|
||||
},
|
||||
"gates/05-format/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\05-format\\command\\stderr.log",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/06-clippy/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/06-clippy/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\command\\context.json",
|
||||
"bytes": 3508,
|
||||
"sha256": "b9ee7be690311f6be7d732b31a9b19842ff9611bdb02a659c16716e667ce7b0d"
|
||||
},
|
||||
"gates/06-clippy/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\command\\inputs-after.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/06-clippy/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\command\\inputs-before.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/06-clippy/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\command\\output.log",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/06-clippy/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\command\\result.json",
|
||||
"bytes": 4141,
|
||||
"sha256": "226cf432707a66c7baf6d4b866ac101a39d00a46628b3b61162694add7d04a88"
|
||||
},
|
||||
"gates/06-clippy/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\06-clippy\\command\\stderr.log",
|
||||
"bytes": 726,
|
||||
"sha256": "cee474909c10b670a53566563437d87cee181639e801e37b5a7b51e9692bffd3"
|
||||
},
|
||||
"gates/07-gui/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/07-gui/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\command\\context.json",
|
||||
"bytes": 3539,
|
||||
"sha256": "8b96ad95af7fa2b35308f1aacca6342bc131aa7dfd863da5960ad7907f86abd0"
|
||||
},
|
||||
"gates/07-gui/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\command\\inputs-after.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/07-gui/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\command\\inputs-before.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/07-gui/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\command\\output.log",
|
||||
"bytes": 276391,
|
||||
"sha256": "f41e61dde1466a49effc3b88370f70edf3d9bca116bc6bfc2dfcf8d1c1143138"
|
||||
},
|
||||
"gates/07-gui/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\command\\result.json",
|
||||
"bytes": 4171,
|
||||
"sha256": "28a5726e4001652a59f1a8aab47539cf256a48a350b9749d9d3349d0950a80a1"
|
||||
},
|
||||
"gates/07-gui/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\command\\stderr.log",
|
||||
"bytes": 478,
|
||||
"sha256": "d82b0db404deaa998657bf13189afb5c9a88b29ea0fd63d3c3faa13d779b6119"
|
||||
},
|
||||
"gates/08-snapshot/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/08-snapshot/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\command\\context.json",
|
||||
"bytes": 3550,
|
||||
"sha256": "8a69ae1c020d97a816fa6683f668850b3215fe2cfb9fb541b01a52d3367f294a"
|
||||
},
|
||||
"gates/08-snapshot/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\command\\inputs-after.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/08-snapshot/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\command\\inputs-before.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/08-snapshot/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\command\\output.log",
|
||||
"bytes": 40990,
|
||||
"sha256": "12bc7478c31cfae7544f807e65e7c2154eb5784b3dc369854065b2bd99c55956"
|
||||
},
|
||||
"gates/08-snapshot/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\command\\result.json",
|
||||
"bytes": 4191,
|
||||
"sha256": "cee7277ae91a41507481755755b2aacc85e3d0696db5bb30f9800a0c4c56e180"
|
||||
},
|
||||
"gates/08-snapshot/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\08-snapshot\\command\\stderr.log",
|
||||
"bytes": 183,
|
||||
"sha256": "89cc60ca015b395250b57c6495471245529c0f315e250841c83600b860a723b1"
|
||||
},
|
||||
"gates/09-converter-wrapper/command/changes.patch": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\command\\changes.patch",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"gates/09-converter-wrapper/command/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\command\\context.json",
|
||||
"bytes": 4015,
|
||||
"sha256": "9424a3d6e019730d3c3706c55dccf13a5273582a5add9d1827009fe084da86af"
|
||||
},
|
||||
"gates/09-converter-wrapper/command/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\command\\inputs-after.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/09-converter-wrapper/command/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\command\\inputs-before.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"gates/09-converter-wrapper/command/output.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\command\\output.log",
|
||||
"bytes": 165,
|
||||
"sha256": "105cd2a14d06c216616345dc02746661cbb2261fae230c1494154126d4758ad9"
|
||||
},
|
||||
"gates/09-converter-wrapper/command/result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\command\\result.json",
|
||||
"bytes": 4670,
|
||||
"sha256": "0c2a93749eb99e8c2e1456437bc65b07edf0ce20dd4731ec764711bea315fa03"
|
||||
},
|
||||
"gates/09-converter-wrapper/command/stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\09-converter-wrapper\\command\\stderr.log",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"converter/cargo-artifact.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\cargo-artifact.json",
|
||||
"bytes": 1722,
|
||||
"sha256": "6a03cadc613b4d5e4276f84154cc9097883c7621999635685b53d14d136228db"
|
||||
},
|
||||
"converter/cargo-lib.result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\cargo-lib.result.json",
|
||||
"bytes": 1080,
|
||||
"sha256": "9420b2f0830fcd5f3b7aa47389113f0207df632d4c571ed513f2b9dbc5fcaf17"
|
||||
},
|
||||
"converter/cargo-lib.stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\cargo-lib.stderr.log",
|
||||
"bytes": 60,
|
||||
"sha256": "bb76d746acf8827d33e2ea465a2a7e5fa1c6a4d49d77f76f98461f0764efb480"
|
||||
},
|
||||
"converter/cargo-lib.stdout.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\cargo-lib.stdout.log",
|
||||
"bytes": 40032,
|
||||
"sha256": "877b292ea6cc5c026a7d9636d806e994f2f740c7193314e483538d4cd7fd37e0"
|
||||
},
|
||||
"converter/context.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\context.json",
|
||||
"bytes": 2799,
|
||||
"sha256": "8e86beea2fa1092c41d6037f974ad28c0aef19a9393a68bcc8962a0bea3ffcf7"
|
||||
},
|
||||
"converter/converter-build.result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\converter-build.result.json",
|
||||
"bytes": 1749,
|
||||
"sha256": "4be9fbb3ba65f771e8c31b37bae750be2bc0445ec9734a582a19f2dd3fa1a38d"
|
||||
},
|
||||
"converter/converter-build.stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\converter-build.stderr.log",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"converter/converter-build.stdout.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\converter-build.stdout.log",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"converter/inputs-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\inputs-after.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"converter/inputs-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\inputs-before.json",
|
||||
"bytes": 1746401,
|
||||
"sha256": "3288e287198ae7fb322cfb35747506f27761119fb1f96f46ba39515a30e78c73"
|
||||
},
|
||||
"converter/libraries-after.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\libraries-after.json",
|
||||
"bytes": 939193,
|
||||
"sha256": "63019c6a891db6964ef0b4edaf3e3a6c9036b30d02693552d3a977f6cfb64913"
|
||||
},
|
||||
"converter/libraries-before.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\libraries-before.json",
|
||||
"bytes": 939193,
|
||||
"sha256": "63019c6a891db6964ef0b4edaf3e3a6c9036b30d02693552d3a977f6cfb64913"
|
||||
},
|
||||
"converter/rustc-version.result.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\rustc-version.result.json",
|
||||
"bytes": 991,
|
||||
"sha256": "a66a06c9ffa97e1563c07ffbd1a5efa4b2e1f888349bbac01f1948ab8f287471"
|
||||
},
|
||||
"converter/rustc-version.stderr.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\rustc-version.stderr.log",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"converter/rustc-version.stdout.log": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\rustc-version.stdout.log",
|
||||
"bytes": 197,
|
||||
"sha256": "cdaaa400be47332d69e678836251d4635b5ff2ecd34aa962b69d71f8961d274b"
|
||||
},
|
||||
"converter/summary.json": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\summary.json",
|
||||
"bytes": 5561,
|
||||
"sha256": "4772bd6f5025566fe41d0b03d69e9b5b9bd907e2cc72deb36bfed32d43becf8d"
|
||||
},
|
||||
"scripts/run-state-label-check-20260924.py": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\run-state-label-check-20260924.py",
|
||||
"bytes": 2725,
|
||||
"sha256": "4f5fd0845813a27a84921dee6b17391cd872a48f86e0d7659f5c727eb65f821b"
|
||||
},
|
||||
"scripts/prerelease-gates-v2-20260924/run.py": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\prerelease-gates-v2-20260924\\run.py",
|
||||
"bytes": 13814,
|
||||
"sha256": "698ed7182726c77fa4a1c85fc6dd08187ed20689941f57e749e3f0bc845f3252"
|
||||
},
|
||||
"scripts/prerelease-native-preflight-20260924/build_converter-full-deps.py": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\prerelease-native-preflight-20260924\\build_converter-full-deps.py",
|
||||
"bytes": 12695,
|
||||
"sha256": "048441adc856ef07a0f0b1bbbe0157a959bc00cbb0838a8ed18e735082602cb4"
|
||||
},
|
||||
"scripts/prerelease-native-preflight-20260924/bundle_converter.rs": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\prerelease-native-preflight-20260924\\bundle_converter.rs",
|
||||
"bytes": 2279,
|
||||
"sha256": "acbcc955e970e47b4e825f7880af2fa70ca679410ee4d765d28623ea646c4bf6"
|
||||
},
|
||||
"scripts/state-label-native-20260924/aggregate_builds.py": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-native-20260924\\aggregate_builds.py",
|
||||
"bytes": 7965,
|
||||
"sha256": "31023f1901ab49482f14ab103708e71cd34f24c1bed9d90124e40084304fffec"
|
||||
},
|
||||
"scripts/state-label-native-20260924/BUILD-ADMISSION.md": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-native-20260924\\BUILD-ADMISSION.md",
|
||||
"bytes": 5697,
|
||||
"sha256": "5bd950666db498014f3c21ccada768e8fa1e7f1ff965ae1a82b7b170128a024b"
|
||||
},
|
||||
"notes/state-label-test-evidence-20260924.md": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-test-evidence-20260924.md",
|
||||
"bytes": 8810,
|
||||
"sha256": "4894f1d48a4c1ebd34534073b79f6749ce788bfe93ae991d2b9b9bc37b3463de"
|
||||
},
|
||||
"notes/state-label-implementation-review-20260924.md": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-implementation-review-20260924.md",
|
||||
"bytes": 9093,
|
||||
"sha256": "78a98849d23cb75b46147b466d1de69944ef4b5c38a90948cccf08a55b38d04d"
|
||||
},
|
||||
"notes/state-label-layout-715-contract-review-20260924.md": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-layout-715-contract-review-20260924.md",
|
||||
"bytes": 11671,
|
||||
"sha256": "47873b0c1ed80ec3eb8511843b6a10e2be821cf19564bc702167798d10871868"
|
||||
},
|
||||
"notes/state-label-native-tooling-review-20260924.md": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-native-tooling-review-20260924.md",
|
||||
"bytes": 4627,
|
||||
"sha256": "c499c04b0166ec17d863d9ea076cdef1336d3b6d93cbb38b4840ed660c29fe28"
|
||||
},
|
||||
"notes/state-label-collector-review-20260924.md": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-collector-review-20260924.md",
|
||||
"bytes": 2953,
|
||||
"sha256": "80c0ce488a964144db9575db0aeecc4cd660b2aec0eeb5d7821c0879a088f1b7"
|
||||
},
|
||||
"packaging/archive.py": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-automated-evidence-20260924\\archive.py",
|
||||
"bytes": 8048,
|
||||
"sha256": "83e731923a78557c421c5185fb332aee7f096d01aba78fc03fa20ccddaca8900"
|
||||
},
|
||||
"README.md": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-automated-evidence-20260924\\README.md",
|
||||
"bytes": 1598,
|
||||
"sha256": "27309073da687f0a267e2ea445365f47f95313e49170789d56fce74a508ea0a5"
|
||||
}
|
||||
},
|
||||
"omitted_binary_payloads": [
|
||||
{
|
||||
"origin": "gates/07-gui/artifacts/arcadia-studio.exe",
|
||||
"record": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\artifacts\\arcadia-studio.exe",
|
||||
"bytes": 119440896,
|
||||
"sha256": "0401341388025544185455ad5520aa2c1b79ca1387d1a57c2bb0bddb8b23754a"
|
||||
},
|
||||
"reason": "Binary payload omitted; exact hash/path retained"
|
||||
},
|
||||
{
|
||||
"origin": "gates/07-gui/artifacts/attachment_snapshot.exe",
|
||||
"record": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\artifacts\\attachment_snapshot.exe",
|
||||
"bytes": 19189248,
|
||||
"sha256": "08a26d43257f6d611c8efce22551262234890995dbe49c2ee49df09d62eec091"
|
||||
},
|
||||
"reason": "Binary payload omitted; exact hash/path retained"
|
||||
},
|
||||
{
|
||||
"origin": "gates/07-gui/artifacts/libunwind.dll",
|
||||
"record": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-checks-20260924\\07-gui\\artifacts\\libunwind.dll",
|
||||
"bytes": 190464,
|
||||
"sha256": "aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a"
|
||||
},
|
||||
"reason": "Binary payload omitted; exact hash/path retained"
|
||||
},
|
||||
{
|
||||
"origin": "converter/artifacts/bundle_converter.exe",
|
||||
"record": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\artifacts\\bundle_converter.exe",
|
||||
"bytes": 24505856,
|
||||
"sha256": "fbdd7c5696f879eb541516982cefc04bdc7fdf3adc8059b118a7992ea50f8085"
|
||||
},
|
||||
"reason": "Binary payload omitted; exact hash/path retained"
|
||||
},
|
||||
{
|
||||
"origin": "converter/artifacts/liboa_core.rlib",
|
||||
"record": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\artifacts\\liboa_core.rlib",
|
||||
"bytes": 102318950,
|
||||
"sha256": "a00033d489890443d4e5fcefb018d8b4c43d3027bc00d030bb8204fa62f3d362"
|
||||
},
|
||||
"reason": "Binary payload omitted; exact hash/path retained"
|
||||
},
|
||||
{
|
||||
"origin": "converter/artifacts/libunwind.dll",
|
||||
"record": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-converter-70bdcdf8-20260924\\artifacts\\libunwind.dll",
|
||||
"bytes": 190464,
|
||||
"sha256": "aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a"
|
||||
},
|
||||
"reason": "Binary payload omitted; exact hash/path retained"
|
||||
}
|
||||
],
|
||||
"scope": "Byte packaging and existing receipt inspection only. Multiple source pins and failed03 remain explicit. No overall acceptance or publication."
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"archive": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-automated-evidence-20260924\\evidence.zip",
|
||||
"bytes": 6244436,
|
||||
"sha256": "7706302ef7ee5d160a23ff2d562bedb8911b4e6d7ad4c941544088974b539b6e"
|
||||
},
|
||||
"index": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-automated-evidence-20260924\\index.json",
|
||||
"bytes": 45295,
|
||||
"sha256": "3c6d45fb0bffe33c35f1b46d3a2eabc2f89de18d5abc57db0a234dc34165b9f0"
|
||||
},
|
||||
"readme": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-automated-evidence-20260924\\README.md",
|
||||
"bytes": 1598,
|
||||
"sha256": "27309073da687f0a267e2ea445365f47f95313e49170789d56fce74a508ea0a5"
|
||||
},
|
||||
"members": 113,
|
||||
"omitted_binary_payloads": 6,
|
||||
"original_gate_and_converter_inventories_unchanged": true,
|
||||
"recorded_gate_source_inventories_unchanged": true,
|
||||
"scope": "Verified archive integrity and original evidence preservation only"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# #36 integration handoff review
|
||||
|
||||
Ready for the parent's documentation/evidence successor commit, within the stated limits. No actionable findings or material overclaim found. Read-only review on 2026-09-24; no compiler, GUI, model validator/helper or Gitea operation executed.
|
||||
|
||||
Reviewed the experiment README, STATE opening checkpoint, contract status and appended DECISIONS entry against packaged automated/native records, earlier test reconciliation, observations and independent native review. The documents identify tested implementation70bdcdf8fec1728e971cd90ad7f79a1df99777ff, distinguish core gates at2af40c7e27ed9750b9585c07369dbf17a046a92d, and preserve gate03's compile failure at66278ed33b95961d1c129e2ddc172c567effbf9b. Git confirms no oa-core changes between the focused core gate and tested desktop pin. Current tracked modifications are only three harness documents plus the new evidence folder; no source changes were found in this handoff.
|
||||
|
||||
Independent packaged-copy checks:
|
||||
|
||||
- native-evidence.zip:2886914 bytes; SHA256039add524eb99ce855c2dc5680eec01c1d5b7f23024025c428125b9771a8e687;293 members. ZIP CRC test, exact member-name set/no duplicates, every indexed member length/SHA256, and embedded collection.json equality with the external index all pass.
|
||||
- automated-evidence.zip:6244436 bytes; SHA2567706302ef7ee5d160a23ff2d562bedb8911b4e6d7ad4c941544088974b539b6e;113 members. The same CRC/member/hash/index checks pass; embedded README equals its external published copy. All nine archived command-result records match the index, including failed03; successful gate claims retain their individual pins and scopes.
|
||||
- All six archived B/W/U actual Projects independently equal their frozen expected Projects. All54 checkpoint source members match their recorded hashes and original variant bytes. Both archived run launch/close pairs agree on PID, record exit0/null failure/unchanged inputs, and contain empty stdout/stderr. Copied observations.md and native-review.md are exact archived payloads.
|
||||
|
||||
The earlier collector finding is closed by the executed archive: the embedded index is present, byte-identical and included in this independent full readback. Original receipt paths and hashes remain historical identities rather than silently rewritten peer-local paths.
|
||||
|
||||
Accepted limitations are visible and consistent: maximized1605×872 native observations only; unsuccessful restored-window label/Home attempts and their unproven cause retained; rounded68/82 scales; no native group M/Undo/Redo or generic-fallback GUI claim; mounted exact-group/history coverage separate; no universal Unicode/font or all-window guarantee. Linux and wider State/Process congestion remain excluded. No full workspace-test rerun, merged-main acceptance, replacement release, issue closure or broader application completion is implied.
|
||||
|
||||
This review checks handoff integrity and correspondence. It relies on the named independent visual review for screenshot interpretation rather than repeating its image inspection, and on parent observation for the specific Alt+F4 close cause. Independent-machine restored-window follow-up and integration remain with the issue owner.
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"archive": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-native-evidence-20260924\\evidence.zip",
|
||||
"bytes": 2886914,
|
||||
"sha256": "039add524eb99ce855c2dc5680eec01c1d5b7f23024025c428125b9771a8e687"
|
||||
},
|
||||
"index": {
|
||||
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-label-native-evidence-20260924\\collection.json",
|
||||
"bytes": 154086,
|
||||
"sha256": "5a5428a00919d9018123ccfd0644085f733a944545e912fee3bfa8b55371dd0d"
|
||||
},
|
||||
"source_commit": "70bdcdf8fec1728e971cd90ad7f79a1df99777ff",
|
||||
"original_trial_unchanged": true,
|
||||
"scope": "Archive integrity only; consult separate mechanical receipt findings and parent observations"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,41 @@
|
||||
# #36 native visual review: 70bdcdf8
|
||||
|
||||
**Final scope update:** the addendum below completes the fresh-process reopen and process-exit review. The original snapshot's pending statements are retained as history; the unmaximized-input limitation remains open.
|
||||
|
||||
Independent read-only review of original JPG/JSON captures01–15 under `.local/state-label-trial-70bdcdf8-20260924/raw`, the frozen B/W/U inputs, completed save checkpoints and `harness/state-label-layout-contract.md`. All15 full application images were inspected at original resolution; the16×16 secondary captures are not useful application evidence. No GUI input, product/helper execution, build, source/tooling edit or Gitea operation was performed. Fresh-process reopen and final process closure are outside this review snapshot.
|
||||
|
||||
The recorded run01 launcher identifies source `70bdcdf8fec1728e971cd90ad7f79a1df99777ff`, PID5328, preserved GUI SHA256 `0401341388025544185455ad5520aa2c1b79ca1387d1a57c2bb0bddb8b23754a`. All15 capture metadata records identify that executable path. Independently reread manifest SHA256 is `7f1b6cfa8f6ca0c36b0b867f8a2ccf555cea292e8df878af629dac5b63d36ee6`. This is evidence attribution, not a newly rerun executable/build check.
|
||||
|
||||
## Observed result
|
||||
|
||||
No clear title/summary self-overlap, wrapping or ink clipping in the required B/W/U labels was visible in the maximized captures at displayed68% and82%. The text is small at those scales; these screenshots support the concrete cases, not universal glyph containment, perfect legibility at every scale, or pixel-exact font metrics.
|
||||
|
||||
- **B, captures03–07:** `Ready` and `for review` occupy separate rows, followed by the `External · Completion [request_ready]` summary. Captures04 and06 show State transition properties with stable alias `between`; capture05 shows State action properties with alias `action_a` and the exposed `entry / Record request` row selected. Thus the recorded sequence demonstrates distinct observable targets for the covered transition label and exposed row. Capture07 shows `All source files saved`. The broader authored diagram remains crowded and overlaps node territory; this is not evidence of global collision avoidance.
|
||||
- **W, captures08–11:** the input is exactly40 `W` characters, verified from the pinned expected Project. The title occupies one visibly wider line at both scales, with the summary on the next line. Its rightmost ink appears within the visible white label extent; it is not shortened to the old scalar-width box. Capture09 shows `between` selected after the parent's described far-right/padding interaction. A static after-capture confirms the selected object, not the exact preceding pointer trajectory. Capture11 shows saved status.
|
||||
- **U, captures12–15:** the input is exactly `Ready\r\n漢字 é 👩🔧\n` (combining acute, ZWJ sequence and terminal LF verified from the expected Project). The canvas shows two inked title rows and an extra blank cell before the summary, consistent with three title cells plus one summary cell. The second row's marks appear contained; capture13 shows `between` after the described blank-cell interaction, and15 shows `between` in the summary-selection sequence. At this screenshot size I do not claim independently verified shaping of every emoji/code point, nor infer preservation of CRLF from pixels.
|
||||
|
||||
**Preserved ambiguous observation:** captures01/02 are unmaximized1442×842 at displayed79%. Capture02 clearly has `state_a` selected after the parent's attempted click at(660,534). The coordinate/geometry cause has not been resolved by this review. This attempt must remain recorded as unresolved, not silently reclassified as a successful label hit or generalized into a demonstrated product defect. Successful maximized observations do not establish an all-window-size hit pass. Displayed percentages are rounded; no exact world-space movement oracle is inferred from them.
|
||||
|
||||
## Save evidence checked separately
|
||||
|
||||
At inspection, checkpoints `01-B-saved`, `02-W-saved`, and `03-U-saved` each have accepted receipts. I independently hashed the checkpoint `actual.json` and pinned expected file: each full Project file is byte-identical to its expected B/W/U file and the manifest/receipt hashes match. Each checkpoint has nine source files, matching the nine baseline members; every saved file's bytes match both its corresponding immutable baseline and its receipt SHA256. Consequently these pure saves preserve complete Project values and authored source bytes, including title separators and authored label geometry. This conclusion uses saved artifacts, not the screenshots' saved-status text. No claim is made for the unused M movement oracle.
|
||||
|
||||
## Limits and retained history
|
||||
|
||||
Parent reports core68 passes, desktop1540 passes/seven existing ignored, formatting and strict Clippy on the candidate; this visual review does not independently rerun or audit all gate logs. Preserve the earlier desktop gate03 E0382 failure: the initial Shift/mixed regression moved `row` into its selection and reused it. Candidate70bdcdf8 fixes that test-only ownership issue with `row.clone()`; the failed attempt is not a runtime failure and is not erased by the later pass.
|
||||
|
||||
The bounded maximized visual observations and three exact pure-save checkpoints support this label repair. Fresh-process reopen, final close/log evidence and any generic-canvas native claims require their own remaining evidence. Group(+40,+40), preview/settled equality and one-step history are assigned to the fixed-oracle production-input regression; no native group displacement is inferred post hoc. The unmaximized79% target ambiguity remains an explicit limitation unless independently resolved.
|
||||
|
||||
## Final addendum: fresh process, reopen and closure
|
||||
|
||||
Inspected all seven original full-size captures18–24 without repeating the earlier15-image review. Their metadata consistently identifies the pinned GUI path, window263106 and maximized1605×872 dimensions. Run02 launch records identify a fresh PID6100 with the same70bdcdf8 source and GUI hash as run01 PID5328.
|
||||
|
||||
Reopened B at displayed68% retains its separate two-line title and following summary in18;19 shows State transition properties with alias `between` after the parent's recorded summary click(737,518), and20 shows saved status. Reopened U in21/22 retains its two inked title rows and blank-cell separation before summary. Reopened W in23/24 retains the single wide title line and separate summary. No new visible required-case clipping or title/summary self-overlap was found. These are reopen observations in the second process; W/U are not additional fresh-process label-hit trials.
|
||||
|
||||
Independently reread and hashed checkpoints `04-B-reopened`, `05-U-reopened`, `06-W-reopened`: all accepted; each `actual.json` is byte-identical to its corresponding manifest-pinned expected full Project and receipt hash. Each saved source directory again contains nine files, equal in count to baseline and receipt; every file matches its baseline and receipt SHA256. Across the six reviewed save/reopen checkpoints, all complete Projects and source bytes remain exact. No semantic, authored route or title normalization change is inferred or permitted by these comparisons.
|
||||
|
||||
Both close receipts match their launch PID and source pin, report observed exit0, null failure, and `immutable_inputs_unchanged: true`. I independently checked all four stdout/stderr files are zero bytes; their recorded hashes are the empty-file SHA256. These receipts establish successful observed process exit and the launcher's unchanged-input check. The specific normal Alt+F4 close action is parent-observed evidence, not something this read-only reviewer performed or derives from exit0 alone.
|
||||
|
||||
The parent additionally reports that restored run02 Home Recent attempts at(1060,744) and the offset-hypothesis point(1052,713) did not open B; after maximizing, the actual Open point(1147,736) did. This broadens the unresolved observation beyond a State-label target, but does not prove a coordinate-mapping cause. Preserve all attempts. Native hit claims remain limited to the successful maximized trials; the initial79% attempt is still not passed or retrospectively diagnosed.
|
||||
|
||||
**Final bounded verdict:** no new actionable defect found in the reviewed maximized B/W/U presentation, six exact pure-save/reopen checkpoints, or recorded exits/logs. Fresh-process persistence evidence is now complete for these variants. Keep the restored-window input uncertainty, rounded-scale limitation, synthetic movement/history test scope, and absence of universal Unicode/all-window hit guarantees in the published evidence. This addendum does not certify a broader archive/collector or generic-canvas native trial.
|
||||
@@ -0,0 +1,25 @@
|
||||
# State label native observations
|
||||
|
||||
Parent observer: Codex-ytr83r/root, Windows native host, 2026-09-24. Candidate source `70bdcdf8fec1728e971cd90ad7f79a1df99777ff`; isolated profile and unrelated cwd per process. These are parent observations, separate from the machine-readable source/model checks. Original images and their bounds/timestamps are in `trial/raw/` in the collected archive.
|
||||
|
||||
## Inputs and method
|
||||
|
||||
The unchanged original peer fixture B has title `Ready\nfor review` and summary `External · Completion [request_ready]`. W changes only the title to 40 W characters. U changes only the title to `Ready\r\n漢字 é 👩🔧\n`. The stage independently validates their complete Projects and freezes their nine-file source closures. No model, route, or title editing occurred in the GUI. Save used Ctrl+S in place. Native movement M was not executed; exact movement/history remains covered by the mounted production-input regression.
|
||||
|
||||
Native trial used the actual public Fit and + controls. Displayed percentages are rounded, not exact scale measurements. Initial restored-window capture was 1442×842 at displayed79%; accepted coordinate-based checks used the maximized1605×872 window at displayed68% Fit and82% after one + click. No exact100% or DPI calibration claim is made.
|
||||
|
||||
## Observed outcomes
|
||||
|
||||
- B: captures01/03/06 show two title lines followed by a separate summary, without the reported title/summary collision. In the maximized window, click(737,518) at68% selected State transition alias `between` (04); exposed entry-row click(582,519) selected State action alias `action_a` (05). After +, summary click(732,499) at82% selected `between` (06). These targets were read from the actual inspector, not inferred from route color alone.
|
||||
- W: captures08–10 show the long single-line title within the enlarged white label extent and a separate summary. Click(900,514) in the far-right lower label area over State B at68% selected `between` (09), demonstrating the width-dominating title's hit area. Capture10 records82% appearance. Authored labels may still cover node content; this fix preserves their authored centers and is not an automatic collision-free layout claim.
|
||||
- U: captures12–15 show `Ready`, the Unicode line, a blank trailing title cell, and the summary below it. The visible ink fits the label extent at68/82 without a clear self-overlap. Blank-cell click(737,514) at68% selected `between` (13); summary click(731,504) at82% retained the transition (15). These small-font witnesses do not establish universal font/shaping correctness or arbitrary Unicode ink containment.
|
||||
- Ctrl+S completed with `All source files saved` for B/W/U (07/11/16). Checkpoints01-B-saved,02-W-saved,03-U-saved each report accepted=true/failure=null, full Project equality, and byte-exact preservation of all nine original source files for that variant.
|
||||
- Parent closed run01 using Alt+F4. The launcher recorded PID5328 exit0, empty stdout/stderr, and immutable inputs unchanged.
|
||||
- Fresh run02 PID6100 opened with Recent models listing the three exact working paths (17). After maximizing, B reopened through Recent (18); click(737,518) selected `between` again (19), then Save (20). U and W reopened through Recent in this fresh process (21/23) and were saved (22/24). They retained the visible label presentation. Checkpoints04-B-reopened,05-U-reopened,06-W-reopened each report accepted=true/failure=null and the same complete-model/source conservation.
|
||||
- Parent closed run02 using Alt+F4. Its launcher also recorded exit0, empty stdout/stderr, and immutable inputs unchanged. Neither process was terminated programmatically.
|
||||
|
||||
## Unsuccessful input attempts and limits
|
||||
|
||||
The initial restored-window click at requested(660,534), intended for B's summary, selected `state_a` instead (02). This attempt is not a passed label-hit check. On fresh run02, the restored-window Recent B Open button also did not respond to its screenshot-derived(1060,744) click. A one-off frame-offset hypothesis using(1052,713) likewise did not establish a successful Open. Maximizing through the observed accessibility control and clicking the newly observed Recent Open(1147,736) succeeded. This suggests a restored-window input-coordinate issue, but the cause is not proven; no product fix or universal restored-window hit correctness is claimed. The failed attempts are retained rather than recast as success.
|
||||
|
||||
Maximized checks, independent mounted hit regressions at multiple pan/zoom values, and complete Save/reopen comparisons form the scoped evidence. No native group drag, native Undo/Redo, exact1.0 scale, native generic-fallback-canvas interaction, Linux execution, or full-project usability acceptance is claimed here. The automated regressions separately exercise generic State targeting, fixed(+40,+40) group commit, exact Project history, and shared SVG positions. Wider State/Process congestion and dynamic row/header layout remain outside this bounded change.
|
||||
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"archive": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-restored-native-20260925.zip",
|
||||
"bytes": 888553,
|
||||
"sha256": "f120509338fb0ac55480ce11929381fb1a46fecf7d3a1c8869c395335f0eba0a",
|
||||
"crc_ok": true,
|
||||
"all_member_lengths_and_sha256_verified": true,
|
||||
"payload_member_count": 45,
|
||||
"total_member_count": 46,
|
||||
"manifest_sha256": "f9a6997aa4e3b6358814d57b0da60f5d235ce81ac638e139a25bc7664b341624"
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
# #36 restored-window native observation
|
||||
|
||||
Local-only evidence, 2026-09-25 UTC. Parent owns publication/integration. No source code edits, commits, Gitea posts, model content edits, movement, deletion, or renaming were performed.
|
||||
|
||||
## Identity and isolation
|
||||
|
||||
Preserved source commit `70bdcdf8fec1728e971cd90ad7f79a1df99777ff`, earlier evidence commit `57b3fe4bff43a7df602f1567b8867bb1d31051d0`. Before launch rechecked GUI SHA256 `0401341388025544185455ad5520aa2c1b79ca1387d1a57c2bb0bddb8b23754a`; confirmed adjacent libunwind.dll. `launch.json` records executable, child-only LOCALAPPDATA profile, unrelated working directory and PID2892. Copied original immutable baseline B into this evidence directory's `working/B`; original inputs were never opened in the GUI. Seeded private recent-model list with only this copy. `original-source-hashes.json` was recorded before launch.
|
||||
|
||||
All UI input used `node_repl` plus `@oai/sky`, with one action then refresh. Raw original screenshot payloads were saved once under `raw/`, accompanied by metadata without payload duplication. Screenshots were inspected through the tool's original display, not re-emitted or transformed. No capture/input helper errors occurred.
|
||||
|
||||
## Observed sequence
|
||||
|
||||
The restored window remained 1442×932 throughout (screenshot dimensions), with displayed State zoom79%. No maximize, resize, pan or zoom was performed. The fixture opens directly to Behavior & scenarios, Request lifecycle, State multiselect - main.
|
||||
|
||||
| Capture | Action and observed outcome |
|
||||
| --- | --- |
|
||||
| 01-home | Home, private B recent-model card visible. |
|
||||
| 02-open-attempt | Current observed Open clicked at(1061,574); title became State group native and Working status appeared. |
|
||||
| 03-opened | Refreshed without another input; fixture loaded, 0 selected. Ready and for review have separate title rows followed by External · Completion [request_ready]. No observed self-overlap or clipping within this title/summary. |
|
||||
| 04-title-hit | First title row clicked(652,515); inspector State transition, stable alias between. |
|
||||
| 05-clear | Blank canvas click(990,630) did **not** clear selection. Retained as an observation; not counted as reset or transition hit. |
|
||||
| 06-state-b | Click(798,596) selected State, stable alias state_b. |
|
||||
| 07-second-title | Second title row clicked(656,525); inspector State transition, stable alias between. |
|
||||
| 08-state-b | Click(798,596) again selected State, alias state_b. |
|
||||
| 09-summary | Summary clicked(661,534); inspector State transition, stable alias between. |
|
||||
| 10-save | Ctrl+S; bottom status All source files saved. |
|
||||
| 11-close-windows.json | Alt+F4, then fresh list_windows returned no Arcadia windows. |
|
||||
|
||||
Text is small at this zoom. The authored diagram remains crowded, and this is not global collision-avoidance evidence. This new run establishes bounded successful restored-window Home Open and first-title/second-title/summary hits at1442×932/79%, not all-window acceptance. Earlier1442×842/79% and restored Home failures remain recorded in the prior review; their cause is not established or reinterpreted by this success. No exact-world-space movement claim is made.
|
||||
|
||||
## Save and close verification
|
||||
|
||||
`verification.json` and reproducible `verify.py` record all nine source members byte-identical to the immutable original baseline and full Project JSON byte/value-identical to pinned expected B, SHA256 `bf04d72167e8779940dec040f47c7ac0ca69cb7feea35272f2a382c3e73dceb7`. The preserved bundle_converter.exe and attachment_snapshot.exe both returned0 with their previously recorded hashes; their stderr logs are empty. GUI stdout/stderr are both zero bytes.
|
||||
|
||||
Preserved failed verification attempt: attachment_snapshot.exe was first invoked directly on project.arcadia and rejected includes with `Error: Text("4:5: An include requires a source bundle; single-string parsing never reads files.")`; no actual.json was created then. The correct established converter-then-snapshot flow above subsequently passed. This was a verification invocation error, not a GUI/model defect.
|
||||
|
||||
Normal Alt+F4 close was directly performed and disappearance observed. The attached PowerShell process watcher records has_exited=true in `close.json`, but ExitCode is null. Therefore this run claims observed process termination, **not** observed exit0. No warning or crash appeared; GUI logs remain empty.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Independent review: #36 restored-window observation
|
||||
|
||||
Accept the bounded successful observation at 1442 x 932 / 79% as additional evidence. It does not resolve the earlier 1442 x 842 failures, establish their cause, certify arbitrary restored sizes, or establish GUI exit code 0. No material contradiction found in the bounded outcome.
|
||||
|
||||
Reviewed `.local/state-restored-native-20260925` and its sibling ZIP against original `.local/state-label-trial-70bdcdf8-20260924/baseline/B` and `expected/B.json`. Read REPORT, verification/launch/close receipts, package manifest, verification/package scripts, and raw screenshot metadata. No UI input, builds, model/source edits, publication or Gitea actions. This review file is the only write.
|
||||
|
||||
## Independently checked
|
||||
|
||||
- ZIP CRC test passed. Exact member set: 45 payload files plus PACKAGE-MANIFEST.json. Every payload length/SHA256 matched the manifest and current loose file bytes. Manifest bytes matched the ZIP copy and external receipt hash. ZIP is 888553 bytes; SHA256 `f120509338fb0ac55480ce11929381fb1a46fecf7d3a1c8869c395335f0eba0a`. Manifest SHA256 `f9a6997aa4e3b6358814d57b0da60f5d235ce81ac638e139a25bc7664b341624`.
|
||||
- All nine saved source members, including their relative-path set, are byte-identical to the original trial's immutable baseline B. Captured actual.json is byte-identical and JSON-value-identical to original expected/B.json; SHA256 `bf04d72167e8779940dec040f47c7ac0ca69cb7feea35272f2a382c3e73dceb7`.
|
||||
- Preserved converter and snapshot executable hashes match verification.json. GUI executable independently rehashed as `0401341388025544185455ad5520aa2c1b79ca1387d1a57c2bb0bddb8b23754a`, matching launch.json. No helpers were rerun; converter/snapshot exit results remain recorded receipts. Source-byte identity and full snapshot identity were independently recomputed.
|
||||
- All ten raw JPEGs were independently viewed without editing/cropping. Their decoded dimensions are 1442 x 932, consistent with metadata. State captures display 79% and the restored-window titlebar control. Home Open progresses from the copied B recent entry, through Working, to the loaded fixture.
|
||||
- Capture03 has no selection. Capture04 shows State transition / stable alias `between` after the first-title action. Capture05 retains that selection following the blank-canvas action, as the report explicitly states. Captures06/08 show State / `state_b`; captures07/09 return to State transition / `between`, making the second-title and summary observations nonvacuous. Capture10 shows All source files saved.
|
||||
- The transition's two title rows and following summary are vertically distinct. Text is small and the diagram remains crowded; this is not a global readability or collision-avoidance pass. Screenshot state supports reported action outcomes, while exact input coordinates/action chronology come from the operator report, not independent replay.
|
||||
- close.json says has_exited=true with exit_code=null; final window inventory is empty. GUI stdout/stderr are empty. This supports observed termination only. Alt+F4 cause is the operator's recorded action; empty logs do not prove exit0.
|
||||
|
||||
## Scope and handoff qualifications
|
||||
|
||||
The original source pin is reported as `70bdcdf8fec1728e971cd90ad7f79a1df99777ff`; executable-to-source provenance inherits the original trial's build/staging evidence. This review independently binds the executable bytes, not a new build.
|
||||
|
||||
This success at 1442 x 932 cannot falsify a failure at 1442 x 842 or explain prior restored Home failures. Preserve both observations and keep #36's wider acceptance open. Source save with no model content changes proves preservation in this run, not changed-content persistence or a fresh-process reopen.
|
||||
|
||||
The failed direct snapshot invocation is preserved narratively in REPORT; the packaged snapshot stderr is the successful rerun's empty log. Do not describe the package as containing an independently reviewed raw log of that failed attempt.
|
||||
|
||||
The package omits executables and the original baseline/expected inputs. Publication should retain explicit links to the original trial evidence/source pin for reproducible comparison. This review makes no publication or integration claim.
|
||||
|
||||
Audit method: read-only Python standard-library ZIP CRC/member checks, SHA256 and complete byte/JSON equality against original trial files; Pillow image dimension decoding; view_image inspection of all ten raw images; PowerShell file hashing. No production decoder or GUI rerun.
|
||||
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"archive": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\state-restored842-native-20260925.zip",
|
||||
"bytes": 661746,
|
||||
"sha256": "3efb41d79a9dab70d7026ba83a7f9ec60a319fab79a8f0a383f3ce7a71b0f42f",
|
||||
"crc_ok": true,
|
||||
"all_member_lengths_and_sha256_verified": true,
|
||||
"payload_member_count": 43,
|
||||
"total_member_count": 44,
|
||||
"manifest_sha256": "d51dc48095ba881b99ab745267830402fe4a164a680d85415c7b5f7383f6a15d"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# #36 exact1442x842 trial: unexecuted after bounded resize failure
|
||||
|
||||
Local-only 2026-09-25 evidence; parent owns publication/integration. No production source changes, compiler runs, git, Gitea, model Open/Save, content changes, or diagram movement.
|
||||
|
||||
The requested1442x842 window was not obtained. Home recent Open and79% title/second-title/summary trials at that size are **unexecuted**, not passed. Earlier restored-window uncertainty remains open. These resize/tool outcomes are not attributed to an application defect.
|
||||
|
||||
## Identity and isolation
|
||||
|
||||
Same preserved70bdcdf8fec1728e971cd90ad7f79a1df99777ff GUI, SHA256 rechecked before launch: `0401341388025544185455ad5520aa2c1b79ca1387d1a57c2bb0bddb8b23754a`. Adjacent libunwind.dll confirmed. launch.json records PID7500, executable, private child-only LOCALAPPDATA and cwd. Immutable original B copied to working/B and private recent-model list seeded; original-source-hashes.json captured before launch.
|
||||
|
||||
UI used only supported @oai/sky through node_repl. Original screenshots saved once; no payload re-emission or transformation.
|
||||
|
||||
## Every action and observation
|
||||
|
||||
| Capture | Action / result |
|
||||
| --- | --- |
|
||||
| 01-initial | Home at1442x932; private recent B visible. |
|
||||
| 02-resize | Bottom-area drag from(720,930) to(720,840); still1442x932. |
|
||||
| 03-system-menu | Alt+Space; visible system menu with Size. |
|
||||
| 04-size-mode | Press s; menu closes;1442x932. |
|
||||
| 05-bottom-size-mode | Down;1442x932. |
|
||||
| 06-size-up | Up; observed1442x921. |
|
||||
| no07 capture | Attempted click(720,841) to set edge; tool rejected with exact error below. No claim click delivered. |
|
||||
| 08-resize-recovery | Per skill, activate target and refresh; observed1442x732. This is observation, not diagnosis of why height changed. |
|
||||
| 09-finish-size | Return; remains1442x732. |
|
||||
| no10 capture | Final bounded drag from observed lower border(720,731) to(720,841) rejected with bounds error below. |
|
||||
| 11-before-close | Fresh observation1442x732, still Untitled mission Home. |
|
||||
| 12-close-windows.json | Normal Alt+F4, then list_windows returned no Arcadia windows. |
|
||||
|
||||
Exact first rejection:
|
||||
`point (779, 893) is over ChatGPT.exe "Chrome Legacy Window", not target window arcadia-studio.exe "Untitled mission — Arcadia Studio"; activate the target or take a fresh screenshot before retrying`
|
||||
|
||||
Exact final rejection:
|
||||
`point (720, 841) is outside window bounds { originX: 0, originY: 0, width: 1442, height: 732 }`
|
||||
|
||||
After both errors prior coordinates were discarded; final fresh observation preceded normal close. No other app was automated or intentionally targeted.
|
||||
|
||||
## Integrity and closure boundaries
|
||||
|
||||
verify.py/verification.json use the preserved converter and snapshot helpers to compare the **unopened, unsaved copy** to original immutable B. All9 source bytes and full Project bytes/values match. This is fixture integrity only, not native save evidence. Helpers both returned0; GUI stdout/stderr empty. Normal Alt+F4 and window disappearance directly observed; exit code was not captured. No exit0 claim.
|
||||
|
||||
The archive contains report, script/results, source copy/hashes, original screenshots/metadata, launch/profile and logs. Executables and DLLs excluded. No claim of842 interaction, reopened persistence, or universal window-size correctness.
|
||||
@@ -0,0 +1,36 @@
|
||||
# #36 implementation review at 2af40c7
|
||||
|
||||
Read-only source review of `2af40c7e27ed9750b9585c07369dbf17a046a92d` in `.local/state-label-layout-20260924`, confirmed clean after writers settled. This is a preliminary implementation review, not final acceptance. No independent compilation, GUI or runtime tests; parent owns execution. I authored the separate State canvas regression include earlier, so review of those tests is a consistency check, not independent authorship review.
|
||||
|
||||
**Follow-up status:** the P2 below is closed at source-review level by `1f471288284102f46f67075765568dbf5856474b`, inspected in clean `.local/state-label-hit-review-20260924` with exact parent `2af40c7e27ed9750b9585c07369dbf17a046a92d`. Integration and execution remain parent-owned; no native acceptance is claimed. No new actionable finding in this bounded follow-up.
|
||||
|
||||
## Actionable finding
|
||||
|
||||
**P2 — Generic diagram surface paints State labels above nodes but still selects the covered node.** This is a reachable surface: `views.rs:403` includes dedicated State diagrams in the saved-view picker (only Scenario is excluded), constructs `DiagramCanvas` at470, and `app.rs:3697` sends non-Scenario choices to `Page::Diagram`. The new generic painter defers State label rectangles/text until after nodes (`diagram.rs:1491`), matching their visible foreground position. However `diagram.rs:331` context targeting, `diagram.rs:999` ordinary press, and `diagram/multiselect.rs:206` production group/Shift targeting still resolve nodes before labels. Additionally `DiagramCanvas::hit_label` at428 chooses nearest center rather than the last painted overlapping State label. The same authored label over a State therefore looks selectable but returns the obscured placement in this supported view; two overlapping State labels can choose the obscured one.
|
||||
|
||||
Use one dedicated-State-plan background hit helper in the relevant generic target paths, before ordinary node targets but after existing explicit selected-handle decisions, with reverse actual label paint order. Keep non-State label/node priority unchanged. Cover generic ordinary click, context target and Shift target at a fixed label-over-node point; cover overlapping State labels with the lower label selected. The existing generic `detached_label_selects_connection_and_occluding_card_owns_its_hit` test describes non-State behavior and should continue to pass. Alternatively explicitly remove/restrict this supported surface, but that would be a larger product change than the local target fix.
|
||||
|
||||
**Repair constraint:** an unconditional non-Shift handle `return None` in generic `group_input` would bypass mixed-selection refusal: the ordinary route-edit path has no StateCanvas-style singleton gate. Instead resolve a dedicated-State selected attachment/bend to `Target::Edge(selected)` before the State-label prepass, then use existing Shift/group admission. The existing singleton/nonmember fallthrough already reaches ordinary handle editing where allowed. A selected Edge+Placement group must remain captured/refused, and Shift on a handle must toggle that handle's exact Edge even when another label overlaps it. This challenges the proposed follow-up design; it is not an additional defect introduced in the reviewed commit.
|
||||
|
||||
## Reviewed coherent behavior
|
||||
|
||||
- Core builds `StateLabelLayout` only for a StateTransition in a dedicated State projection. The raw global48 summary remains `EdgeLabelGeometry.text`; fixed title budget is computed from that raw excerpt before width measurement. LF/CRLF/CR and declared Unicode separators become explicit cells; blank/trailing cells survive; tab expansion is display-only. Title and summary positions share 12-unit cells, minimum24 height and five-unit horizontal padding.
|
||||
- `state_label::measure_line` matches installed `iced_graphics-0.14.0/src/geometry/text.rs::Text::draw_with`: same Paragraph implementation, global font system, font/shaping/alignment defaults, font10, absolute12 and infinite bounds. Helper wrappingNone versus painter default wrapping cannot introduce width wrapping at infinite width for these already split lines. Paragraph advance plus padding still needs the declared native ink-containment checks; no universal Unicode claim follows from the source review.
|
||||
- Production desktop routing consumers found by source search all call the measured wrapper, including ordinary/preview scene, Fit, State Fit, usage/focus, State bend setup, generic export and work/allocation geometry. Remaining direct core routing calls are tests. Measurement occurs before collision placement; core remains font-independent and derived plans are not serialized.
|
||||
- Dedicated State hit order matches its opaque backgrounds and reverse stable edge paint order. Endpoint/bend checks and group admission remain at their existing input sites. Raw summary prefix, not normalized display lines, feeds typed-reference visibility, preventing CRLF byte-offset corruption. The State projection admits only non-Internal StateTransition edges, so the painter's plan-only branch does not suppress another supported label kind there.
|
||||
- Settled SVG now emits the planned escaped lines and opaque backgrounds after nodes; the actual export test exercises this ordering, beyond the isolated string helper test. Non-State SVG label placement is preserved.
|
||||
- The diff contains no semantic model/schema/serialization change and does not author node sizes, route fraction/offset or waypoints. Automatic label centers may change from corrected bounds as intended. Existing scene caching still avoids recomputation on unchanged hover/selection; shaping adds bounded work per retained line when routing actually occurs. No concrete performance blocker found in this bounded static review.
|
||||
|
||||
## Test assumptions and remaining evidence
|
||||
|
||||
The new State canvas fixed-point fixture is defensible from source, rather than adjusted to returned geometry: B at(760,180),224x94 has Bottom0.5 attachment(872,274); the shape inset is zero at the side midpoint. Fraction0 and offset(-432,-14) give center(440,260). A's single entry row occupies y244..270. Thus (440,260) exercises covered row ownership, (440,272) the summary over the State header, and (200,260) the exposed row. Moving both B/C by(0,320) moves the anchor/label center by the same amount with the original authored offset; no waypoints require translation. The assertions deliberately fail if these declared assumptions cease to hold.
|
||||
|
||||
Those tests cover synthetic dedicated-canvas interactions and cancelled group preview; they do not establish native glyph containment, generic-canvas targeting, actual peer-fixture pixels, settled-move equality, or save/reopen/Undo. Parent's focused/full tests and native acceptance still need to supply their assigned evidence. The transient syntax/duplicate-tail states observed while writers were active were corrected before this pinned review and are not open findings.
|
||||
|
||||
## Generic hit repair follow-up at 1f471288
|
||||
|
||||
Inspected the exact three-file commit diff and all230 lines of its new `diagram/state_label_input_tests.rs`; no source writes, compiler or product execution. `hit_state_label` now resolves only actually painted, nonempty State-plan rectangles in reverse stable paint order. Generic context targeting and ordinary click consult it before ports/nodes, while selected attachment/bend controls remain earlier. Selected label dragging requires that selected label to be the frontmost one; the lower selected label cannot steal the upper label's click. The existing nearest-center/non-State path stays intact.
|
||||
|
||||
Generic group input resolves a selected State attachment/bend to the exact Edge target before the label target and then passes through the existing Shift, singleton/nonmember, editability and mixed-group checks. It does not introduce the previously challenged unconditional handle fallthrough. For a selected Edge+Placement set, a handle press creates the existing unsupported group lifecycle and threshold release refuses; a singleton still falls through to the ordinary handle edit. Shift on the overlapped selected handle toggles that handle's Edge, while Shift away from handles toggles the front label. No global edge-first policy or non-State ordering change was introduced.
|
||||
|
||||
The added tests exercise the real generic Program path at three zooms/nonzero pan, plain/context selection above a node, lower-selected overlap, front-label drag, read-only selection, Shift label-versus-handle identity, selected bend continuation and mixed refusal. At half zoom the pointer is deliberately17 world units below the central bend, beyond its16-unit radius and still within the18-unit half-height; this is a valid independent separation of label and handle hit regions. Fixture setup uses routing only to author an offset placing both labels at the separately declared(200,150) target, not to choose the expected winning Edge. These tests remain unexecuted by this reviewer. Existing attachment tests still need their scheduled run; the new focused handle regression directly covers a bend rather than an attachment.
|
||||
@@ -1,87 +0,0 @@
|
||||
# Projection switching and canvas inspection
|
||||
|
||||
Branch contribution for [#42](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/42)
|
||||
and [#43](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/43),
|
||||
based on published preview `715036e132677dd2bc2fb37ed316d93dc9987aec`.
|
||||
Owner: Codex-ytr83r, session 01a0d706. This is a candidate, not integrated
|
||||
acceptance or a replacement release. Live status belongs to the linked issues.
|
||||
|
||||
## Decision and alternatives
|
||||
|
||||
String projections are presentation filters over one authored diagram. Preserve
|
||||
opposite-layer placements, routes and visibility selections when switching away
|
||||
from Traceability; ordinary projections render only their declared layer. This
|
||||
extends the existing documented preservation of inapplicable element kinds.
|
||||
Deleting incompatible placements loses authored arrangements; automatically
|
||||
creating a second view fragments the user's work and makes repeated switching
|
||||
ambiguous. Neither alternative satisfies reversible view switching as directly.
|
||||
|
||||
Missing identities and wrong reference kinds/families remain errors. StateMachine
|
||||
and Scenario keep strict typed membership. Frozen versions 1–6 retain their old
|
||||
layer admission before migration. The current version-7 correction adds no fields
|
||||
or wire shapes; older version-7 readers may reject newly admitted latent records.
|
||||
That compatibility limit must remain explicit until coordinated version adoption.
|
||||
The explicit RelocateNode operation continues to require a compatible destination
|
||||
layer or Traceability view; retaining latent records is distinct from moving a
|
||||
placement into an incompatible destination.
|
||||
|
||||
Canvas inspection carries the originating route context and preserves view/layer.
|
||||
Explicit model navigation continues to follow the target layer. Draft validation
|
||||
and stale-context rejection apply before inspection. Existing production group
|
||||
selection already retained the canvas; fallback edge/port selection and canvas
|
||||
context actions require the correction. The published Windows baseline reproduces both reported failure states;
|
||||
source diagnosis and those baseline results do not establish patched acceptance.
|
||||
Contextual child/relationship creation must derive the semantic layer from the
|
||||
selected object, while root creation continues to use the active perspective.
|
||||
|
||||
## Acceptance
|
||||
|
||||
- OA and SA switches through all ordinary projections preserve the complete model
|
||||
except projection, source/JSON/bundle round trips, and one-step Undo/Redo.
|
||||
- Returning to Traceability restores applicable placements; parent, port and edge
|
||||
projection never leaks an opposite-layer record into an ordinary view.
|
||||
- Invalid references and State/Scenario membership still reject; source and JSON
|
||||
versions 3–6 retain their old layer checks and located diagnostic identities.
|
||||
- Actual canvas clicks, context Properties/Hide and explicit navigation exercise
|
||||
the intended selection distinction; stale packets and invalid drafts preserve
|
||||
selection and source/history.
|
||||
- Windows native selection, projection switching, Save, Undo/Redo and fresh reopen
|
||||
are checked against predeclared full-model/source expectations. Compilation and
|
||||
automated handler tests do not substitute for this acceptance.
|
||||
|
||||
Linux remains excluded by the existing user pause. Independent design critique
|
||||
identified saved visibility selectors and frozen migration as additional admission
|
||||
paths; both are included. At published candidate `603a59c1785dbcca324dae063ecc3405d9519a30`, 41 targeted core checks pass: legacy admission (2), projection switching (3), review regressions (15), source-6 view contract (8), and state diagrams (13). Tracked inputs were unchanged across the run. Whole-workspace formatting also passed at that commit. The first `0341bca` core attempt failed a generated-UUID test oracle; explicit fixture identities corrected the evaluator, without relaxing the admission assertion.
|
||||
|
||||
The desktop attempt at `603a59c` was deliberately interrupted before test execution after independent source review found canvas Properties redispatch and contextual relationship/child semantic-layer defects. Its source inputs remained unchanged; no desktop passing result is claimed. The Properties issue arose from fixing explicit navigation to an already-inspected opposite-layer object. Keep both regressions: contextual Properties stays in the view, explicit navigation follows the object's layer.
|
||||
|
||||
Published-preview executable SHA256 `2c03bd6cc3f1110c219e4f57ab94874a121590f83779239a93289b7170664399` reproduces edge selection changing SA to OA, and Architecture switching refused with `diagram_layer`. The isolated valid fixture remained byte-for-byte unchanged after the trial. An earlier fixture used reserved alias `capability` and was rejected; it was corrected before either reproduction. Initial native-dialog capture/input failures also remain separate from application acceptance. Independent evidence review confirmed the resulting screenshot states and persisted byte equality; screenshots alone do not capture the complete action sequence or transient state history.
|
||||
|
||||
The frozen full-workspace attempt at `3a7221b80cfa7924921b3b77f2dd35550247f595`
|
||||
closed with unchanged tracked inputs and Cargo exit101: core/CLI groups passed616
|
||||
with1 existing ignore; desktop passed1538, failed1 and retained7 existing ignores.
|
||||
The sole failure was the new preferred-view test's setup, before child creation:
|
||||
`Message::Projection` edits and selects the diagram, so the test's expectation
|
||||
that the parent remained selected was false. An exact isolated rerun and source
|
||||
review confirmed this. The correction initializes the projection in the fixture,
|
||||
then uses explicit parent selection and the ordinary diagram picker to establish
|
||||
independent semantic inspection. Production navigation is unchanged. All other
|
||||
new canvas tests passed, including Properties, explicit navigation, relationship
|
||||
Apply/history, child/root semantic layer, and projection/source/history checks.
|
||||
The command remains a failed workspace run; server tests and doctests were not
|
||||
reached. Its planned Clippy/build stages were consequently not launched.
|
||||
|
||||
The same source's formatting check found one multiline icon call requiring a
|
||||
single line. The follow-up applies that formatting correction and adds in-app
|
||||
help describing preserved cross-layer content and contextual inspection. Those
|
||||
are the only production-file changes after the full suite; the remaining change
|
||||
corrects the test setup. Follow-up canvas/server/doctest, formatting, strict
|
||||
Clippy and native-build results must be recorded separately, with their exact
|
||||
source pin. Reuse successful unchanged core/desktop evidence within these limits;
|
||||
do not turn the failed workspace command into a pass.
|
||||
|
||||
Candidate Windows GUI save/history/reopen, HTTP regression, the corrected test
|
||||
and final checks remain outstanding. Raw local evidence is not yet a
|
||||
peer-consumable handoff; publish the consolidated evidence before integration.
|
||||
|
||||
Scope boundary: contextual relationship forms retain the canvas while opening; successful Apply retains the existing explicit post-review navigation. The generic child-creation handler is tested for containment and allocation, but the separate architecture palette/performer workflow still offers creation kinds for the diagram layer. Thus an OA performer displayed in an SA Traceability view has no Add activity menu entry; this inherited limitation is not claimed repaired here.
|
||||
@@ -204,3 +204,8 @@ are recorded in release-routing-verification.md. The measured release full solve
|
||||
is 119 ms, so the initial settled target is not claimed as passed. Current Linux
|
||||
verification and broader release acceptance remain separate from the completed
|
||||
routing workflows.
|
||||
|
||||
Dedicated State transition title/summary layout, measured desktop label bounds
|
||||
and painted-label hit ownership are specified in
|
||||
[the State label layout contract](state-label-layout-contract.md). This derived
|
||||
presentation follow-up does not change authored routing metadata.
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# State transition label layout
|
||||
|
||||
Derived presentation contract for [issue #36](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/36), based on source `715036e132677dd2bc2fb37ed316d93dc9987aec`. This follow-up is separate from the frozen September 24 prerelease. Implementation at `70bdcdf8fec1728e971cd90ad7f79a1df99777ff` has [scoped Windows test/build and native Save/reopen evidence](experiments/state-label-layout-20260924/README.md), including an explicit restored-window input limitation. Integration status belongs to the issue.
|
||||
|
||||
## Scope and decision
|
||||
|
||||
The reproduced external transition title `Ready\nfor review` occupies two lines, while the old painter reserved only one line before its summary `External · Completion [request_ready]`. Routing sized the box from the summary alone. The correction is one derived title/summary layout on routed labels in dedicated State projections. Other projections, State headers, action rows and internal-transition rows retain their existing layout.
|
||||
|
||||
The layout is prepared before label placement, so painting, collision avoidance, hit bounds, focus, previews and SVG share it. Core accepts a line-width measurement callback without a font dependency. Desktop consumers use the same Iced Paragraph font, size, shaping and line-height configuration as their canvas text. Core-only callers retain an explicitly approximate deterministic width fallback. No semantic model or serialized layout field is introduced.
|
||||
|
||||
Flattening line breaks would lose the authored presentation. Enlarging only the paint background would leave focus and selection inconsistent. A scalar-width estimate is insufficient for a width-dominating title such as 40 `W` characters. Dynamic node/row layout is outside this reproduced defect and would change unrelated State placement and group-editing contracts.
|
||||
|
||||
## Excerpts and display lines
|
||||
|
||||
Keep the existing summary excerpt: at most 48 Unicode scalars of the original summary, taking 47 and an ellipsis when longer. `EdgeLabelGeometry.text` retains this raw excerpt. Typed usage visibility compares this original prefix with the original summary; normalization must never change the field offsets or expose text after the cutoff.
|
||||
|
||||
For compatibility, the title budget is fixed from the old summary width, before new measurement: `floor((7*N+6)/6)`, where `N` is the retained raw summary's scalar count. Apply the existing whole-prefix-and-ellipsis rule to the raw title. This is a bounded excerpt, not a promise to retain breaks beyond its cutoff.
|
||||
|
||||
In each retained excerpt, CRLF is one display break; LF, bare CR, NEL, Unicode line separator and paragraph separator are also breaks. Tabs display as four spaces. These transformations do not modify source or raw usage provenance. Empty blocks have zero lines. Nonempty trailing and blank lines are preserved: `A\n` and `\n` each have two cells. A CR at an excerpt boundary is a break even if its LF was truncated.
|
||||
|
||||
Each line uses font size 10 and an explicit 12-unit line cell, without wrapping. The summary begins after all title cells. Width is the maximum measured displayed-line advance plus five units of padding on each side. Height is at least 24 units and otherwise 12 times the total line count. Lines start at `(5, 12*index)` relative to the shared box. Authored fraction, offset, center, attachments and waypoints remain unchanged. Automatic label positions may change because their obstacles are now accurate.
|
||||
|
||||
## Hit ownership and consumers
|
||||
|
||||
The dedicated State canvas paints opaque label backgrounds after nodes and rows. Its ordinary hit test therefore checks those same rectangles before nodes/rows, in reverse label paint order. Padding and blank cells belong to the rectangle. Existing selected endpoint/bend handling remains earlier; path-distance ties, group admission and `(placement, relation)` row identities remain unchanged. Exposed adjacent row pixels still select that exact row. This deliberately does not model every crossing route-stroke pixel.
|
||||
|
||||
Scene routing, edge/group previews, usage/focus queries, generic canvas paths receiving a State plan and SVG all consume the measured plan. SVG emits explicit positions for each line and the same font-size declaration; exact appearance under an external viewer's substituted font is not guaranteed.
|
||||
|
||||
## Acceptance
|
||||
|
||||
- Exact peer fixture: two title cells followed by one summary cell, readable and selectable at its last line, with full Project/source conservation.
|
||||
- Bounds falsifiers: 40 `W` title characters and a fallback/combining-text case, plus blank lines and separators. Inspect actual native glyph containment; Paragraph advance alone is not a universal ink-overhang proof.
|
||||
- Raw-prefix provenance across CRLF and multibyte text, typed fields at/after the cutoff, and duplicate names in unrelated prose.
|
||||
- Label over node selects the Edge; adjacent exposed row keeps its StateRow identity; overlapping labels choose the last painted. Shift selection, mixed-group refusal and existing handles keep their contracts.
|
||||
- Preview and settled scene bounds agree after movement; nonzero pan/zoom has no stale hit rectangle. Save/reopen and Undo/Redo preserve the independently declared source/model oracles.
|
||||
|
||||
Use meaningful automated checks and the actual Windows GUI. Linux is excluded by the user's current instructions. Publish verification and limitations with the implementation before closing #36.
|
||||
Reference in New Issue
Block a user