perf: gui sheet keeps only mounted themes — 350,715 → 79,364 bytes - #46
Closed
zeekay wants to merge 1 commit into
Closed
perf: gui sheet keeps only mounted themes — 350,715 → 79,364 bytes#46zeekay wants to merge 1 commit into
zeekay wants to merge 1 commit into
Conversation
config.getCSS() emits every color family the config knows (12 families x light/dark x component sub-themes); this app mounts light/dark only. The generator now drops rules whose every selector references an unmounted family — the runtime cannot re-insert theme CSS (themes hydrate FROM this sheet), so mounted themes stay whole. Emitted asset: 344,929 → 76,391 raw, 28,222 → 11,666 gzip. Pixel-identical under playwright on 10 routes x 2 viewports x light+dark, hydrated and JS-off SSR paint both. Co-authored-by: Hanzo Dev <dev@hanzo.ai>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
config.getCSS() emits every color family in the config; the app mounts light/dark only. The gen-gui-css.mjs generator now prunes rules whose selectors all reference unmounted families (blue/red/green/... x light/dark). Runtime cannot re-insert theme CSS (themes hydrate FROM the sheet), so mounted themes are kept whole; a lone .tm_xxt survivor is a dead hydration sentinel and is dropped.
Measured (local prod build, next start):