Follow-up to #504 (plan 101), written from the plan-101 bytes audit. Every island bundles its own copy of the page's realtime runtime, because islands build with `splitting: false`.
| Pair on one page |
Shared bytes |
| like ∩ badge |
26,444 (98% of the badge) |
| like ∩ boot |
26,833 |
| feed ∩ boot |
26,833 |
Cuts, ranked
- Make the page boot the shared runtime. Move the store, socket client, host, channel book and outbox into the boot, and have islands reach them through the existing `Symbol.for('ultimate.realtime')` global with thin hooks. This is decision 12's "next lever" without a splitting build.
- `/posts/:id`: about 145 kB → about 95 kB.
- `/feed`: about 133 kB → about 98 kB.
- Browser error tables: only codes a browser can raise. About 5–7 kB per live island. Today `core-error-codes`, realtime `errors.ts`, `page-errors` and schema `errors` all reach island chunks.
- In-page socket engine only on fallback. About 5.6 kB per live island. `socket-engine` + `socket-routes` run only without a SharedWorker. Load them as a framework script by URL (the worker bundle already contains them).
- Seed the store from the server-rendered row. This needs a record-adopt seam and drops one GET plus about 2.2 kB from the like island.
Owners: realtime (`page-socket`, `use-*`, `boot`) and cli (`island-realtime`, `worker-bundle`). Internal only, so it can ship in a minor.
Follow-up to #504 (plan 101), written from the plan-101 bytes audit. Every island bundles its own copy of the page's realtime runtime, because islands build with `splitting: false`.
Cuts, ranked
Owners: realtime (`page-socket`, `use-*`, `boot`) and cli (`island-realtime`, `worker-bundle`). Internal only, so it can ship in a minor.