Commit Graph

55 Commits

Author SHA1 Message Date
slhx agent ecbdea5cd0 feat(axum): support axum 0.8 applications
Upgrade the integration crate and examples to Axum 0.8 and use the native async extractor traits while preserving hemx routing, request, runtime, and effect behavior.

req: axum/002
2026-07-13 09:26:32 +02:00
slhx agent f1d84e4837 refactor(v0): render todos through heml template
Remove the hand-written push_str renderer for the v0 todos view so the canonical beginner example uses its .heml template for the whole page path, including form validation targets, notices, and keyed rows.

req: examples/001

req: canonical_authoring/003
2026-06-22 22:39:47 +02:00
slhx agent de6ecd469f fix(runtime): show transport failures in app error outlets
Make failed hemx requests visibly recoverable by updating root-scoped data-hemx-error outlets while preserving fail-closed non-2xx handling and inspectable hemx:error events. The v0 generated-app exemplar now includes a transport error outlet alongside generated field-error targets.

req: runtime/005

req: examples/001

req: canonical_authoring/003
2026-06-22 22:26:33 +02:00
slhx agent 1aa92d8d9d feat(examples): expose v0 todo field error targets
Add generated field-error targets to the v0 add and rename forms so the canonical todo example shows recoverable typed form feedback end to end instead of emitting errors with no visible target.

req: examples/001

req: canonical_authoring/003
2026-06-22 22:17:21 +02:00
slhx agent 430603ec00 feat(examples): make v0 todo rename form editable
Turn the v0 todo row rename action into an editable generated form instead of a fixed submit value, and preserve validation/recovery behavior for blank titles. This keeps the beginner exemplar on generated form handles and user-visible recovery instead of hidden demo shortcuts.

req: examples/001

req: canonical_authoring/003
2026-06-22 22:12:27 +02:00
slhx agent e7ff4541a7 refactor(v0): name generated interaction handlers
Expose and use InteractionHandlers in the beginner example so the normal path reads as app handlers instead of registry plumbing while preserving the integration registry API.

req: ceremony/005
2026-06-12 17:40:41 +02:00
slhx agent cac23578e2 feat(v0): show reusable partial feedback
Add a generated todo notice slot to the v0 normal path so initial render, append, replace, remove, and dynamic Vec<IntoEffect> refreshes visibly compose one reusable TodoRow partial with adjacent generated UI feedback.

req: canonical_authoring/003
2026-06-12 15:01:20 +02:00
slhx agent 3b5de85319 test(v0): prove dynamic reusable row updates
Use one TodoRow projection for initial render and generated dynamic Vec<IntoEffect> row replacement batches, keeping the normal path on generated helpers instead of raw effects or registry plumbing.

req: canonical_authoring/003
2026-06-12 14:43:47 +02:00
slhx agent 8f96169b03 feat(core): compose effect collections
Support Vec<T: IntoEffect> and [T; N] batches so dynamic reusable partial updates compose inside the existing effect model without a broad IntoIterator blanket impl.

req: canonical_authoring/003
2026-06-12 14:36:58 +02:00
slhx agent 7be1c9c649 feat(build): make generated page helper canonical
Move canonical examples and docs snippets from raw render/page calls to generated ui::page helpers, hide generated render behind doc(hidden), and let form resources participate in generated target inspection for tests.

req: canonical_authoring/005

req: dx/006

req: codegen/002

req: public_api/002

req: test/001
2026-06-12 07:31:39 +02:00
slhx agent ce4c2e086d feat(axum): expose hashed runtime asset path
Generate a SHA-256 content hash for the embedded hemx runtime, expose the hashed path from hemx-axum, serve immutable runtime headers, and update examples to load the hemx-owned path instead of fixed /hemx.js URLs.

req: axum_integration/005
2026-06-05 18:27:38 +02:00
slhx agent 3dfb3b684f feat(hemx): reuse todo row partials
Make the canonical v0 todo flow use one TodoRow partial shape for initial list rendering and generated keyed append/replace/remove helpers. Teach hemx-build to treat collection hosts with keyed h-for children as keyed targets, so beginner templates can keep the DRY outer slot + child partial composition.

req: canonical_authoring/002

