Skip to content

fix: isolate request state and complete HTMX todo CRUD - #16

Closed
WilliamRagstad wants to merge 1 commit into
mainfrom
codex/htmx-todo-20261026
Closed

WilliamRagstad wants to merge 1 commit into
mainfrom
codex/htmx-todo-20261026

Conversation

@WilliamRagstad

@WilliamRagstad WilliamRagstad commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Superseded by #15, which now contains the HTMX todo example and is rebased onto main.

The todo example now uses HTMX for every client/server interaction: hx-get loads the list and edit forms, hx-post creates, hx-put updates, and hx-delete deletes. Synchronous server functions return escaped HTML fragments for hx-target/hx-swap, including validation messages. The page loads pinned HTMX 2.0.8 with an integrity hash. A small htmx:configRequest hook places form values in URL segments, and hx-params="none" avoids relying on unsupported body decoding.

This completes the runtime/example stage after the harness, routing, and reload changes now on main, replacing closed #15. Refs #4. It also includes request-local function bindings, handler-chain fixes, graceful error handling, concurrency coverage, and the documented runtime contract. Module globals intentionally remain shared application state; JavaScript execution remains serialized.

Validation:

  • cargo fmt --check, cargo build --locked, and cargo test --locked: 12 tests passed, including the HTTP CRUD lifecycle, HTML fragment controls, title escaping, rejected mutations, and concurrent requests in dev/prod.
  • Chromium with the actual pinned HTMX bytes: list loading, create, edit, complete/uncomplete, validation, and delete passed. All eight CRUD requests carried HX-Request: true; write requests had empty form bodies. HTML-like, quoted, slash-containing, and Unicode titles rendered correctly without HTML injection.
  • Browser verification also confirmed clean server shutdown.

Request/body behavior, the CDN dependency, in-memory state, and remaining runtime limitations are documented in examples/todo/README.md and docs/runtime.md.

@WilliamRagstad
WilliamRagstad deleted the codex/htmx-todo-20261026 branch October 26, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant