A visible page is not yet a ready tool. The shell may be present while the worker is stale, the state invalid, or the compiler still loading its forms. Therefore readiness must be earned, not assumed from first paint.
A Fresh Account of the Small Browser Machine
The correct explanation begins with a refusal: do not describe the system by framework names or by developer mood. Describe it by the transitions the operator depends on. A request arrives. A shell appears. A versioned worker mediates assets. A durable local state is restored. Authored forms become inspectable behavior. Meaning is rendered in the DOM. Optional GPU light is added. Checkpoints are written. Re-entry remains possible. If each transition is clean, the application is trustworthy. If any transition is muddled, the application becomes a rumor sustained by luck.
The worker has authority over asset versioning, not domain truth. Local persistence has authority over resumable drafts, not canonical records. The compiler has authority over behavior generation, not business meaning. Most bugs in clever browser software are not logic errors but confused authorities.
A Lisp layer over JavaScript is justified only if it makes repeated patterns smaller while leaving generated behavior inspectable. The maintainer must still be able to trace event to state transition to render effect without joining a priesthood.
That layer is the DOM. CSS may refine it. WebGL may deepen it. But the canonical visible meaning should survive when animation is reduced, when the GPU path fails, and when the tab resumes in a half-awake state. Reliability prefers survivable substrates.
The phone sleeps. Memory is pressured. Networks fade. New shells arrive. Storage schemas evolve. A serious browser application is therefore a re-entry machine: it can explain its current version, migrate a saved draft once, rebind event handlers cleanly, and continue without pretending the interruption never happened.
The Named Pipeline
The architecture is simple once spoken plainly: boot is not restore, restore is not compile, compile is not render, render is not ornament, and none of them are persistence. The machine becomes reliable when these acts are performed in order and never allowed to counterfeit one another.
Boot into a declarative shell.
The initial document should explain version, required assets, and pending recovery work. Footgun: treating first paint as full readiness. Defense: publish a distinct ready state after restore and bind complete.
Constrain the service worker.
Let it version assets, serve offline, and announce upgrades. Footgun: sneaking business logic into the worker until it becomes a second application. Defense: keep worker responsibilities narrow and inspectable.
Restore state before trust.
Validate schema, migrate once, and only then let the interface speak authoritatively. Footgun: rendering stale or unversioned payloads as if they were current truth. Defense: explicit migration and invalidation paths.
Compile forms into inspectable behavior.
The authored layer should collapse repetition, not obscure control flow. Footgun: macro cleverness that hides lifecycle edges. Defense: stable intermediate output, named hooks, and grep-friendly generated code.
Render the canonical meaning in DOM.
The interface should remain readable with animation off and GPU absent. Footgun: binding core truth to visual flourish. Defense: keep DOM text and controls authoritative, with enhancement layered on top.
Use WebGL as subordinate ornament.
Shaders may visualize rhythm, latency, or touch. Footgun: moving state meaning into the canvas because the effect is seductive. Defense: ensure the GPU path can disappear without destroying comprehension.
Persist with explicit store boundaries.
Cache Storage for shell assets, IndexedDB for real payloads, localStorage only for tiny session hints. Footgun: one blob to rule them all. Defense: separate stores, versioned payloads, reset/export paths, and timestamps.
Stage reload as managed re-entry.
New code should announce itself, checkpoint local work, and swap by consent or at a deliberate quiet point. Footgun: surprise refresh during active work. Defense: visible update state and resumable reload.