Files
supabase/apps
Alaister Young e3db66050a fix(studio): rewrite next/head shim on top of React 19 metadata hoisting
The previous implementation portaled children into document.head on
the client and returned null during SSR — meaning <Head> contents were
absent from the prerendered HTML. React 19 ships native "document
metadata" hoisting: <title> / <meta> / <link> / <style> / <script>
rendered anywhere in the tree are hoisted to <head> automatically and
work for both client and SSR. Studio uses <Head> exclusively for those
metadata tags (verified across pages/), so the shim can simply render
children and let React do the hoisting.

Side effects:
- SSR head content (titles etc.) now lands in the prerendered HTML.
- Dedup is by element shape rather than Next's explicit key prop;
  observable output is equivalent for the metadata tags studio uses.
- Non-metadata children (arbitrary tags) would render in place rather
  than in <head>. No such consumers exist today; if one shows up, swap
  to a portal + SSR collector. Documented in the file header.
2026-05-08 15:33:07 +08:00
..
2026-05-07 18:44:15 -04:00