Commit Graph

86 Commits

Author SHA1 Message Date
slhx agent efabd3ff66 feat(build): emit checked component refs
Generate ComponentRef constants for component-scoped APIs, include global component refs only when global_exports(true) is enabled, and document/use the checked component token.

req: component/003
2026-05-26 00:35:59 +02:00
slhx agent a421865852 feat(core): format handles for templates
Implement Display for generated Handle<T> values and migrate example view data to carry handles directly instead of raw handle id numbers for dynamic handle attributes.

req: public_api/001

req: public_api/002
2026-05-26 00:30:23 +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 93c68b6d87 feat(derive): scope component handler checks
Allow #[slhx::component("name")] to validate only the generated handles for that hemplate component, so component modules can be checked independently without implementing unrelated handles.

req: component/003

req: component/005
2026-05-26 00:18:17 +02:00
slhx agent 814be5922a fix(core): type slot render payloads
Tighten typed Slot::render and KeyedSlot append/prepend/replace helpers so callers pass the generated slot payload type, keeping explicit html/text escape hatches for deliberate conversions.

req: codegen/002

req: typed_id/001
2026-05-26 00:12:45 +02:00
slhx agent 5364135c5e feat(build): type generated event constants
Generate EventName constants for data-slhx-on metadata and exercise them through typed event emission in techdemo.

req: codegen/006
2026-05-26 00:09:07 +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 d67478fe36 test(techdemo): exercise checked form handler path
Add techdemo coverage for #[slhx::form] plus #[slhx::handler] on the generated launch_work form, and ignore the internal __h hidden handle field in generated form metadata.

req: form/001

req: form/004

req: form/006

req: derive_handler/003
2026-05-25 23:57:08 +02:00
slhx agent 54aecff6e8 test(kanban): exercise checked form handler path
Add a kanban example smoke test for #[slhx::form] plus #[slhx::handler] over the generated create_card form resource.

req: form/001

req: form/004

req: form/006

req: derive_handler/003
2026-05-25 23:54:09 +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 21716882ab feat(derive): check form parser availability
Introduce FormValue as the parser-availability bound for #[slhx::form] models, blanket it for FromStr types, and add compile-fail coverage for a form field whose domain type lacks a parser.

req: form/004

req: form/006
2026-05-25 23:48:56 +02:00
slhx agent 274b8e9e55 feat(derive): check form model structure
Add #[slhx::form] for user-authored form models, emit form field metadata into slhx.syms, and require form handlers to accept models that passed generated field compatibility checks.

req: form/001

req: form/004

req: form/006

req: codegen/004
2026-05-25 23:44:43 +02:00
slhx agent 34d6757ccd fix(derive): reject form impostor parameters
Tighten generated-form handler checking so a parameter must look like slhx::Form<T> or imported Form<T>, not a nongeneric local Form or unrelated path with a Form suffix.

req: form/004

req: form/006
2026-05-25 23:31:48 +02:00
slhx agent d02c15c59b test(derive): keep form handlers checked for params
Add compile-fail coverage showing that accepting a generated Form<T> does not bypass required generated data-param checking for the same handle.

req: form/006

req: derive_handler/003
2026-05-25 23:29:06 +02:00
slhx agent c1fb5e986a test(build): cover form contract metadata
Assert that slhx-build lowers Surface form controls into generated FormContract field metadata, including names, control kinds, required flags, and handle-to-form syms.

req: codegen/004

req: form/001
2026-05-25 23:27:16 +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 227a408985 test(axum): use dom-aware html assertions
Harden axum response and root fingerprint tests with scraper-based HTML parsing instead of raw rendered-string equality.

req: test/005
2026-05-25 23:19:13 +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 e5c7872fa6 test(js): cover generated target policy
Cover that runtime updates use generated slot/resource ids and do not expose response-side retargeting or CSS fragment selection conventions.

req: target_policy/001

req: target_policy/002
2026-05-25 23:12:32 +02:00
slhx agent 01df0bdaa6 test(js): cover multipart request shape
Cover multipart runtime request construction so file-upload forms keep FormData, omit File values from URL encoding, and only mark URLSearchParams bodies as urlencoded.

req: multipart/003
2026-05-25 23:10:19 +02:00
slhx agent 9d499d712b test(js): cover native nav escape hatches
Cover page-swap guards that preserve native browser navigation for modified clicks, non-primary buttons, downloads, blank targets, cross-origin links, and prevented events.

req: page_swap/007

req: failure/006
2026-05-25 23:07:47 +02:00
slhx agent 9811c69231 test(js): cover sse root dispatch
Cover data-slhx-sse EventSource setup, slhx/message event handling, root-scoped EffectBatch application, and SSE error emission.

req: push/001

req: push/003

req: runtime/001
2026-05-25 23:03:40 +02:00
slhx agent d72524e501 test(js): cover interval dispatch
Cover data-slhx-every runtime behavior: root scanning, duplicate timer avoidance, interval dispatch, and cleanup when elements leave the document.

req: convention/005
2026-05-25 23:01:06 +02:00
slhx agent f02b4de1ad test(js): cover pending conventions
Cover pending-class, indicator visibility, and disable-while-pending runtime conventions around request execution.

req: convention/007

req: convention/008
2026-05-25 22:57:22 +02:00
slhx agent 77b6aba336 test(js): cover confirm dispatch guard
Cover data-slhx-confirm as a runtime convention boundary: confirmation happens before handler dispatch continues.

req: convention/004
2026-05-25 22:55:11 +02:00
slhx agent 227337caa4 fix(js): normalize request policies
Honor only documented request concurrency policies and fall back to default behavior for unknown data-slhx-policy values.

