- Shipped
- August 15, 2026 at 6:20 AM UTC
- Author
- kamo
- Commit
- 6512f07
Organization.fromJSON could not read back its own output. It mapped the brand ramps only from the nested `colors` object SecurityService sends, but what it EMITS is flat colorPri/colorPriLight/… — and it runs twice on every request: once server-side in the org route, which returns the mapped instance as JSON, and again in OrgProvider, because serialising across the RSC boundary drops the prototype so `instanceof Organization` is false. The second pass therefore found no `colors` key and set every colour to undefined. Every org's palette has been arriving in the browser empty. It stayed invisible because nothing in a component read those fields — `var(--color-primary)` comes from the provisioned theme CSS, not from here. The home page logo overlay is the first consumer, and it resolves a brand token against this palette: with the palette empty, every shade resolved to "no overlay" and the logo rendered untouched. Only White and Black worked, because they never consult the palette — which is exactly the shape of the bug report. Both shapes are accepted now, nested first, so the mapper is idempotent. organizationRehydration.test.ts pins that by feeding the mapper its own JSON output, which is precisely what OrgProvider does.