Skip to content

Docs: colocated-JS setup, overlay nil-vs-false warning, transpiler coverage - #48

Merged
pinetops merged 2 commits into
mainfrom
docs/post-split-updates
Aug 10, 2026
Merged

Docs: colocated-JS setup, overlay nil-vs-false warning, transpiler coverage#48
pinetops merged 2 commits into
mainfrom
docs/post-split-updates

Conversation

@pinetops

Copy link
Copy Markdown
Member

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:

  • the :phoenix_live_view compiler, listed first (it registers an after-compiler callback on :elixir), plus the dev reloadable_compilers entry — with a warning that unknown compiler names are silently ignored by Phoenix and a description of the stale-manifest symptom
  • the bare phoenix-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 omitted
  • the esbuild NODE_PATH needed to resolve those imports

LAYER_4_OPTIMISTIC.md — the nil-vs-false footgun

A warning block documenting that overlay closed-state is nil, never falseset :open, false compiles and does nothing. This bit three demo components (#36).

Transpiler moduledoc — catch up with #44

unless, cond, max/min/rem added to the supported-constructs list, plus a section on the untranspilable marker and the loud-demotion behavior.

Test plan

  • Full suite green via pre-commit hook (docs build with --warnings-as-errors included)

🤖 Generated with Claude Code

…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.
@pinetops
pinetops merged commit 52756d0 into main Aug 10, 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