fix(theme): keep colors reactive after switching theme#208
Closed
J-Sek wants to merge 1 commit into
Closed
Conversation
|
commit: |
johnleider
added a commit
that referenced
this pull request
Apr 23, 2026
When `reactive: true`, `values()`/`keys()`/`entries()` now iterate the underlying collection on every call instead of serving a cached array. The cache was silently dropping Vue's iteration dependency on warm re-runs, so a computed that iterated a reactive registry would lose its Map-iteration dep after any re-run that hit the cache — subsequent mutations then failed to propagate. Refs #208
johnleider
added a commit
that referenced
this pull request
Apr 23, 2026
…-run Three regression tests for values()/keys()/entries() that would have caught #208. Each wires a computed that first runs through a non-iteration dep (ref bump), then mutates the registry and asserts the computed picks up the change. Verified to fail without the cache skip in the reactive path.
johnleider
added a commit
that referenced
this pull request
Apr 23, 2026
…e fix The tip on create-registry.md steered users away from `reactive: true` toward `useProxyRegistry` because `values()` caching broke iteration deps. That bug is fixed (see PR #209) — rewrite the tip to recommend `reactive: true` for template/computed iteration and position `useProxyRegistry` as the tool for event-driven snapshots, deep tracking, or cases where wrapping tickets isn't desired. Qualify the \"What's NOT Reactive\" table in the reactivity guide with a pointer to the reactive-option pattern. Simplify Pattern 1 so the example calls the public `registry.values()` / `registry.size` rather than poking at `registry.collection` directly, now that those are reactive too. Refs #208 #209
johnleider
added a commit
that referenced
this pull request
Apr 23, 2026
- `.claude/rules/composables.md`: new section "Plugins and Reactive Defaults" covering the primitive/plugin tiers, when to pass `reactive: true` to an internal registry, the two-registry architecture, and how `reactive: true` and `useProxyRegistry` complement each other. - `PHILOSOPHY.md §4.4`: rewrite from "the reactive: true footgun" to "Registry reactivity". The footgun described (values() cache dropping Vue dep tracking) was closed in #209 — that section was actively teaching the wrong mental model through #210, #211, and #212. New text positions `reactive: true` and `useProxyRegistry` as two valid complementary options. - `PHILOSOPHY.md §6.7`: revise the closing warning that said "do not substitute reactive: true on the registry itself" — same reason. Refs #208 #209 #210 #211 #212
johnleider
added a commit
that referenced
this pull request
Apr 23, 2026
#213) - `.claude/rules/composables.md`: new section "Plugins and Reactive Defaults" covering the primitive/plugin tiers, when to pass `reactive: true` to an internal registry, the two-registry architecture, and how `reactive: true` and `useProxyRegistry` complement each other. - `PHILOSOPHY.md §4.4`: rewrite from "the reactive: true footgun" to "Registry reactivity". The footgun described (values() cache dropping Vue dep tracking) was closed in #209 — that section was actively teaching the wrong mental model through #210, #211, and #212. New text positions `reactive: true` and `useProxyRegistry` as two valid complementary options. - `PHILOSOPHY.md §6.7`: revise the closing warning that said "do not substitute reactive: true on the registry itself" — same reason. Refs #208 #209 #210 #211 #212
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.
Reproduction:
Fixed by using
Object.assign(...). Cuts a bit deep, not sure why the issue did not surface earlier.Playground