fix(review): keep workflow messages compact

This commit is contained in:
Codex
2026-09-11 09:08:46 -07:00
parent 80f2588214
commit 3c9e6eeb64
13 changed files with 45 additions and 32 deletions
@@ -74,7 +74,7 @@ fn open(app: &mut App, host: &Host, path: &str) {
let message = match host {
Host::Inspector => Message::FieldReferenceOpen(request),
Host::Review { address, facet } => {
Message::Workflow(workflow::Event::Semantic(semantic_review::Event::Row {
Message::Workflow(workflow::Event::semantic(semantic_review::Event::Row {
address: *address,
facet: Some(facet.clone()),
event: RowEvent::ReferenceOpen(request),
@@ -125,7 +125,7 @@ fn review(app: &App) -> &semantic_review::State {
}
fn send_review(app: &mut App, event: RowEvent) {
let addressed = review(app).address_event(event);
let _ = app.update(Message::Workflow(workflow::Event::Semantic(addressed)));
let _ = app.update(Message::Workflow(workflow::Event::semantic(addressed)));
}
fn review_host(app: &App) -> Host {
let semantic_review::Event::Row {
@@ -563,7 +563,7 @@ fn review_reference_cannot_reopen_or_write_a_banked_row_after_another_row_takes_
}),
semantic_review::Event::OpenTrace,
] {
let _ = app.update(Message::Workflow(workflow::Event::Semantic(event)));
let _ = app.update(Message::Workflow(workflow::Event::semantic(event)));
}
assert_eq!(review(&app).target(app.project()), Some(Id::from_u128(111)));
let expected = review(&app).recovery_snapshot().unwrap();
@@ -572,7 +572,7 @@ fn review_reference_cannot_reopen_or_write_a_banked_row_after_another_row_takes_
let Host::Review { address, facet } = host else {
unreachable!()
};
let _ = app.update(Message::Workflow(workflow::Event::Semantic(
let _ = app.update(Message::Workflow(workflow::Event::semantic(
semantic_review::Event::Row {
address,
facet: Some(facet),
@@ -109,7 +109,7 @@ fn view(
text_input("Required engineering rationale", raw)
.id("review-rationale")
.on_input(|raw| {
Message::Workflow(workflow::Event::Semantic(
Message::Workflow(workflow::Event::semantic(
state.address_event(RowEvent::OperationRationale(raw)),
))
}),
@@ -119,7 +119,7 @@ fn view(
adapter::field(draft, app.project(), "/parent").map(|message| {
match message {
Message::FieldReferenceOpen(request) => {
Message::Workflow(workflow::Event::Semantic(
Message::Workflow(workflow::Event::semantic(
state.address_event(RowEvent::ReferenceOpen(request)),
))
}
@@ -128,7 +128,7 @@ fn view(
}),
draft.reference_session(),
));
opaque(container(trigger::modal(content)).width(300).height(180)).into()
opaque(container(trigger::modal(content)).width(300).height(180))
}
None => Space::new().into(),
}
@@ -724,7 +724,7 @@ async fn mounted_review_pointer_open_and_outside_dismissal_keep_background_input
let messages = mount.click(&app, Point::new(359., 319.));
assert!(matches!(
messages.as_slice(),
[Message::Workflow(workflow::Event::Semantic(
[Message::Workflow(workflow::Event::Semantic(event))] if matches!(event.as_ref(),
semantic_review::Event::Row {
event: RowEvent::ReferenceEvent(chooser::Event {
action: Action::Close(Close::Outside),
@@ -732,7 +732,7 @@ async fn mounted_review_pointer_open_and_outside_dismissal_keep_background_input
}),
..
}
))]
)
));
for message in messages {
let task = app.update(message);
@@ -833,7 +833,7 @@ async fn mounted_reverse_review_required_rationale_remains_editable_beside_candi
let source = app.document.bundle().clone();
let inspector_raw = raw(&app);
let _ = app.update(Message::StartSemanticReview(trace_id));
let _ = app.update(Message::Workflow(workflow::Event::Semantic(
let _ = app.update(Message::Workflow(workflow::Event::semantic(
semantic_review::Event::Direction(TransitionDirection::SaToOa),
)));
let facet = FacetSelector::Header(HeaderFacet::Parent);
@@ -877,10 +877,10 @@ async fn mounted_reverse_review_required_rationale_remains_editable_beside_candi
);
assert!(messages.iter().all(|message| matches!(
message,
Message::Workflow(workflow::Event::Semantic(semantic_review::Event::Row {
Message::Workflow(workflow::Event::Semantic(event)) if matches!(event.as_ref(), semantic_review::Event::Row {
event: RowEvent::OperationRationale(_),
..
}))
})
)));
mount.dispatch(&mut app, messages).await;
assert_eq!(