Docs: colocated-JS setup, overlay nil-vs-false warning, transpiler coverage - #48
Merged
Conversation
…verage INSTALLATION.md, followed as previously written, produced an app with an empty optimistic registry — the silent everything-is-a-round-trip state the demo itself shipped with for months. It now covers the parts that were missing: - the :phoenix_live_view compiler (listed FIRST — it registers an after-compiler callback on :elixir) and the dev reloadable_compilers entry, with a warning that unknown compiler names are silently ignored and what the stale-manifest symptom looks like - the bare phoenix-colocated side-effect imports (generated modules self-register) and why omitting them degrades silently - the esbuild NODE_PATH needed to resolve them LAYER_4_OPTIMISTIC.md gains a warning block for the other footgun that bit three demo components: overlay closed-state is nil, never false — `set :open, false` compiles and does nothing. The Transpiler moduledoc's supported-constructs list catches up with the hardening PR: unless, cond, max/min/rem, and a section on the untranspilable marker + loud-demotion behavior.
The compiler registration, reloadable_compilers entry, and bundler NODE_PATH are LiveView's colocated-JS requirements, not lavash's — duplicating them here would drift. Link to LiveView's docs and keep only what is lavash-specific: import BOTH manifests (self-registering generated modules), and the consequence unique to lavash when the setup is missing — optimism silently degrades to server round-trips rather than erroring.
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.
Summary
Follow-up to closing #23 (the README split had already landed as
3ab70a7; that PR's residual diff was a stray placeholder line). Auditing the split docs against everything that landed since surfaced real gaps — one serious:INSTALLATION.md — was a recipe for silent-broken optimism
Followed as previously written, it produced an app with an empty optimistic registry: the everything-is-a-silent-round-trip state the demo itself shipped with for months (#38). Now covers:
:phoenix_live_viewcompiler, listed first (it registers an after-compiler callback on:elixir), plus the devreloadable_compilersentry — with a warning that unknown compiler names are silently ignored by Phoenix and a description of the stale-manifest symptomphoenix-colocated/*side-effect imports (generated modules self-register — Fix optimistic fns never registering in the demo; make colocated modules self-register #38) and the "fine on localhost, laggy under real latency" failure mode when omittedNODE_PATHneeded to resolve those importsLAYER_4_OPTIMISTIC.md — the nil-vs-false footgun
A warning block documenting that overlay closed-state is
nil, neverfalse—set :open, falsecompiles and does nothing. This bit three demo components (#36).Transpiler moduledoc — catch up with #44
unless,cond,max/min/remadded to the supported-constructs list, plus a section on the untranspilable marker and the loud-demotion behavior.Test plan
🤖 Generated with Claude Code