One owner for every write
How one module now owns theme updates from the editor, assistant, shared URLs, and storage, including validation, identity, and targeted DOM writes.
Engineering notes
Notes from building this site: architecture decisions, performance measurements, and later writeups about the theme system. Each explains the problem, tradeoffs, and what I would revisit.
How one module now owns theme updates from the editor, assistant, shared URLs, and storage, including validation, identity, and targeted DOM writes.
The first-paint theme fix is deferred. When implemented, its script must be generated from the Active Theme module to avoid duplicating validation and CSS-variable mappings.
A theme edited away from a preset stays custom, even if its values later match. This decision avoids comparing every value against every preset during each colour drag.
The editor and AI assistant share one validation policy. The note also corrects its original description of the code's behavior before that policy was implemented.
A radius edit went from 54 CSS-variable writes to 1. This note records the measurements, their limits, and the unit tests that now check which variables each operation returns.