diff --git a/examples/kanban.md b/examples/kanban.md index e52c80d..f58c6f0 100644 --- a/examples/kanban.md +++ b/examples/kanban.md @@ -143,7 +143,7 @@ pub fn create_card( } ``` -HTML submits as usual. Server returns `EffectBatch`. Browser applies DOM ops. +HTML submits as usual. Server returns a typed update batch. Browser applies DOM ops. --- @@ -175,7 +175,7 @@ pub fn drag_card( } ``` -Zero round-trip. Zero custom JS. Pure Rust → EffectBatch → DOM. +Zero round-trip. Zero custom JS. Pure Rust → typed updates → DOM. --- @@ -259,14 +259,14 @@ pub fn user_joined(user: UserPresence) -> impl IntoEffect { } ``` -Browser receives raw `EffectBatch` over WebSocket/SSE: +Browser receives typed update bytes over WebSocket/SSE: ```text -Op::AppendKeyed(slot=PRESENCE_USER, key=user_id, html=...) -Op::RemoveKeyed(slot=PRESENCE_USER, key=user_id) +append keyed presence user +remove keyed presence user ``` -The runtime does not know "presence". It executes ops. +The runtime does not know "presence". It executes generated DOM updates. --- @@ -298,7 +298,7 @@ No framework download. No VDOM. No hydration. No game loop. | Concern | React/Vue | htmx+SSR | slhx | |---|---|---|---| | SSR | RSC/Vue SSR | native | native (hemplate) | -| 60fps drag | 100ms re-render + React-DnD | custom JS | WASM handler, EffectBatch | +| 60fps drag | 100ms re-render + React-DnD | custom JS | WASM handler, typed update | | Optimistic update | useOptimistic | impossible | `board.update` → `SyncEffect::send_patch` | | Offline support | Service Worker + custom | impossible | patch queue in `slhx-sync` | | Conflict resolution | manual / Yjs CRDT | impossible | server-authoritative patch | diff --git a/examples/techdemo/src/main.rs b/examples/techdemo/src/main.rs index d0b0bfa..607d58a 100644 --- a/examples/techdemo/src/main.rs +++ b/examples/techdemo/src/main.rs @@ -21,7 +21,7 @@ use std::time::Duration; const LANES: [(&str, &str, &str); 3] = [ ("compiler", "Compiler", "Surface → generated API"), - ("runtime", "Runtime", "EffectBatch → DOM"), + ("runtime", "Runtime", "typed updates → DOM"), ("product", "Product", "Native UX, zero app JS"), ]; @@ -315,7 +315,7 @@ fn registry(shared: Arc) -> impl DispatchRegistry { } }); if let Some(title) = title { - demo.spotlight = format!("{title} advanced without a selector: the server returned slot effects."); + demo.spotlight = format!("{title} advanced without a selector: the server returned generated slot updates."); demo.log(format!("Advanced {title}")); } demo_effects(&demo, "Pipeline advanced") @@ -382,7 +382,7 @@ fn registry(shared: Arc) -> impl DispatchRegistry { move |_| { // req: push/003 req: examples/001 let mut demo = shared.demo.lock().unwrap(); - demo.log("Simulated push event produced the same EffectBatch shape"); + demo.log("Simulated push event produced the same generated update shape"); ( ui::put(slots::live_feed, &LiveFeed { tick: demo.activity.len() as u64, @@ -691,7 +691,7 @@ mod tests { assert_eq!(document.select(&selector(".inspector-row")).count(), 3); assert!(document .select(&selector("code")) - .any(|code| code.text().collect::().contains("EffectBatch"))); + .any(|code| code.text().collect::().contains("typed update batch"))); } // req: html_safety/002 req: view/001 req: test/005 @@ -806,7 +806,7 @@ mod tests { lane.select(&selector("p")) .next() .map(|paragraph| paragraph.text().collect::()) - .is_some_and(|text| text.contains("EffectBatch ops")) + .is_some_and(|text| text.contains("typed DOM ops")) })); } } diff --git a/examples/techdemo/templates/app_shell.css b/examples/techdemo/templates/app_shell.css index 9521501..711d231 100644 --- a/examples/techdemo/templates/app_shell.css +++ b/examples/techdemo/templates/app_shell.css @@ -7,7 +7,7 @@ main { width:min(1180px, calc(100vw - 32px)); margin:0 auto; padding:38px 0 56px .hero-shell { display:grid; grid-template-columns:1.35fr .85fr; gap:22px; align-items:stretch; } .hero-copy, .hero-panel, .command-card, .board-card, .glass-card, .topology { border:1px solid var(--line); background:linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.055)); box-shadow:0 24px 90px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.12); backdrop-filter: blur(22px) saturate(145%); border-radius:28px; } .hero-copy { padding:34px; overflow:hidden; position:relative; } -.hero-copy::after { content:"EffectBatch"; position:absolute; right:-18px; bottom:8px; font-size:86px; font-weight:900; color:rgba(255,255,255,.045); } +.hero-copy::after { content:"slhx"; position:absolute; right:-18px; bottom:8px; font-size:86px; font-weight:900; color:rgba(255,255,255,.045); } .eyebrow { color:var(--cyan); text-transform:uppercase; letter-spacing:.2em; font-weight:800; font-size:12px; } h1 { font-size:clamp(42px, 7vw, 84px); line-height:.88; letter-spacing:-.075em; margin:12px 0 18px; max-width:900px; text-wrap:balance; overflow-wrap:anywhere; } h2 { margin:0 0 16px; letter-spacing:-.035em; } diff --git a/examples/techdemo/templates/control_center.heml b/examples/techdemo/templates/control_center.heml index 129453b..8279a62 100644 --- a/examples/techdemo/templates/control_center.heml +++ b/examples/techdemo/templates/control_center.heml @@ -3,7 +3,7 @@

slhx Control Plane

A Linear-class work system without a frontend framework.

-

Create, inspect, advance, and stream work through native HTML, generated typed resources, and compact EffectBatches. The UI feels app-grade; the model stays server-owned and boring.

+

Create, inspect, advance, and stream work through native HTML, generated typed resources, and compact update batches. The UI feels app-grade; the model stays server-owned and boring.

{+= self.hero =+}
diff --git a/examples/techdemo/templates/partials/architecture_board.heml b/examples/techdemo/templates/partials/architecture_board.heml index fb23207..5f6e3f6 100644 --- a/examples/techdemo/templates/partials/architecture_board.heml +++ b/examples/techdemo/templates/partials/architecture_board.heml @@ -1,5 +1,5 @@

hemplate

Owns syntax and Surface facts.

slhx-build

Generates resources and lowering tables.

-

runtime

Executes compact EffectBatch ops.

+

runtime

Executes compact typed DOM ops.

diff --git a/examples/techdemo/templates/partials/inspector_panel.heml b/examples/techdemo/templates/partials/inspector_panel.heml index 9455f23..d1852fb 100644 --- a/examples/techdemo/templates/partials/inspector_panel.heml +++ b/examples/techdemo/templates/partials/inspector_panel.heml @@ -1,4 +1,4 @@ {+= self.selected =+}
What happened
{+ self.spotlight +}
-
Wire contract
POST __h → application/slhx → EffectBatch
+
Wire contract
POST __h → application/slhx → typed update batch
Runtime
Root-scoped delegated listeners; numeric targets only.
diff --git a/examples/techdemo/templates/partials/live_feed.heml b/examples/techdemo/templates/partials/live_feed.heml index df16eda..2cec4be 100644 --- a/examples/techdemo/templates/partials/live_feed.heml +++ b/examples/techdemo/templates/partials/live_feed.heml @@ -1 +1 @@ -
SSE tick #{+ self.tick +}
Server streamed a typed EffectBatch into slots::live_feed.
+
SSE tick #{+ self.tick +}
Server streamed a generated update into slots::live_feed.
diff --git a/examples/techdemo/tests/e2e.rs b/examples/techdemo/tests/e2e.rs index 5c2db4b..e33c776 100644 --- a/examples/techdemo/tests/e2e.rs +++ b/examples/techdemo/tests/e2e.rs @@ -223,7 +223,7 @@ fn product_is_e2e_working_over_http() { let push_batch = simulated_push.batch(); assert_payload_contains(&push_batch, "SSE tick"); assert_payload_contains(&push_batch, "Push simulated · no client app code"); - assert_payload_contains(&push_batch, "Simulated push event produced the same EffectBatch shape"); + assert_payload_contains(&push_batch, "Simulated push event produced the same generated update shape"); assert_emit(&push_batch, "slhx:island-orbit", "activity rows"); let delete_missing = post( diff --git a/examples/v0/src/main.rs b/examples/v0/src/main.rs index 5189812..c4bd938 100644 --- a/examples/v0/src/main.rs +++ b/examples/v0/src/main.rs @@ -173,7 +173,7 @@ fn registry(state: Arc) -> impl DispatchRegistry { // req: page_swap/002, req: examples/001 ( page_swap::put(page_slots::content, &DocsContent { - message: "This content came from an EffectBatch.", + message: "This content came from a generated update response.", }), page_slots::title.text("Docs"), push("/docs"), @@ -257,7 +257,7 @@ mod tests { // req: html_safety/002 req: view/001 req: test/005 #[test] fn docs_content_payload_is_rendered_by_a_hemplate_view() { - let html = render_docs_content("This content came from an EffectBatch."); + let html = render_docs_content("This content came from a generated update response."); let document = Html::parse_fragment(html.as_str()); assert_eq!( document @@ -271,7 +271,7 @@ mod tests { .select(&selector("p")) .next() .map(|paragraph| paragraph.text().collect::()), - Some("This content came from an EffectBatch.".to_owned()) + Some("This content came from a generated update response.".to_owned()) ); } diff --git a/slhx-test/tests/examples_contract.rs b/slhx-test/tests/examples_contract.rs index 6d85c35..8aeb581 100644 --- a/slhx-test/tests/examples_contract.rs +++ b/slhx-test/tests/examples_contract.rs @@ -115,7 +115,7 @@ fn canonical_example_docs_do_not_teach_low_level_plumbing() { "generated handles and slots", "generated handle ids", "numeric handle ids", - "EffectBatch responses", + "EffectBatch", "manual registry", "HandlerRegistry", "InteractionForm",