Commit Graph

344 Commits

Author SHA1 Message Date
slhx agent 353f2111e9 test(examples): avoid literal handle ids
Remove the last handwritten __h input from techdemo markup, switch E2E posts to generated handles, and extend example contracts to catch literal handle fields in templates.

req: dx/003

req: ceremony/002

req: examples/003
2026-06-02 00:02:11 +02:00
slhx agent dbe157cac1 test(examples): forbid legacy lowering helpers
Extend the example contract to keep canonical runtime code on generated render/static_fragment APIs instead of lower_html/render_html aliases or inline include_str lowering.

req: dx/006

req: ceremony/002

req: component/003
2026-06-01 23:58:42 +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 eaa5479b42 test(examples): forbid low-level resource plumbing
Lock canonical examples to generated resource APIs instead of raw ids, OUT_DIR includes, global exports, or low-level runtime/plumbing types.

req: dx/002

req: ceremony/002

req: ceremony/004

req: examples/003
2026-06-01 23:55:31 +02:00
slhx agent 6f2bed3529 test(js): lock selectorless runtime contract
Add an explicit runtime guard for root-scoped DOM walks and against selector APIs, preserving the no selector/no hidden client framework boundary.

req: pitch/002

req: runtime/001

req: target_policy/001
2026-06-01 23:53:35 +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 fd5d48d59a refactor(examples): use slot render helpers
Use the slhx RenderSlotExt path for board updates so examples no longer manually compose SafeHtml before slot replacement.

req: dx/006

req: component/003
2026-06-01 23:46:59 +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 a287d87e38 refactor(examples): inline simple board rendering
Remove one-line render_board wrappers now that generated render(view) is the concise composition helper, keeping board updates explicit without extra local bridge functions.

req: component/003

req: dx/006
2026-06-01 23:38:48 +02:00
slhx agent 6e55d9a46f docs(kanban): show real hemplate composition syntax
Refresh the north-star kanban walkthrough to use current hemplate syntax plus lean generated render/slot/form helpers instead of stale sketch syntax and manual ids.

req: dx/006

req: component/003
2026-06-01 23:27:34 +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 f7d9f820e2 feat(slhx): add concise public render helper
Expose slhx::render(view) as the short SafeHtml composition helper and keep render_html(view) as a compatibility alias, matching generated modules' lean page-building path.

req: dx/006

req: html_safety/002
2026-06-01 23:15:31 +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 a8d4604da8 test(techdemo): shorten generated resource paths
Import scoped generated handles and slots in techdemo tests so assertions read as local resources instead of fully-qualified generated paths.

req: component/003

req: dx/006
2026-06-01 23:03:34 +02:00
slhx agent ef3323831f refactor(kanban): shorten generated resource paths
Import scoped generated board modules at the kanban boundary so tests and page helpers read as local board resources without fully qualified generated-resource ceremony.

req: component/003

req: dx/006
2026-06-01 22:59:00 +02:00
slhx agent edd804a505 refactor(techdemo): use generated render helpers throughout
Route shell, architecture, inspector, hero, activity, and live-feed rendering through generated render_html helpers, removing the last local render_template bridge from the techdemo page composition path.

req: component/003

req: view/001

req: html_safety/002
2026-06-01 22:50:01 +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 e9c717844d refactor(techdemo): shorten generated resource paths
Import scoped generated modules at the page boundary so handlers and tests read as local slots/forms/handles/classes without hiding ownership or adding framework machinery.

req: component/003

req: dx/006
2026-06-01 22:39:52 +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 54dd401e8b refactor(kanban): scope card handles to partials
Move kanban card actions onto the reusable card partial, use generated render helpers for board/page composition, and remove manual handle fields plus hidden shell-level action anchors from the composed path.

req: component/003

req: view/001

req: examples/001
2026-06-01 22:25:23 +02:00
slhx agent 4d79dd4dba feat(build): generate render helpers
Generate root and component render_html helpers that render hemplate views through the same lowering table, letting callers update composed views without manual render_template/lower_html/SafeHtml plumbing.

