Skip to content

Integrate Volt sessions, native Tailwind, and virtual islands - #2

Merged
dannote merged 13 commits into
masterfrom
feat/volt-session-integration
Sep 15, 2026
Merged

dannote merged 13 commits into
masterfrom
feat/volt-session-integration

Conversation

@dannote

@dannote dannote commented Sep 10, 2026

Copy link
Copy Markdown
Member

Dependency

Depends on elixir-volt/volt#37.

Pins Volt commit 5cf6fd26827dbeb013bd77ffb0cf9e1f495a8dfd for reproducible integration testing. Replace the Git dependency with the appropriate released version before publishing Astral.

Changes

  • Require Bandit >= 1.12.5 and optional Igniter >= 0.8.4, excluding the affected HTTP/2 server and installer versions while retaining the existing major-version upper bounds.
  • Resolve QuickBEAM 0.11.1 through the updated Volt dependency.
  • Name document stylesheet processing Astral.Assets.Stylesheets.finalize/2,3, without changing serialization behavior, and document source/test organization conventions.
  • Supervise one Volt development session and attach the asset Plug to it.
  • Delegate production assets and Tailwind compilation to Volt.build/1, supplying site source roots alongside explicitly configured sources.
  • Support multiple asset entries and resolve Tailwind inputs to development stylesheet URLs or production manifest entries.
  • Discover literal island references through the HEEx parser without executing template setup or rendering. Include explicitly declared runtime-selected components in the same asset build.
  • Build browser assets before rendering documents, so Astral.asset_path/2 returns real URLs usable in HTML, JSON, and island props. Render each document once; no deferred URL tokens.
  • Share virtual island modules by component and adapter, with props and hydration settings in individual HTML instances.
  • Activate newly materialized nested instances explicitly, independently of shared entry-module evaluation, with per-element scheduling guards.
  • Collect island stylesheet dependencies during rendering and emit deduplicated links in the completed document's active head. Dependencies encountered inside inert slot templates cannot suppress visible layout styles.

Compatibility

  • Normalized asset_entry values are lists.
  • Astral.BuildResult.assets contains Volt.Build.Result.
  • Runtime-selected island components that cannot be discovered from literal template references require explicit declarations, for example islands do component :vue, "islands/Gallery.vue" end.
  • Virtual modules replace generated island TypeScript files.
  • Islands remain client-only; essential static content belongs outside their inert slot templates.
  • HTML documents requiring island CSS are normalized to HTML5 with an explicit doctype using LazyHTML. Fragments gain document structure; non-HTML routes and documents with no island stylesheet dependencies remain untouched.

Validation

  • Removed a remote-image test teardown race by supervising its HTTP server and hit counter through ExUnit; focused server tests and the full gate pass.
  • Clean-build full mix ci: 209 tests passed. No hosted checks are currently attached to this PR.
  • Chromium verifies mixed-framework mounting and applied scoped Vue CSS.
  • A media-delayed parent exposes two nested instances after an outside layout instance has loaded their shared entry: all three mount exactly once, and the outside CSS is active before parent hydration.
  • Serialization tests cover inert templates, SVG name casing, escaped titles and URLs, script text, and conditional author-supplied stylesheet links.
  • Regression coverage for asset URLs in island props and JSON routes, single route rendering, stylesheet deduplication per document, literal discovery in EEx branches and Markdown, explicit dynamic declarations, and disabled Tailwind builds.
  • Reproductions for asset URLs in props and explicitly disabled Tailwind builds/development startup now succeed.

@dannote
dannote merged commit fbad9df into master Sep 15, 2026
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