Skip to content

@ogygia/devtools · Dock

Region inspector

Outline every region on the page, open one island's card, and read the dock's tabs about regions. Hydration says whether each island woke from the server's markup, Bytes weighs its code, Wire shows its data, Hub its shared objects, Nav what a navigation did with it, and Timeline when it woke.

On this page

Most questions about an ogygia page are about one region. Is this part of the page an island? Why did it wake so late? What did it cost? Did it flash as it woke? The dock answers each one from a different angle, in its own tab, and joins them on one card per island.

Every tab here reads the page as it is now. Hovering a row in the Hydration tab lights its region up on the page. In the Lens, Page and Profiler tabs it does too, while the overlay is on. Clicking a row in those four tabs opens the region’s card.

Lens

The Lens tab is the starting point. Press show overlay, and every <ogygia-region> on the page gets a box, labelled with its component name, its wake (or lake, hole), and its JS cost. The boxes are tinted by kind, island, lake or hole, and an island’s box is dashed while it’s still cold. The overlay doesn’t catch the pointer, so the page keeps working under it, and the boxes follow the page as you scroll.

Hover a region on the page and a card shows its name, kind, wake, fingerprint, state, the size of the props the server sent it, how long it took to hydrate and its JS cost. The matching row in the tab lights up, and hovering a row lights up its box: the two always point at the same region.

Beside the buttons, the tab counts the islands, lakes and holes. On the dev server it also adds up the islands’ JS and says how many are still cold. Then it lists each region with four columns:

ColumnWhat it shows
islandThe component name. In dev it comes from the dev server; in a build, from the build’s own map.
wakeAn island’s wake (load, idle, visible, interaction, or its media query), else lake or hole.
js + depsOn the dev server, an estimate of the island’s code with everything it imports. 0 B for lakes and holes.
statehydrated or cold for an island, filled or pending for the others, cold (with its parent), then rides its parent, for a nested island.

The JS column is a dev estimate (unbundled, and a cold island’s code isn’t counted yet), so in a build it shows —. The Bytes tab has the real numbers there. Region kinds explains the states.

To inspect one region you can see, press pick on page, then click it. The overlay turns on while you pick, and turns off once you’ve picked. Esc cancels.

localhost:5173/shop
ogygia devtools a mock of seven of the dock's ten tabs; the numbers are made up
3 islands · 1 lake · 1 hole · 11.0 KB JS · 1 cold

Island card

Click a row in the Lens, Page, Hydration or Profiler tab, or pick a region on the page, and its card replaces the tab. (A Hydration row with a difference opens the difference instead.) It gathers what every tab knows about that one region. ‹ back returns to the tab, and scroll to it › brings the region into view.

