Fix exchange-only process continuation with explicit append path

This commit is contained in:
2026-09-06 05:42:01 +03:00
parent dfc14bcd1f
commit 8bc564b4b2
4 changed files with 268 additions and 3 deletions
@@ -155,7 +155,7 @@ pub(super) fn view<'a>(
.spacing(6),
);
}
out=out.push(label(if pending{"Pending contribution · apply or cancel below"}else{match state.tool{
out=out.push(label(if pending{"Pending contribution · apply or cancel below"}else if !explicit{"Ordered contributions · Append exchange continues the path"}else{match state.tool{
CanvasTool::Select=>"Select local contributions and paths · drag path endpoints to reconnect · ↕ reorders within a column",
CanvasTool::Connect=>"Sequence link · click or drag from preceding to following contribution · Escape cancels",
CanvasTool::Add(..)=>"Choose a highlighted path or contribution position · existing work stays shared · Escape cancels"}}));
@@ -226,8 +226,14 @@ pub(super) fn view<'a>(
);
} else {
out = out.push(label(
"Ordered exchange path · convert explicitly before drawing topology.",
"Ordered exchange path · append the next exchange or convert to explicit links.",
));
if !pending {
out = out.push(
button("Append exchange…")
.on_press(Message::TopologyCanvas(CanvasEvent::AppendExchange(context))),
).push(label("Append creates the next exchange contribution and an explicit sequence link from the final contribution in one undo step."));
}
let commands = preserved_order(p, owner, None);
if !commands.is_empty() {
out = out.push(
@@ -235,7 +241,7 @@ pub(super) fn view<'a>(
.on_press(Message::Command(unique_batch(p, commands))),
);
} else {
out=out.push(label("A single exchange has no path link to convert. Involve work, a control or a reusable process to begin explicit topology."))
out=out.push(label("A single exchange has no path link to convert. Append the next exchange, or involve work, a control or a reusable process."))
.push(row![button("Add work…").on_press(event(Event::Start(owner,Tool::Work,selected))),
button("Add control…").on_press(event(Event::Start(owner,Tool::Control,selected))),
button("Reuse…").on_press(event(Event::Start(owner,Tool::Reuse,selected)))].spacing(6));
@@ -309,6 +315,14 @@ pub(super) fn view<'a>(
p.named(link.target()),
guard
)));
} else if d.fixed
&& d.tool == Tool::Exchange
&& let Some(before) = d.before
{
form = form.push(label(format!(
"Append after {} → new exchange · Create adds an explicit sequence link",
p.named(before)
)));
} else if d.fixed && d.tool != Tool::Connect {
form = form.push(label(
d.insertion