fix(release): restore canonical local gate

req: public_api/001

req: v1_release/007
This commit is contained in:
slhx agent
2026-07-14 01:24:31 +02:00
parent 90e8c3ced5
commit 025d9c1563
10 changed files with 33 additions and 23 deletions
+10 -6
View File
@@ -1,6 +1,9 @@
#[hemx::surface]
pub mod ui {}
#[cfg(feature = "client")]
use hemx_sync::SyncEffect as DurableSync;
#[cfg(feature = "client")]
#[derive(Clone, Debug, Eq, PartialEq)]
struct CardId(String);
@@ -87,15 +90,15 @@ pub fn reorder_card(
Some(before) => ui::client_board::client_cards.move_before(card.clone(), before.0),
None => ui::client_board::client_cards.move_to_end(card.clone()),
};
let projection = hemx::IntoEffect::into_batch(
DurableSync::durable(
patch,
(
move_effect,
ui::client_board::client_notice
.text(format!("Moved {card} with {}", projected.input_kind)),
),
ui::BUILD_FINGERPRINT,
);
hemx_sync::SyncEffect::durable(patch, projection)
)
}
#[cfg(all(test, feature = "client"))]
@@ -118,9 +121,10 @@ mod client_tests {
)
.into_batch(ui::BUILD_FINGERPRINT);
assert_eq!(batch.ops.len(), 3);
assert!(
matches!(&batch.ops[2], hemx::advanced::Effect::Emit { name, payload } if name == hemx_sync::PATCH_EVENT && payload.contains("$hemx-interaction") && payload.contains("\"projection\":["))
);
let wire = String::from_utf8_lossy(&batch.to_wire()).into_owned();
assert!(wire.contains(hemx_sync::PATCH_EVENT));
assert!(wire.contains("$hemx-interaction"));
assert!(wire.contains("\"projection\":["));
}
}