req: component/003

req: view/001

req: html_safety/002
2026-06-01 22:15:58 +02:00
slhx agent 4319dea171 refactor(techdemo): scope card handles to partials
Move board card and lane actions onto their reusable partial templates, register the scoped generated handles directly, and remove hidden shell-level handle anchors and manual handle fields from the rendered view data.

req: component/003

req: view/001

req: examples/001
2026-06-01 21:58:40 +02:00
slhx agent c69eb9932c fix(js): tolerate malformed bootstrap state
Report malformed data-slhx-st with slhx:state-error and continue binding the root with an empty atom store instead of letting state decode failures stop handlers, navigation, or push.

req: state/004

req: state/006

req: runtime/001
2026-06-01 21:35:49 +02:00
slhx agent ad135d81fe fix(build): reject empty slhx navigation hrefs
Treat data-slhx-nav anchors with empty static href values as build errors, preserving progressive navigation instead of letting links depend on JavaScript-only behavior.

req: page_swap/001

req: diagnostics/002
2026-06-01 21:30:29 +02:00
slhx agent 9b3fefbf50 fix(build): reject boost on action elements
Treat data-slhx-boost on anchors and forms as a build error with guidance toward data-slhx-nav or data-slhx-handle, preserving boost as a container convention.

req: page_swap/007

req: diagnostics/002
2026-06-01 21:24:55 +02:00
slhx agent b6aaccf113 fix(build): require href on slhx navigation
Treat static data-slhx-nav anchors without href as build errors so page-swap links preserve progressive navigation when JavaScript is unavailable.

req: page_swap/001

req: diagnostics/002
2026-06-01 21:18:25 +02:00
slhx agent efd4e2f369 fix(build): validate slhx convention placement
Reject data-slhx-nav on non-anchor elements and data-slhx-sse away from its root, so standard conventions keep progressive navigation and root-scoped push semantics instead of silently doing nothing.

req: page_swap/001

req: push/006

req: diagnostics/002
2026-06-01 21:13:04 +02:00
slhx agent 56f4db88c4 fix(js): keep standard sse same-origin
Require non-empty data-slhx-sse values at build time and have the standard runtime reject cross-origin EventSource URLs with slhx:sse-error instead of opening an implicit external stream.

req: push/006

req: diagnostics/002
2026-06-01 21:07:14 +02:00
slhx agent 0315044f53 fix(build): reject empty slhx guards
Treat empty static data-slhx-on lists and empty data-slhx-confirm messages as build errors, so authors do not silently disable dispatch or confirmation guards with blank attributes.

req: convention/002

req: convention/004

req: diagnostics/002
2026-06-01 21:01:29 +02:00
slhx agent b98820e819 fix(build): reject unsupported slhx events
Validate static data-slhx-on values against the runtime-supported delegated event set so generated EventName constants cannot imply browser behavior the runtime will never dispatch.

req: convention/002

req: diagnostics/002
2026-06-01 20:48:18 +02:00
slhx agent 44366252f7 fix(build): validate slhx convention values
Reject invalid static data-slhx-policy and timing convention values at build time, so typos fail with author-facing guidance instead of silently falling back or disabling runtime behavior.

req: convention/003

req: convention/005

req: convention/006

req: diagnostics/002
2026-06-01 20:42:39 +02:00
slhx agent cd54dd5cf0 fix(build): reject unknown slhx attributes
Fail fast when templates use misspelled or unsupported data-slhx-* attributes, with guidance to fix the spelling or use non-slhx data-* metadata for app-specific islands.

req: convention/009

req: diagnostics/002
2026-06-01 20:37:54 +02:00
slhx agent 3c4c802731 fix(build): reject slhx selector targeting
Fail fast when templates invent selector-style data-slhx-target or data-slhx-select attributes, and point authors back to generated local slots instead of runtime selector semantics.

req: locality/001

req: locality/002

