Make participant ports and hierarchical model navigation discoverable
Add focused containment browsing, contextual paged search, clear outline depth and direct component-port creation and connection actions. Share exact boundary feasibility checks to avoid whole-project validation for each picker candidate. Preserve source/property drafts and interrupted-save recovery state, document source-project behavior, and record Windows/Linux native verification and independent review fixes.
This commit is contained in:
@@ -2385,6 +2385,29 @@ pub fn can_connect(p: &Project, kind: RelationKind, source: Id, target: Id) -> b
|
||||
}
|
||||
!issues.iter().any(|i| i.severity == Severity::Error)
|
||||
}
|
||||
|
||||
/// Feasibility for a boundary exchange with its actual orientation. This checks
|
||||
/// only the proposed relationship, so endpoint pickers need not clone and
|
||||
/// revalidate the complete model for every port. Legacy directions remain fixed
|
||||
/// even when the exchange is unoriented.
|
||||
pub fn can_connect_boundary(p: &Project, source: Id, target: Id, oriented: bool) -> bool {
|
||||
let candidate = Relation {
|
||||
id: Id::nil(),
|
||||
alias: "candidate".into(),
|
||||
name: String::new(),
|
||||
description: String::new(),
|
||||
body: RelationBody::BoundaryExchange {
|
||||
source,
|
||||
target,
|
||||
oriented,
|
||||
items: vec![],
|
||||
},
|
||||
};
|
||||
let mut issues = vec![];
|
||||
validate_relation(p, &candidate, &mut issues);
|
||||
validate_relation_context(p, &candidate, &mut issues);
|
||||
!issues.iter().any(|i| i.severity == Severity::Error)
|
||||
}
|
||||
/// Aggregate display information only; this never creates inherited allocations.
|
||||
pub fn allocation_summary(p: &Project, work: Id) -> Option<Id> {
|
||||
let root = p.elements.get(&work)?;
|
||||
|
||||
Reference in New Issue
Block a user