feat(local): model local command log boundary

Define local/offline truth as commands, domain events, and projections rather than stored DOM patches or EffectBatch payloads, and wire the techdemo through a local command-to-projection-to-effect flow.

req: local/001

req: local/002

req: local/003

req: local/004

req: examples/001
This commit is contained in:
slhx agent
2026-06-11 19:49:34 +02:00
parent 3807306158
commit 64a736ffcb
7 changed files with 197 additions and 2 deletions
+15
View File
@@ -5,6 +5,7 @@ use hemx_techdemo::ui::host_panel::{
};
use hemx_techdemo::ui::issue_card::{advance_work, delete_work, spotlight_work};
use hemx_techdemo::ui::issue_lane::move_to_lane as move_to_lane_handle;
use hemx_techdemo::ui::local_panel::queue_local_set;
use hemx_techdemo::ui::BUILD_FINGERPRINT;
use hemx_test::{
class_descendant_selector, class_selector, handle_form_body, inspect_wire,
@@ -306,6 +307,20 @@ fn product_is_e2e_working_over_http() {
"Native haptic acknowledgment accepted by app code",
);
let local_command = post("/", &handle_form_body(queue_local_set, &[]));
assert_effect_response(&local_command);
let local_batch = local_command.effects();
assert_payload_contains(&local_batch, "Local command accepted · projection rendered");
assert_payload_contains(&local_batch, "1 commands, 1 events, 1 projected sets");
assert_payload_contains(
&local_batch,
"Projected set 1 with 8 reps from commands/events; no DOM patch or EffectBatch was stored",
);
assert_payload_contains(
&local_batch,
"Local command #1 became event and projection before UI effects",
);
let delete_missing = post("/", &handle_form_body(delete_work, &[("work_id", "999")]));
assert_effect_response(&delete_missing);
let delete_missing_batch = delete_missing.effects();