Quick reference · Print-friendly

Streaming boundary field guide

Parallelize first. Design the shell. Reveal along product seams.

4 testsValue · latency · geometry · failure

Boundary test

TestAskPass condition
ValueIs this region useful and understandable by itself?The fallback and reveal form a coherent intermediate state.
LatencyCan its work begin independently?Reads start in parallel; the boundary is not hiding a waterfall.
GeometryCan the fallback reserve the final shape?Reveal does not create surprising layout shift.
FailureCan this region time out or fail locally?The shell remains useful and the error has a local recovery path.

Shell checklist

  1. Resolve redirects, authorization, not-found, and critical metadata before bytes commit.
  2. Include a minimal but meaningful layout and primary context.
  3. Keep slow optional services below independent boundaries.
  4. Reserve dimensions and preserve accessible reading order.
  5. Define abort deadlines, local errors, logs, and correlation IDs.
  6. Measure shell time, reveal time, LCP, CLS, interaction readiness, and server occupancy.

Fast corrections

Streaming ≠ faster compute

It changes delivery order. Remove sequential dependencies separately.

Suspense ≠ every fetch

Boundaries follow useful visual and failure seams, not implementation count.

Fallback ≠ spinner

A good fallback preserves context, geometry, accessibility, and recovery.

200 ≠ all succeeded

After the shell commits, later region failures need in-document semantics and telemetry.