req: htmx_equivalents/003
2026-06-01 20:33:33 +02:00
slhx agent e5f332e78a fix(js): clear interval handles when polling stops
Keep data-slhx-every timers separate from debounce/throttle timers and delete the interval handle when a polling element leaves the document, so reinserted elements can start polling again without leaking stale timer state.

req: convention/005
2026-06-01 20:28:11 +02:00
slhx agent 4295e93da7 fix(js): release parallel pending state
When data-slhx-policy=parallel runs overlapping requests against one target, release pending UI bookkeeping for each completed request instead of only the last pending handle.

req: convention/006

req: convention/007

req: convention/008
2026-06-01 20:24:43 +02:00
slhx agent e6486c1b35 fix(js): release superseded latest pending state
When data-slhx-policy=latest aborts an in-flight request, release that request's pending UI bookkeeping before starting the replacement request so pending classes, indicators, and disabled controls do not leak.

req: convention/006

req: convention/007
2026-06-01 20:20:26 +02:00
slhx agent 31b812f557 fix(js): preserve pending indicator state
Track pending class and indicator state with small reference counts so overlapping requests do not hide indicators early or strip a class that existed before the request.

req: convention/007

req: convention/008
2026-06-01 20:16:19 +02:00
slhx agent 8e39d6c4ac fix(js): restore disabled controls after pending
Remember each control's pre-request disabled state and keep a small pending count so data-slhx-disable-while-pending does not accidentally enable controls that were disabled before the request.

req: convention/007
2026-06-01 20:12:29 +02:00
slhx agent 28d1856dd7 fix(js): reload stale popstate partials
When back/forward navigation receives an incompatible or unusable partial response, reload the current URL instead of leaving the previous UI stale.

req: page_swap/005

req: page_swap/006

req: runtime/004
2026-06-01 20:08:17 +02:00
slhx agent 8d1bdaec08 fix(js): keep form-owner lookup root scoped
Resolve controls with a form= attribute inside the current slhx root instead of using document-global id lookup, preserving multi-root isolation for direct handle dispatch.

req: runtime/001

req: convention/004
2026-06-01 20:02:05 +02:00
slhx agent d732c921c2 fix(techdemo): rebootstrap inserted islands
Keep opaque island widgets live when slhx swaps or later DOM insertion adds a new island, and tear down the listener when an island leaves the document.

req: interop/001

req: examples/001
2026-06-01 19:57:39 +02:00
slhx agent 9d3f70e9fe feat(techdemo): add opaque island bridge
Add a canvas leaf-widget island to the techdemo that receives server snapshots through Effect::event/CustomEvent while keeping slhx core and runtime semantics unchanged.

req: interop/001

req: examples/001

req: examples/005
2026-05-26 07:29:51 +02:00
slhx agent 28ee1b5111 docs(agents): note hemplate syntax gotchas 2026-05-26 07:15:27 +02:00
slhx agent 625f797ff1 docs(requirements): align surface build contract
Clarify that slhx consumes hemplate Surface facts and may request in-process hemplate extraction for simple build scripts, without owning .heml parsing semantics.

req: surface/001

req: surface/008

req: build/001

req: boundary/003
2026-05-26 01:42:22 +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 ba3f40a3f0 feat(build): emit checked param tokens
Generate ParamName constants for handle data parameters so public code can refer to checked param metadata instead of stringly typed names.

req: codegen/003
2026-05-26 01:28:51 +02:00
slhx agent 280464017b feat(build): accept precomputed surface facts
Allow slhx-build callers to feed hemplate SurfaceDocument facts directly, preserving the existing .heml parse fallback while covering the build-from-surface path.

req: surface/008

req: build/001
2026-05-26 01:24:03 +02:00
slhx agent d3fc1a745a fix(js): remove runtime selector traversal
Replace runtime querySelector/closest/matches traversal with explicit element walks and generated-id predicates, preserving existing runtime convention coverage.

req: runtime/001

req: target_policy/001

req: target_policy/002
2026-05-26 01:18:21 +02:00