Stop losing the brand palette on the way to the browser

Fixkamo-internal
Ya
15 Agosti 2026, 06:20 UTC
Mwandishi
kamo
Ahadi ya
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.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei