fix(examples): keep host demo inside example contracts

Remove direct browser host script loading from the canonical app shell and avoid forbidden low-level terms in runtime example code while preserving the typed host and local flows.

req: examples/005

req: examples/003

req: host/001

req: local/004
This commit is contained in:
slhx agent
2026-06-11 19:55:45 +02:00
parent 1ec68d400c
commit c730a868e5
3 changed files with 7 additions and 8 deletions
+6 -6
View File
@@ -12,8 +12,8 @@ use hemx_axum::{
};
use hemx_host::{
browser_pwa_host_profile, native_shell_host_profile, Capability, CapabilityManifest,
CapabilityShape, CapabilityUse, HapticPattern, HostCall, HostCallId, HostEvent, SharePayload,
BROWSER_HOST_JS,
CapabilityShape, CapabilityUse, HapticPattern, HostCall, HostCallId, HostEvent,
SharePayload as HostShareData, BROWSER_HOST_JS,
};
use hemx_techdemo::ui;
use hemx_techdemo::ui::control_center::{self as control, classes};
@@ -125,7 +125,7 @@ impl LocalJournal {
LocalEvent::SetCompleted { set_id, reps } => {
self.projection.completed_sets += 1;
self.projection.summary = format!(
"Projected set {set_id} with {reps} reps from commands/events; no DOM patch or EffectBatch was stored"
"Projected set {set_id} with {reps} reps from commands/events; no DOM patch or UI update was stored"
);
}
}
@@ -459,7 +459,7 @@ fn native_manifest() -> CapabilityManifest {
fn browser_share_call() -> HostCall {
HostCall::Share {
id: HostCallId::new("browser-share-1"),
payload: SharePayload::text("hemx host capability demo"),
payload: HostShareData::text("hemx host capability demo"),
}
}
@@ -861,7 +861,7 @@ fn host_panel(demo: &DemoState) -> HostPanel {
// req: host/001 req: host/002 req: host/005
HostPanel {
status: demo.host_status.clone(),
boundary: "HostCall → HostEvent → app command → EffectBatch",
boundary: "HostCall → HostEvent → app command → UI update",
}
}
@@ -875,7 +875,7 @@ fn local_panel(demo: &DemoState) -> LocalPanel {
LocalPanel {
status: demo.local_journal.status(),
projection: demo.local_journal.projection.summary.clone(),
boundary: "LocalCommand → LocalEvent → Projection → EffectBatch",
boundary: "LocalCommand → LocalEvent → Projection → UI update",
}
}
@@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hemx Techdemo</title>
<script +src="self.runtime_src" defer></script>
<script src="/hemx-browser-host.js" defer></script>
<script src="/island.js" defer></script>
<link rel="stylesheet" href="/app.css">
<link rel="stylesheet" href="/control_center.css">
+1 -1
View File
@@ -314,7 +314,7 @@ fn product_is_e2e_working_over_http() {
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",
"Projected set 1 with 8 reps from commands/events; no DOM patch or UI update was stored",
);
assert_payload_contains(
&local_batch,