The card has these parts, each shown when there’s something in it:

  • lifecycle: the island’s steps, connected → scheduled → woke → hydrate → done (and replay, when a click was replayed), each timed from when it connected, and how long hydrating took. A region that never runs in the browser says so.
  • in the browser: its row from the Page tab: the module load, the wait for its turn, the hydrate step (and how much of it was long tasks), when it was awake, the layout shift it caused, and every Page finding that names it.
  • in the last session: from the Record tab, its clicks, DOM changes, slow interactions, and the requests it made, each split into server time and the wait for its upstream calls.
  • on the server: from the last profile of this page, its render time, its props size (and the value that isn’t plain JSON, when one is), how many page-seed values it references, its hydrate time in browsers the profiler heard from, and how often it recovered. It also names a line in the component that can only render in the browser, when there is one.
  • cost: in a build, its code (the files it needs and their size), only it (what removing it would save) and shared (with which islands), and any module the page loads twice. On the dev server, its code with imports, its heaviest modules, a barrel it imports whole, and a line that draws differently in the browser. With the server’s events: its props payload. Once its code has loaded: its entry file’s size, over the wire and decoded. (The card also has a row for the server HTML’s size, but the server never sends that number yet, #2304.)
  • props: the props the server sent it, decoded into a tree you can fold. A value that crossed as a shared object (a wired class, a store, a held region) shows as a chip with its hub id.
  • identity: its fingerprint, entry, mode and state.

Hydration

The Hydration tab answers one question per island: did it wake from the server’s markup? Each island gets one status, worst first:

StatusWhat happened
failedIts module threw while it loaded or mounted. The error’s first line is shown. The island keeps its server HTML and does nothing.
recoveredSvelte threw the server’s DOM away and rendered it again (a flash, and a second render), with the runtime’s reason.
healedAnother script edited the island before it woke, and the runtime put the server’s markup back, then hydrated that.
markup changedThe browser’s first render differs from the server’s. Click the row to see the difference.
asleepIt hasn’t woken yet.
cleanIt woke from the server’s markup with nothing changed. A nested island that rode its parent says rides <Name>, the island around it.

Badges at the top count each status. Hover a row to light up the island. Click a row with a difference to open it under the row; click any other row to open the island’s card.

The difference compares the server’s markup with the browser’s first render and shows only the changed pieces, with a little context, as −removed +added. A very big island keeps only the part around its first change, and says how far into its markup that is. Too many changes show only where they start. “No visible difference” means only Svelte’s hidden markers moved, which nobody sees.

Two cases read differently than you’d expect:

  • A script that edits an island before ogygia’s runtime starts shows as markup changed, not healed, because the runtime’s copy of the server’s markup already has the edit in it. The difference then shows the edit.
  • The before-and-after markup needs a measured page load. In a build, if you turn the devtools on after the page loaded, the tab says to reload.

@ogygia/testing’s hydration() returns this same list, so toHydrateCleanly() fails a test on the same islands this tab flags.

localhost:5173/shop
ogygia devtools a mock of seven of the dock's ten tabs; the numbers are made up
markup changed 1asleep 1clean 1

Bytes

The Bytes tab is the byte ledger. It reads differently in a build and on the dev server, because only a build has its final files.

In a build, it reads the page’s island graph (the list of files each island needs, which the build writes into the page) and weighs each file as the browser actually loaded it, over the wire. For each island it shows:

  • files: how many files it needs, and how many of them haven’t loaded yet (cold);
  • loaded: their size over the wire;
  • only it: the bytes no other island needs, which is what removing the island would save;
  • shared: the bytes it shares with other islands.

The runtime’s own files get a row. The page row counts every file once, over the wire and decoded. Below it, shared files names the biggest files several islands use, and which islands use each. After a profile of this page, loaded twice lists modules the build shipped as two copies (one package reached by two paths) that this page loads both of.

On the dev server, modules load one by one and unminified, so the tab estimates. wrapper is the island’s entry file, and +deps is its whole bundle: the component and everything it imports, with a module count. Shared code counts once in every island that uses it, so the figures overlap and the total over-counts. A cold island shows — until it loads. Build and preview the app for real numbers.

localhost:5173/shop
ogygia devtools a mock of seven of the dock's ten tabs; the numbers are made up
SearchBox 4.2 KB
Reviews 6.8 KB
CartButton —

shared with every island: 3.1 KB ogygia runtime

Wire

The Wire tab shows the data the server sent across each boundary. It reads the server’s events for this page, so it needs ogygia.handle() in your hooks and, in a build, the devtools turned on before the page loaded.

  • islands · props payload: every region the server rendered, with its mode (island, server for a hole, lake), its fingerprint (— for holes and lakes, #2304) and the size of its props.
  • document seeds: the page data and remote-query cache the server wrote into the page, with their sizes (page, remote).
  • capabilities minted: one row per server island that got a signed capability, named by its module, with how long its answer may be cached (no-store when not at all).
  • data across the wire: the props and seeds added up.

An empty tab says “no server crossings recorded”: the page came without the server’s events.

localhost:5173/shop
ogygia devtools a mock of seven of the dock's ten tabs; the numbers are made up
islandmodefpprops
SearchBox island3f9a0c2131 B
Account server—2 B
Article lake——
Reviews islandc7d24e901840 B
CartButton island81be5f0711 B

document seeds: page 1.2 KB

Hub

The Hub tab shows the objects several islands share. A wired class, a store, a snippet, a held region or a function that crosses to the browser has one id, and the browser decodes it once per id, so every island holding it gets the same live object. See Share one live object and Serialization.

Each row is one object: its name (the class or export name, else a short id), its kind (wire, store, derived for a derived store’s recipe, snippet, region, fn), its scope, held by (how many times an island picked it up) and reunited (how many of those got the existing object instead of a new one). Shared objects come first, with a count at the top. dispose lists what a navigation tore down, by scope, with how many objects went.

A page with nothing shared says “no hub activity on this page”. The hint after it names two pages from ogygia’s own test app, which your app doesn’t have (#2304).

The Nav tab shows what the last in-app navigation did with each region. ogygia’s SPA router changes the page in place, so each region on the new page gets one decision:

DecisionMeaning
keepThe same island, reused: its live state survived the navigation.
patchThe same place, with new props: mounted again where it was.
mountA new island that appeared on this page.
removeAn island that left with the old page.

At the top: where it went from and to, whether it was reconciled in place or a full swap, how long it took, whether a View Transition ran, and how many holes went out in one request (single-flight ×N). The table lists each region’s decision, marked via keep or via persist when a keep marker or a persisted region matched it. A full swap has no per-region decisions, and says so. recent navigations lists the last eight.

Before the first in-app navigation, the tab says “no navigation yet”.

Timeline

The Timeline tab puts the islands’ steps on one time axis: one lane per island, plus a page / nav lane for the runtime’s boot and navigations. A hole has no fingerprint in the browser, so its steps show in the page / nav lane (#2304). Each lane shows the first time each step happened: scheduled, woke, hydrating, done, and a replayed click. A bar runs from the island’s first step to done, with the time beside it. A bar still open on the right is an island still waking; a red one failed. Hover a dot for the step and its time.

It covers this page only: after an in-app navigation it starts from that navigation. A live region that renders again later keeps its first times, so it doesn’t stretch the axis.

The Page tab’s waterfall splits the same wakes into their parts (module, turn, hydrate) and puts them against the page’s paints. Use the timeline for the order of events, and the waterfall for what took the time.