req: canonical_authoring/003

req: examples/004

req: list/001
2026-06-05 08:56:36 +02:00
slhx agent 53480dba5a feat(hemx): clarify generated authoring path
Close the fallible handler and example coherence slice: v0 uses typed todo newtypes, Result handler failure mapping, generated form/partial helpers, and page composition; kanban is explicitly marked as an advanced north-star milestone; raw render is isolated behind hemx::advanced::render.

req: canonical_authoring/003

req: failure/004

req: public_api/005

req: examples/004
2026-06-05 08:36:39 +02:00
slhx agent c33500440e refactor!: rename slhx to hemx
Rename the tracked product identity, crate/package names, Rust paths/macros, generated artifacts, runtime files, public attributes, examples, docs, requirements, and tests from slhx to hemx without compatibility shims.

Verified with cargo run -p hemx-xtask -- test, cargo test -p hemx-derive --test compile_fail, cargo test -p hemx-js, cargo test -p hemx-axum, cargo test -p hemx-v0-examples, cargo check --workspace, redgate list, redgate refs, redgate health --strict, git diff --check, and git grep/ls-files legacy-name audits.

req: misc/001

req: codegen/001

req: component/004

req: runtime/001
2026-06-05 06:52:37 +02:00
slhx agent d4e865ef92 feat(api): streamline generated app authoring
Move the canonical examples toward generated component-root helpers, typed form decoding, async/state handler registration, and derive-driven app/component registry wiring. Tighten requirements and diagnostics for the server-first, selectorless authoring path.

Verified with cargo run -p slhx-xtask -- test, cargo check --workspace, redgate list, redgate refs, redgate health --strict, and git diff --check.

req: canonical/001

req: canonical/003

req: canonical/004

req: dx/002

req: derive_app/001

req: component/003

req: form/004

req: axum_integration/003
2026-06-05 06:33:41 +02:00
slhx agent eb6086616c refactor(examples): use targets across v0 handlers
Move remaining v0 example updates from raw slot constants/free functions to generated target objects for the partial/swap happy path.

req: dx/006

req: examples/003
2026-06-02 07:44:41 +02:00
slhx agent 339ca769fb feat(build): accept domain ids on keyed targets
Let generated string-keyed targets accept displayable domain ids directly, removing caller-side to_string noise from keyed partial append/replace flows.

req: codegen/002

req: dx/006
2026-06-02 07:34:00 +02:00
slhx agent a138f92b33 feat(build): generate slot target objects
Add generated targets::<slot> wrapper objects so partial swaps read as target.put/append/replace while preserving existing lower-aware commands and IntoEffect wiring.

req: dx/006

req: codegen/001

req: codegen/002

req: component/003
2026-06-02 07:21:23 +02:00
slhx agent 998e15758a docs(examples): hide batch internals from UI copy
Replace beginner-facing EffectBatch/slot-effect wording with generated update language while keeping wire-batch types in tests and low-level APIs.

req: dx/006

req: examples/003
2026-06-02 03:40:12 +02:00
slhx agent 417bc45d1f docs(examples): describe generated command path
Keep example READMEs aligned with the generated-resource, tuple-composed IntoEffect authoring path instead of lower-level handle/EffectBatch wording.

req: dx/006

req: examples/003
2026-06-02 03:28:53 +02:00
slhx agent ee6045aec5 feat(build): generate keyed view commands
Add lower-aware generated append/prepend/replace helpers for keyed slots, move the v0 keyed todo example off the facade extension trait, and keep beginner examples from importing lower-level render shortcuts.

req: dx/006

req: codegen/002

req: public_api/003

req: examples/003
2026-06-02 03:05:37 +02:00
slhx agent 15809c86a6 feat(build): add lower-aware put helper
Generate ui::put(slot, view) for lower-aware slot HTML updates and move examples/docs/contracts to that ergonomic path instead of hand-composing slot.html(render(...)).

req: dx/006

req: component/003

req: runtime/001

req: examples/003
2026-06-02 02:59:29 +02:00
slhx agent fa00128c9b fix(examples): keep test updates lower-aware
Move canonical example test helpers and docs off direct slot render shortcuts so even test-only slot updates use generated lower-aware HTML paths.