req: convention/006
2026-05-25 22:52:23 +02:00
slhx agent 644d13e629 fix(js): preserve same-origin credentials
Send interaction and page-swap fetches with same-origin credentials so cookies/session/CSRF context stay available to integration-layer policy without broad CORS behavior.

req: auth/005
2026-05-25 22:49:06 +02:00
slhx agent f6bfde3675 test(axum): preserve csrf fields
Cover the integration boundary for CSRF-style hidden fields: InteractionForm keeps arbitrary form fields available to app/auth extractors instead of dropping them during dispatch parsing.

req: auth/004
2026-05-25 22:45:37 +02:00
slhx agent 88c339c5c3 test(js): cover fingerprint mismatch fallback
Assert the browser runtime refuses stale partial/effect updates when deployment fingerprints mismatch and falls back to reload instead of applying stale ids.

req: abi/003

req: abi/004

req: runtime/004
2026-05-25 22:42:19 +02:00
slhx agent 756f5a50cb test(techdemo): assert generated event constant
Prove data-slhx-on event discovery reaches an example generated API by asserting the techdemo issue-lane drop event constant.

req: codegen/006
2026-05-25 22:38:50 +02:00
slhx agent 102e3247bc fix(derive): keep components incremental
Let #[slhx::component] preserve inline modules when generated symbols are absent, while still enforcing handler completeness when slhx.syms exists.

req: component/005

req: test/002
2026-05-25 22:33:56 +02:00
slhx agent d223a1d215 feat(derive): check component handlers
Make #[slhx::component] compare generated handle symbols with inline #[slhx::handler] functions and fail when a required handler implementation is missing.

req: component/005

req: check/002

req: test/003
2026-05-25 22:30:07 +02:00
slhx agent abe39ec750 feat(build): generate event constants
Discover data-slhx-on event names from hemplate Surface inputs and emit generated events modules plus symbol rows without adding runtime trigger semantics.

req: codegen/006
2026-05-25 22:24:50 +02:00
slhx agent d25361d34d feat(derive): check generated handler params
Emit handle_param facts for handled data-* attributes and reject handlers that omit generated param arguments. Cover the generated param boundary with unit and compile-fail tests.

req: derive_handler/001

req: test/003
2026-05-25 22:17:08 +02:00
slhx agent 6d9d5e4c4e fix(derive): reject form type impostors
Tighten generated form-handler validation so only actual Form paths satisfy form handles; names like CreateForm no longer bypass the slhx::Form<_> requirement. Cover with unit and compile-fail tests.

req: form/004

req: form/006

req: test/003
2026-05-25 22:10:19 +02:00
slhx agent 00af1017cc docs(requirements): clarify surface generation contract
Align test/002 with the implemented checked boundary: #[slhx::surface] now requires generated slhx.generated.rs while #[slhx::component] remains available for incremental module-local testing.

req: test/002
2026-05-25 22:06:46 +02:00
slhx agent da5dccd417 refactor(kanban): render test board payload with hemplate
Replace the Kanban generated-slot unit test's inline raw HTML board payload with a hemplate-rendered view and DOM-aware assertion.

req: html_safety/002

req: view/001

req: test/005
2026-05-25 22:04:28 +02:00
slhx agent bce6341e69 refactor(techdemo): render test metric with hemplate
Replace the techdemo generated-slot test's inline raw HTML payload with a hemplate partial-rendered view.

req: html_safety/002

req: view/001
2026-05-25 22:01:17 +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
slhx agent f8d46e1a40 refactor(v0): render page swap with hemplate
Move the v0 docs/page-swap partial and EffectBatch content payload from raw HTML strings into hemplate views, with scraper assertions for rendered structure.

req: html_safety/002

req: view/001

req: test/005
2026-05-25 21:49:13 +02:00
slhx agent bd35347fa2 refactor(kanban): render board cards with hemplate
Move Kanban board/column/card rendering from Rust raw HTML assembly into hemplate partial views. Keep handler effects returning generated slot payloads and cover rendered structure with scraper.

req: html_safety/002

req: view/001

req: test/005
2026-05-25 21:45:25 +02:00
slhx agent c655d877ca refactor(v0): render todos with hemplate
Move the v0 todo-list payload from Rust raw HTML formatting into a hemplate partial/view and cover both populated and empty rendered structure with scraper.

req: html_safety/002

req: view/001

req: test/005
2026-05-25 21:42:08 +02:00
slhx agent 3b61451858 refactor(kanban): compose page with hemplate
Replace board page placeholder string replacement for options/board content with a hemplate page view and partial-rendered options. Cover page structure with DOM-aware scraper assertions.

req: html_safety/002

req: view/001

req: test/005
2026-05-25 21:38:36 +02:00
slhx agent d76682e98f refactor(kanban): render presence with hemplate
Move the kanban SSE presence fragment from Rust raw HTML formatting into a hemplate partial/view and cover the rendered structure with scraper.

req: html_safety/002

req: view/001

req: test/005
2026-05-25 21:34:53 +02:00
slhx agent 59b0c8ccc4 test(derive): cover surface inline requirement
Add compile-fail coverage for #[slhx::surface] on non-inline modules so the generated surface boundary stays explicit.

req: codegen/001

req: test/003
2026-05-25 21:30:18 +02:00
slhx agent 87a19fd923 fix(derive): require generated handler symbols
Make #[slhx::handler] fail when slhx.syms is missing instead of silently skipping generated handle checks. Add compile-fail coverage with an actionable build.rs hint.

req: build/003

req: test/003
2026-05-25 21:26:48 +02:00