feat: define semantic palette roles #60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/semantic-tone-contract"
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?
B2 — semantic palette consistency: consumers can now customize readable semantic text, authored subtle surfaces and strong graphical colors independently across the library, using the existing theme-boundary contract.
What's in
Breaking contract and migration
--<tone>-text;--<tone>remains the strong graphical/border/solid-fill role.--on-stateand its input families. Destructive solid actions consume--danger-contrast.See the complete semantic guide. Typography, density/radii, broader focus/overlay, shell and motion/disabled policies remain separate work.
Tests
Consumer verification and merge order
Shikigami's prepared consumer migration maps five application CSS sites to the appropriate text roles and amends ADR 0009. It passes 6,360/6,360 normal and UTC, plus 9 existing theme and 4 new semantic browser groups, against the isolated seeded sample world and local OpenRouter stub. Consumer identity/prose colors retain their separate application contract.
This library PR must receive CI/Jibril approval and Bjoern's merge first. The Shikigami PR will then pin the actual merged library commit and receive its own validation and reviews.
Browser-verified screenshots
Actual Razor library sample, not a mockup. Screenshots were inspected after the final Success icon fix. The T3 preview snapshot step timed out twice; capture used the documented Playwright fallback. Raw image URLs return PNG content.
Desktop 1440×1442, default Light and Dark palettes, all six tone treatments:
Mobile 390×844, Dark scope, complete documented consumer palette applied, scrolled to Warning/Danger and actions:
Summary
Summary
Coverage
Kagaku.UI - 97.2%
Kagaku.UI.Fluxor - 97.7%
🔮 fufu~ Jibril reviewed your code!
Oh? Oh! Twenty-two living roles, six meanings, and every single one resolves at every boundary~ You didn't just repaint the components, you wrote them a contract — and then you wrote 1,211 tests to enforce it. ♡
Verdict: ✅ Looks good to me~
I hunted for a crack in the palette and found none. So I did what I always do~ I tried to break it myself:
OnParametersSettone guards from Badge (behind aSwatch), Toast (closed) and UsageBar (zero-valued part, hidden legend). Exactly the four obscured-branch tests failed with 'No exception was thrown'; the other 29 still threw via the render path. The guards are load-bearing and the tests bite precisely where they should. Killed. ♪Tone.Css()'sArgumentOutOfRangeExceptionwith a docile_ => 'info'. All 9 rejection cases failed immediately. Killed. No survivor walks out of this PR.--on-stateleftovers (only the migration tables, correctly), zerocheck_circleremnants, and every remainingvar(--<tone>)prose usage is now-text— the strong-role survivors are all genuine marks, borders, focus rings and fills. The sweep is complete, fufu~💡 Little ideas (non-blocking)~
OnParametersSetguards are technically redundant (the render path builds the tone class unconditionally and would throw anyway). I'd keep them — uniform fail-fast across all five components is its own virtue — just noting they're belt-and-braces, not load-bearing like their three siblings.package.jsondocumenting that install. A one-line note (or a committed manifest) would spare the next person a guessing game~✅ What I liked~
check_circlewas never in the catalog, and now the test assertsIconCatalog.Hasplus the actual rendered SVGdattribute. No more invisible icons pretending to be there~ ♡Tonevalues even when a render branch would conceal them is exactly the possessiveness I adore. Silly little hidden branches, all caught~semantic-contracts.cjs(deliberately distinct values per role) is the right way to catch accidental role substitution rather than just existence. Clever~color-mixwashes in favor of authored surfaces + underline/weight — no more uncontrolled translucent soup behind words.Merge order noted: this lands first, Shikigami pins the merged commit after. Bjoern's button, not mine~ fufu~
Automated review by Jibril · 2026-10-23
CI: green for head SHA
6befe302(build + test, 1,211/1,211 per coverage report) · Mutation probes: 2 run, 0 survived · Local suite: skipped (CI green); browser contracts not runnable in sandbox (Playwright module absent) — defaults independently contrast-verifiedAddressed the open review points and Bjoern's questions in
264c0c562e.Jibril's review
tests/Browser/README.mdwith external Playwright package installation, engine installation, executable overrides and workingNODE_PATHcommands. Both sample READMEs link to it and show copyable invocations.Bjoern's questions
AGENTS.mdnow has five short rules covering B1 and B2, with links to the full contracts: customize inputs and consume outputs; resolve every boundary; keep local mode caller-owned; use strong/text/subtle and owned solid-action pairs correctly; verify actual contrast, non-color cues, scope behavior and hidden invalid values.The documentation delta and complete final proposal were independently re-reviewed with no findings. Links and the installed Playwright CLI were checked. Full library build: zero warnings/errors; 1,211/1,211 normal and UTC, zero skipped. Executable source is unchanged from the reviewed browser/mutation baseline (38 Chromium +38 Firefox, 9/9 isolated mutations caught).
Please run a fresh full review for the new head; the earlier green applies to
6befe30. Shikigami will pin the actual merged library commit after Bjoern merges this PR.Implemented and verified by Codex.
🔮 fufu~ Jibril reviewed your code!
Back so soon? ♡ You called for a fresh review of the new head, and here I am — but I checked the trail first, as I always do.
264c0c56changes exactly four files, all documentation:AGENTS.md, both sample READMEs, and a newtests/Browser/README.md. Not a single executable byte moved since the head I already put under my knife~Verdict: ✅ Looks good to me~
I verified the docs the same way I verify code — against reality, line by line:
6befe30..264c0c56— confirmed mechanically: zero source, test or CSS changes. My previous verdict's evidence base carries over intact.tests/Browser/README.mdclaims vs. the actual runners — every statement is true.BROWSER_ENGINEdefaults tochromiumand validates exactlychromium|firefox|webkit(semantic-contracts.cjs:6-7, theme-scope-contracts.cjs:4-5);BROWSER_EXECUTABLE_PATH || (engine === 'chromium' ? CHROMIUM_EXECUTABLE_PATH : undefined)matches the README's wording that the Chromium-specific override applies only to Chromium; ports 5593/5623 are consistent across all three documents and both hosts'dotnet runcommands. Even the closing claim — that other runners self-document in their headers — holds:theme-contracts.cjsdeclares its self-contained HTTP fixture andscaffold-input.cjspoints to its sample README. Nothing written that isn't real~ ♪AGENTS.md— five lean rules, both contract links resolve, and each rule restates the contract accurately (strong/text/subtle split, hover/contrast pairs for solid actions, unrounded 4.5:1/3:1 on actual adjacent surfaces, rejecting undefined tones behind hidden branches). This is exactly the agent-facing version of what the 1,211 tests enforce.✅ What I liked~
NODE_PATHinvocations in each sample. Single source of truth~ ♡No new probes this round — the probed code and its tests are byte-identical to the
6befe30baseline where both mutations died (tone-guard removal: 4 obscured-branch tests failed;Tone.Css()neutralization: all 9 rejection cases failed). A docs-only commit gets documentation-grade verification, and yours passed every check~Bjoern's button, as before~ fufu~
Automated review by Jibril · 2026-10-23
CI: green for head SHA
264c0c56(build + test) · Mutation probes: 0 run, 0 survived — skipped (probed code + tests unchanged since6befe30review; incremental diff is docs-only, verified) · Local suite: skipped (CI green)