req: component/003

req: runtime/001

req: examples/003
2026-06-02 01:59:25 +02:00
slhx agent 732e65008e fix(examples): use lower-aware slot html updates
Move canonical examples and docs off direct RenderSlotExt render shortcuts so slot updates use generated render/lowering before HTML replacement, preserving runtime metadata for follow-up interactions.

req: component/003

req: runtime/001

req: dx/006

req: examples/003
2026-06-02 01:48:10 +02:00
slhx agent 743f79c6d6 fix(examples): lower slot render updates
Use generated lower-aware render paths before slot HTML updates so example fragments carry runtime ids for follow-up interactions such as browser drag/drop.

req: component/003

req: runtime/001

req: examples/003
2026-06-02 01:41:42 +02:00
slhx agent df4b4cc649 feat(axum): add interaction registry alias
Add an interactions()/on() registration path and move canonical examples off explicit register_handle naming while keeping low-level registry types available underneath.

req: axum_integration/003

req: ceremony/001

req: dx/003

req: examples/003
2026-06-02 00:24:32 +02:00
slhx agent 42ede63361 feat(axum): add concise interaction request dispatch
Wrap extracted interaction forms in an InteractionRequest with a concise dispatch path, add a handlers() helper, and move canonical examples off direct HandlerRegistry/InteractionForm plumbing.

req: axum_integration/003

req: ceremony/001

req: dx/003

req: examples/003
2026-06-02 00:19:38 +02:00
slhx agent bc7e7881b4 feat(build): lower static fragments as safe html
Add a generated static_fragment helper for include_str!-style prototype fragments and use it in the v0 page assembly path so static lowered .heml no longer needs repeated SafeHtml::trusted plumbing.

req: dx/006

req: html_safety/001

req: html_safety/002

req: component/003
2026-06-01 23:57:19 +02:00
slhx agent 117eb57179 feat(core): join safe html fragments
Let already-safe fragments compose without downgrading to String, and use it in the v0 page assembly example to keep rendered and lowered fragments typed at the boundary.

req: html_safety/001

req: html_safety/002

req: component/003
2026-06-01 23:49:20 +02:00
slhx agent 4e47b470a7 feat(axum): add safe html page composition
Add a SafeHtml PageRequest path for shell/partial composition and migrate examples so rendered hemplate fragments stay typed through the transport boundary instead of round-tripping through unchecked strings.

req: axum_integration/001

req: html_safety/001

req: html_safety/002
2026-06-01 23:45:52 +02:00
slhx agent 60eed5f98f feat(build): add concise lower helper
Generate lower(html) as the short static/prototype fragment lowering helper while keeping lower_html(html) as the compatibility alias, then move the v0 page assembly to the leaner path.

req: dx/006

req: component/003
2026-06-01 23:22:32 +02:00
slhx agent 0d4a643759 feat(build): add concise render helper
Generate render(view) as the short page/fragment composition helper while keeping render_html(view) as an explicit compatibility alias, then move examples to the leaner happy path.

req: component/003

req: dx/006

req: view/001
2026-06-01 23:09:34 +02:00
slhx agent 749ecb1778 refactor(v0): shorten generated resource paths
Import component-scoped generated modules at the example boundary so handlers and tests read as local slots/forms/handles without hiding ownership or adding framework machinery.

req: component/003

req: dx/006
2026-06-01 22:44:19 +02:00
slhx agent f3706a440e refactor(v0): use generated render helpers
Switch v0 page and payload composition to generated render_html helpers, removing the local render_template bridge while keeping the explicit full-page SafeHtml shell boundary.

req: component/003

req: view/001

req: html_safety/002
2026-06-01 22:32:20 +02:00
slhx agent 162c117a5a test(v0): use component-scoped generated APIs
Drop the v0 example's global export opt-in and update tests to use component-scoped slots and forms, matching the checked public API path.

req: component/003

req: build/001
2026-05-26 01:38:01 +02:00
slhx agent e20d356c1d docs(examples): mark page shell html boundaries
Document that remaining SafeHtml use in examples is limited to full-page shell composition of already-rendered hemplate fragments, while effect payloads use render helpers.

req: html_safety/002

