Integrate typed port authoring and reviewable exchange workflows
This commit is contained in:
@@ -133,7 +133,7 @@ pub fn view(app: &App) -> View<'_, Message> {
|
||||
let mut creation = column![label("CREATE ELEMENT")].spacing(8);
|
||||
let kinds = Kind::ALL
|
||||
.into_iter()
|
||||
.filter(|k| k.supports(app.layer))
|
||||
.filter(|k| k.supports(app.layer) && *k != Kind::Port)
|
||||
.collect::<Vec<_>>();
|
||||
creation = creation.push(
|
||||
pick_list(kinds, Some(app.create_kind), Message::CreateKind)
|
||||
@@ -646,6 +646,20 @@ fn inspector(app: &App) -> View<'_, Message> {
|
||||
}
|
||||
}
|
||||
let kind = p.elements.get(&app.selected).map(Element::kind);
|
||||
let port_actions = crate::port_workflow::actions(p, app.selected);
|
||||
if !port_actions.is_empty() {
|
||||
body = body.push(
|
||||
pick_list(
|
||||
port_actions,
|
||||
None::<crate::port_workflow::Action>,
|
||||
Message::PortAction,
|
||||
)
|
||||
.placeholder("Port and exchange actions…")
|
||||
.text_size(12)
|
||||
.padding(9)
|
||||
.width(Fill),
|
||||
);
|
||||
}
|
||||
let contextual: &[(&str, RelationKind, bool)] = match kind {
|
||||
Some(Kind::OperationalMission | Kind::Mission) => &[
|
||||
(
|
||||
@@ -1122,6 +1136,40 @@ fn checks(app: &App) -> View<'_, Message> {
|
||||
"Structural validity and engineering completeness, with direct navigation."
|
||||
)]
|
||||
.spacing(15);
|
||||
if let Some(report) = &app.migration {
|
||||
let mut card = column![text(format!("Imported schema {} → {}", report.from_schema, report.to_schema)).size(19),
|
||||
label("Import preserves the original file. Saving explicitly writes the current schema; legacy associations remain available for review.")].spacing(8);
|
||||
for port in &report.preserved_ports {
|
||||
card = card
|
||||
.push(action(
|
||||
&format!("Preserved port · @{}", port.alias),
|
||||
Message::Select(port.id),
|
||||
))
|
||||
.push(label(&port.required_resolution));
|
||||
}
|
||||
for endpoint in &report.generated_endpoints {
|
||||
card = card
|
||||
.push(action(
|
||||
&format!("Created {} endpoint · @{}", endpoint.side, endpoint.alias),
|
||||
Message::Select(endpoint.port),
|
||||
))
|
||||
.push(label(format!(
|
||||
"Owner: {} · exchange: {}",
|
||||
app.project().named(endpoint.owner),
|
||||
app.project().named(endpoint.exchange)
|
||||
)));
|
||||
}
|
||||
for boundary in &report.orientation_defaults {
|
||||
card = card.push(action(
|
||||
&format!(
|
||||
"Preserved directed exchange · {}",
|
||||
app.project().named(boundary.exchange)
|
||||
),
|
||||
Message::Select(boundary.exchange),
|
||||
));
|
||||
}
|
||||
out = out.push(container(card).padding(18).style(style::card));
|
||||
}
|
||||
if issues.is_empty() {
|
||||
out = out.push(
|
||||
container(
|
||||
|
||||
Reference in New Issue
Block a user