feat(ui): HTMX-first web UI foundation (helios-ui)#192
Merged
Conversation
feat(ui): add htmx ui foundation
# Conflicts: # Cargo.lock
4 tasks
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Codecov flagged the patch at 45%: the unit tests only exercised template rendering and asset embedding, leaving mount(), both handlers, the fragment-vs-full-page branch, and the FHIR fallback unexecuted. Drive the mounted router with tower::ServiceExt::oneshot the way a browser would: full page at /ui, hard navigation vs HX-Request fragment at /ui/status (including the Vary: HX-Request contract from AutoVaryLayer), embedded assets, and passthrough of non-/ui paths to the wrapped FHIR app. Only the template-render error branch stays uncovered.
smunini
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Delivers the HTMX-first web UI foundation from #186: a working POC, the crate structure, and the conventions ("rules of the road") that subsequent UI PRs follow.
What this adds
crates/ui(helios-ui) — an optional, deliberately thin server-rendered UI crate:templates/; handlers only gather data and render.rust-embed+axum-embedwith br/gzip/deflate negotiation) — no runtime CDN, air-gap-friendly.HX-Requestheader (axum_htmx::HxRequest), withAutoVaryLayeremittingVary: HX-Requestso caches never cross the two. Every htmx control is a real link/form first — the UI degrades to full-page navigation without JavaScript.hfswiring behind an off-by-defaultuifeature —helios_ui::mount(app, version)mounts the UI under/uiand falls back to the FHIR REST app for every other path. The UI depends on the server, never the reverse.crates/ui/README.md— structure and conventions: where markup, assets, and handlers go; the hypermedia-first stance; how richer read paths plug in.Review focus / heads-up
maincurrently contains a parallel scaffold atcrates/web(helios-web, 5f1bbd9) with the same purpose. This crate was renamedhelios-web→helios-uiin review precisely to avoid the name collision, so after this merge both scaffolds coexist onmainuntil one is retired. Deciding which one is the Foundation: HTMX-first web UI (POC, structure, and rules of the road) #186 foundation (and removing the other) should be part of ratifying this PR.maincleanly once this merges.Closes #186.