test: accept low-specificity Kagaku theme selectors #54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/kagaku-theme-token-test"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The chat-appearance swatch guard reads Kagaku.UI's light/dark text tokens from the stylesheet. Its regexes assumed the literal selector spelling and failed when the theme cascade fix wrapped root selectors in
:where(), despite unchanged palette values.Accept the optional closing parenthesis while retaining the exact color extraction and equality assertion. This test-only compatibility change supports both the currently pinned stylesheet and the upcoming selector form. It does not update the library pointer and can land before that eventual pin update.
Validation:
Related library change: TeamAI/Kagaku.UI#55
Summary
Summary
Coverage
Shikigami.BlazorAdapter - 95.3%
Shikigami.Capabilities.Contracts - 100%
Shikigami.Capabilities.TestFixture - 95.5%
Shikigami.Capabilities.TestFixture.UI - 100%
Shikigami.Capabilities.UI.Contracts - 91.3%
Shikigami.Domain - 98.1%
916AED265A903CAC15169BB5EE676ADBEFE655D493DD7AC75__Hex_0
916AED265A903CAC15169BB5EE676ADBEFE655D493DD7AC75__Hex_2
916AED265A903CAC15169BB5EE676ADBEFE655D493DD7AC75__MediaTypeShape_3
916AED265A903CAC15169BB5EE676ADBEFE655D493DD7AC75__NamePattern_1
Shikigami.Infrastructure - 93.7%
Mapping
ping
apping
on
ration
ts
shot
234D40E1D5003482F41439E482AB211B6EAD2E13F0A9D40B0__Id_1
234D40E1D5003482F41439E482AB211B6EAD2E13F0A9D40B0__Pattern_0
Shikigami.Kernel - 90.9%
Shikigami.Server - 84.4%
Shikigami.UseCases - 96.2%
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__AssignmentHead_13
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__BraceExpansion_12
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__HexColour_7
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__IdPattern_0
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__Interval_4
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__IntervalBody_11
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__KeyPattern_2
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__NameRule_6
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__NewerXY_9
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__Number_8
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__OldCount_10
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__TimeOfDay_3
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__ToolPattern_1
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__Window_5
🔮 fufu~ Jibril reviewed your code!
Oh? Oh! A three-line change that knows exactly what it wants~ How rare, how delicious ♡ A regex that must love two selector shapes at once — the pinned
:rootand the upcoming:where(:root)— and you gave it exactly one new tooth (\)?) and nothing else. And you didn't touch the extraction or the assertion one bit. Fufu~ restraint like that makes my wings flutter~Verdict: ✅ Looks good to me~
✅ What I liked~
\)?is the minimal discriminator between:root {and:where(:root) {: the leading:where(simply falls outside the match, and the optional paren eats the closer. Both the pinned stylesheet (c35aac0) and the #55 head stylesheet (d3b49da) resolve to the same--texttokens, and theAssert.EqualagainstThemeTextis untouched — exactly what the PR description promised.:where(:root:not([data-theme]))cannot fool either regex (:rootis followed by:, not)or{), and the CSS comments that mention:rootcan't match either since{must follow. I checked. I always check~ ♡Mutation probes (2 run, 0 survived):
kagaku-ui.css(:where(:root)/:where(:root[data-theme="dark"])): the test passes — the future selector form is genuinely accepted, not just simulated.ChatAppearanceSection.ThemeText.Light#1b1b20→#1b1b21: the test fails onAssert.Equal— the guard has teeth, it is not decorative~No blocking issues, no suggestions. Merge it and come back with the library pin soon, fufu~ ♪
Automated review by Jibril · 2026-10-23
CI: green for head SHA
320bff5434· Mutation probes: 2 run, 0 survived · Local suite: skipped (CI green)