Skip to content

finding(app-shell): ~141 KB of the console eager closure is previews/inspectors pinned by four SYNCHRONOUS studio-design registry reads — a different contract from the ComponentRegistry (arm C of #6776) #6795

Description

@claude

Filed by the domain:ui execution seat (PM session session_01CRJge11jso9TpXRWFt1Z49) as arm C of #6776, which its own analysis says belongs on a separate card. registerStudioComponents.tsx's docblock already rules the studio surface's laziness "a separate measured card, not a rider here" — this is that card.

The observation

#6776 asked whether metadata-admin's 172,660 B eager closure could be made lazy. The measurement answered something more useful: most of those bytes are not held by the contract that card was about.

⚠️All figures below are relayed from #6776's measurement, not re-measured by this seat. They were taken on c6732825d from three console builds, read from apps/console/dist/eager-closure.json and the emitted chunks' own module lists.

The metadata-admin chunk's 1,219,615 B rendered, by subtree:

subtreerendered Bshare
previews/*460,75337.8%
inspectors/*353,84129.0%
metadata-admin/* top level315,60125.9%
everything else89,4207.3%

And in the full lazy shape (E1b), 877,242 B of previews and inspectors stay EAGER — relocated, not freed. They are held by four synchronous consumers outside metadata-admin:

consumerreadsif unregistered
views/studio-design/StudioDesignSurface.tsxgetMetadataPreview ×2, getMetadataInspector ×3, getMetadataDefaultInspector ×1canvas silently non-editable
views/studio-design/ObjectSettingsPanel.tsx:75getMetadataDefaultInspector('object')panel silently empty
views/studio-design/ObjectHooksPanel.tsx:88getMetadataDefaultInspector('hook')panel silently empty
views/studio-design/ObjectActionsPanel.tsx:101getMetadataDefaultInspector('action')panel silently empty

⭐ Why this is a different question, not more of the same

These reads are synchronous and return undefined. No Suspense boundary can repair any of them. Suspense catches a promise thrown by a rendering lazy component; it cannot catch a registry lookup that returns nothing. The failure is silent, exit 0, and shows up as "this surface just isn't editable".

That is a different failure mode from #6776's — a pending component, which every render site there already tolerates — and it is why the same answer does not transfer. Anyone taking this card should treat "make it lazy" as the conclusion to be earned, not the starting shape: the prior question is what a consumer should see when a registry it reads synchronously has not been populated yet.

Not scoped here

What the answer is. This card records that ~141 KB sits behind a registry contract nobody has ruled on, with a named failure mode. Scoping it needs its own measurement — in particular whether these four consumers can be made to tolerate an unpopulated registry at all, which #6776's analysis explicitly did not test.

Also unmeasured: how much apps/console/src/preview-gallery.tsx constrains this. It reads the same registries but is a standalone entry not present in the production build.

Related

#6776 (where this was measured; arms A/B are the ComponentRegistry question) · #6683 (the sideEffects contract ruling) · #5486 (the lazy-that-is-not-a-split shape) · #6785


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:queuepriority:p2

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions