SSR / foldkit-ssr

When a page is refused

SSR.render fails with ResumeUnsafe before serving a broken page.

reasonCauseFix
ViewDependsOnUnsentStateView or meta reads unsent Model fieldAdd field to state or restored
LazyDependsOnUnsentStatelazy(model) differs between server and clientAdd field lazy reads to state
UndeclaredStartupinit returned Commands missing from bootList startup Commands in boot
UncoveredActive Surface reads unsent field or sends unlisted MessageSend field (state/restored/local) or list Message
UnrestorablePartA plan part failed to restore its captureFix the part's capture/restore codec
DuplicateStaticRegionTwo SSR.static regions share an idGive each region a unique id
BindingInStaticRegionEvent handler inside an SSR.static regionMove interactive element into a Surface
UndeclaredSurfacesPage has bindings but plan omits surfacesList active Surfaces in surfaces
UnencodableBindingMissing Message Schema or non-constructor MessageCreate plan from App; use Message constructors
EagerStartRequiredDeferred plan starts a Subscription or resource lateAdd id to deferrable or set start: 'now'
VoidRootWithStylesstyles passed for a void HTML root elementUse SSR.generate head or a non-void root
UnkeepableFieldKeepTyped on unsupported element or h builderUse rh input/textarea/select/checkbox/radio + member
UnkeptFieldDeferred plan input with named handler lacks KeepTypedAdd rh.KeepTyped() or set start: 'now'
UngeneratablePathSSR.generate path cannot map to a fileRemove query/fragment; keep paths distinct

In the browser, SSR.hydrate checks buildId first, then SSR.resume verifies the envelope (Missing, Duplicate, Unreadable, Protocol, Plan, Invalid, or Route).

A page the browser does not take over

Pass when(document) and fresh(plan.version) to decline stale or wrong-viewer pages (such as an author opening a cached visitor page). Add otherwise: 'render' and until(model) (capped at UNTIL_LIMIT_MS, 3 s) to keep the served HTML visible while rendering the fresh app off-screen until until returns true (examples/cms/src/ssr/sitePlan.ts):

ts
SSR.hydrate(config, Post, { buildId, when, otherwise: 'render', until: Site.answered })