req: view/001
2026-05-26 01:34:05 +02:00
slhx agent 5972785c3c feat(slhx): prefer render methods for views
Move view rendering onto Slot::render and KeyedSlot append/prepend/replace extension methods, leaving explicit text/html methods for non-view escape hatches.

req: codegen/002

req: view/001
2026-05-26 01:31:58 +02:00
slhx agent a8bd7dfdf7 test(examples): use shared slhx render helper
Remove remaining example-local render_html wrappers in favor of slhx::render_html so public examples share the hemplate render_into effect boundary.

req: view/001

req: html_safety/002
2026-05-26 01:10:57 +02:00
slhx agent 852053fd04 test(v0): render slots from hemplate views
Migrate v0 handlers and tests from explicit SafeHtml/html payload plumbing to RenderSlotExt and RenderKeyedSlotExt view helpers.

req: view/001

req: html_safety/002
2026-05-26 00:58:29 +02:00
slhx agent 62316d5f1e test(examples): render hemplate views into buffers
Use hemplate render_into in public examples and example tests instead of the string-returning render helper, preserving SafeHtml wrapping only at the explicit effect boundary.

req: view/001

req: html_safety/002
2026-05-26 00:46:13 +02:00
slhx agent bc8534a768 feat(axum): register checked handles
Add HandlerRegistry::register_handle for generated Handle<T> values and migrate examples away from passing raw numeric handle ids at registration sites.

req: ceremony/004

req: public_api/001
2026-05-26 00:26:42 +02:00
slhx agent 4803d681d2 feat(build): make global exports opt in
Default generated APIs to component-scoped modules and require global_exports(true) for legacy/global slot, handle, class, event, and lowering exports.

req: component/003

req: build/001
2026-05-26 00:23:38 +02:00
slhx agent 0b6ad64d98 feat(derive): expose checked form resource constants
Have #[slhx::form] emit an associated FORM resource so checked form handlers can be called with TodoInput::FORM-style values instead of generated_resource.typed::<T>() noise.

req: form/001

req: form/004

req: form/006

req: codegen/004
2026-05-26 00:03:47 +02:00
slhx agent 1b255e593d test(v0): check auth and wizard form handlers
Annotate the v0 auth and wizard form models with #[slhx::form], make their templates expose checked form fields, and add handler smoke tests over the generated form resources.

req: form/001

req: form/004

req: form/006

req: derive_handler/003
2026-05-25 23:59:24 +02:00
slhx agent 11f710d276 test(v0): exercise checked form handler path
Use #[slhx::form] in the v0 example tests and add a checked form-handler smoke test, with a typed() helper for generated form ids so examples do not rebuild ids by hand.

req: form/001

req: form/004

req: form/006

req: derive_handler/003
2026-05-25 23:52:10 +02:00
slhx agent 4d4f5cd2bc test(examples): assert escaped text exactly
Make v0 and kanban DOM-aware escaped-text checks exact instead of substring-based while preserving the no-rendered-tag assertions.

req: html_safety/002

req: test/005
2026-05-25 23:23:14 +02:00
slhx agent 9b06bc03df test(v0): render page swap content from hemplate
Exercise the v0 page-swap effect with a renderable hemplate view payload instead of an ad hoc HTML-looking text literal.

req: view/001

req: html_safety/002

req: page_swap/002

req: page_swap/003
2026-05-25 23:21:43 +02:00
slhx agent 355fc99888 test: harden checked boundary coverage
Use DOM-aware rendered-text inspection for the v0 shell marker check and extend unkeyed h-for validation coverage from slots to handles.

req: test/005

req: scope/001
2026-05-25 23:15:54 +02:00
slhx agent 5bcae0a075 refactor(v0): render keyed row with hemplate
Move the v0 keyed todo row effect payload from Rust format! HTML into a hemplate partial and require the generated slot append to carry an HTML payload.

req: html_safety/002

req: view/001
2026-05-25 21:58:18 +02:00
slhx agent 58e96162d4 refactor(v0): render shell with hemplate
Move the v0 page shell from a Rust format! raw HTML string into a hemplate AppShell view and cover the rendered document structure with scraper.

req: html_safety/002

req: view/001

req: test/005
2026-05-25 21:54:04 +02:00