Repository navigation
fix(ui): the selected radio option shows an empty circle - #329
Conversation
The native mark is painted in `accent-color`, and the checked card fills with the same `primary-9` solid the mark was accented with. Chromium then draws the disc in the card's own colour, leaving a ring with nothing in it: the chosen date read as highlighted but not chosen. The accent now follows the card — `primary-foreground` on the primary solid, `danger-foreground` on the danger one — which the tenant palette already derives to be readable against step 9, so it holds in both themes and under a tenant palette. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SpTpcsB4MdWM9htwQxbWsh
…lass The scoping pass emits the palette block's `:root` arm as a bare `:where(.sy-atlas)`, so any element carrying the scope class and no theme class re-declares the LIGHT palette for everything below it. Ladle puts the scope class on both `<html>` and the story wrapper, so the wrapper overrode the `dark` class on `<html>`: every story rendered light whatever the toolbar said, and dark-mode review was impossible. Measured on the radio story before this: `<html>` resolved `--primary-9` to `184 58% 60%`, the card below it to `184 58% 28%`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SpTpcsB4MdWM9htwQxbWsh
The review pass found the mark's colours restating a matrix the card recipe already declared, 10 lines apart, with `highlight` present in one and absent from the other. One slotted recipe is the shape every other atom with a mark uses (Checkbox, ToggleGroup, Chip), and it leaves no way for the two halves to disagree. The specs read the marks off the rendered `checked` attribute rather than a fixture index, and the scope pin reads the wrapper's whole class list rather than two adjacent arguments, so a re-wrap or a reordering cannot redden it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SpTpcsB4MdWM9htwQxbWsh
Read unanchored, the pin took the file's first `clsx(` call. In a file that is about theming, another one naming a theme would answer for the wrapper and let the deleted class pass. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SpTpcsB4MdWM9htwQxbWsh
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SpTpcsB4MdWM9htwQxbWsh
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SpTpcsB4MdWM9htwQxbWsh
Deploying sahajatlas with
|
| Latest commit: |
173b84b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9824e31d.sahajatlas.pages.dev |
| Branch Preview URL: | https://claude-fix-323-radio-mark.sahajatlas.pages.dev |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff matches the ticket. One colour bug, fixed where the colour is decided. Making the mark a slot of the card's own recipe is the right shape — the two cannot disagree again, and it is the tv slots idiom ToggleGroup, Slider and the Switch already use. The Ladle commit earns its place: :where(.sy-atlas) does emit a bare light arm, so the second scope element re-declared the light palette, and the ticket's dark half could not be looked at without it.
One gap has no diff line. The body says "Preview pending" and names a pr-329 Workers alias, but this PR's live preview is Cloudflare Pages: https://1c62b1bc.sahajatlas.pages.dev, green at 20:11Z. should-fix — put that link in the body. It serves real data, so the ticket's /register check is reachable there, not only in a local Chromium. But ?atlas=/gb/south-east/brighton/163/register left me on the base countries view, so that route needs another form. The playground has no per-PR preview.
Findings
consider—RadioGroup.tsx:26, the comment's last line restates the recipe under it.
What was checked. #323 and the body against the diff (5 files, +86/-13). Read: RadioGroup.tsx, .ladle/components.tsx, use-theme.ts, palette.ts, the @theme block. --primary-on is foregroundFor(colord({ h, s, l: l9 })), WCAG black-or-white against step 9 itself, so the mark contrasts under any tenant palette. The deployed sheet carries .accent-primary{accent-color:var(--color-primary)}, which is hsl(var(--primary-9)). Both new utilities generate too. Every accent-* and bg-primary-9/bg-danger-9 call site: RadioGroup is the only native mark, so no sibling stayed outside. CHANGELOG sits under [Unreleased] / Fixed. No embedding.md surface moved. The accent-current dismissal holds — it recolours unselected marks too.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The last sentence restated the recipe below it: each fill already declares its mark accent beside the card's, so a reader can see that one palette repaints both. Lines 22-25 carry the `accent-color` mechanism, which is the part nobody can re-derive from the code. Addresses the review thread on RadioGroup.tsx:26. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GVn6kFa2oGBDdYoKrLkp8r
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 173b84b | Oct 25 2026, 08:33 PM |
|
Base merge — Adopted — Review body ( Rebutted — the playground does publish a branch preview. The body links its Lean gate green on the merged head. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
#329 landed its own `### Fixed` entry and link reference at the same two positions this branch writes to. Both entries are wanted: the radio mark and the drawer scroll are unrelated host-visible fixes. Kept both, #329 first to hold the section's descending PR order. No other file overlaps — #329 touched RadioGroup, the ladle wrapper and the scope spec, none of which this branch reads. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015WGofpx29gVMbk8UboQ8eB
CHANGELOG.md was the only conflict: both sides appended a Fixed entry and a link reference at the same position. Kept both, #329 first to hold the section's descending order. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YSji2Rg7xCVgqHownjnZzu
One conflict, in CHANGELOG.md § Unreleased → Fixed: both sides added a new entry at the head of the section. Both entries are kept, this PR's #324 above main's #329, since this one lands later. main's #329 adds a case to scripts/postcss-scope-widget.test.ts through a readRepoSource call that spec already made, so it takes no further slot in the per-edit selection this branch moved to its ceiling of 16. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012fXJ8cXFDNxJUqYbjzhsTm
Summary
Change outline
Components — one recipe paints the card and its mark
The mark's accent was a constant; it is now a slot of the recipe that already decides the card's fill, so the two cannot disagree.
Flow — which element declares the palette in Ladle
The scoping pass emits the palette block's
:rootarm as a bare:where(.sy-atlas), so a second scope element re-declared the light ramp below<html>.Preview
App: https://pr-329-sahajatlas.contact-c66.workers.dev — the branch alias, republished on every push. Cloudflare Pages serves the same build at https://claude-fix-323-radio-mark.sahajatlas.pages.dev.
/gb/south-east/brighton/163/registerat 390×844 — the date cards, on real SahajCloud data.?atlas=. The standalone shell mountsBrowserRouterover real paths (src/main.tsx), and the deploy falls back to the shell for any of them, while?atlas=is the embed's parameter on a host page — this shell ignores it and shows the base countries view.Atoms / Inputs → Radio Group, where the theme toggle is step 2 below.Test results
pnpm build✓ (assert:css,assert:maps),pnpm size✓ (standalone 310.6 / embed 312.4 / loader 2.8 KiB — unchanged),pnpm ladle:build✓accent-color: var(--color-primary-foreground)andvar(--color-danger-foreground)are in the emitted sheetManual verification
/registerat 390×844 and confirm the first date's mark is filled, in light and dark.Notes for reviewer
/gb/south-east/brighton/163/registerat 390×844, real data: the checked mark computesaccent-color: rgb(255,255,255)on cardrgb(30,107,113)in light, andrgb(0,0,0)onrgb(94,204,212)withatlas.themeset todark. No console errors. (A routine checkout has noVITE_SAHAJCLOUD_API_KEY, so the local pass ran against the built playground'sViews / Registrationstory instead.)<html>resolved--primary-9to184 58% 60%while the card below it resolved184 58% 28%— the ticket asks for both themes, and the dark half could not be looked at.accent-currenton the input, which would follow the card for every future state too. It also recolours the unselected marks from brand teal to the card's text colour, which this ticket does not ask for. Worth considering separately.setThemeRoot. It moves the theme singleton for every story to fix a dev-only cascade.Detail
Review passes:
/simplify(4 lenses — all four converged on folding the second recipe into a slot, applied; the test-helper and read-hoisting nits applied in part),/code-review high(1 finding: the scope pin was not anchored to the wrapper element, fixed in65b0913),/security-review(triggered by thescripts/[^/]*csspath rule; no findings — no input, sink, origin or credential is touched).pr-review-toolkitis not installed here.Why the accent is a token, not white:
--primary-onis derived per tenant by the palette engine (buildScale's.contrast()), so a brand whose step 9 is pale gets a black mark rather than an invisible white one.--color-danger-foregroundis a literal#ffffff, which is right againstred-9in both themes.What the browser actually draws: Chromium paints a checked radio as a ring plus a disc in
accent-color. With the accent equal to the card's fill, the disc vanishes and only the ring remains — the "empty circle" of the report, not a missing dot.Closes #323
🤖 Generated with Claude Code
https://claude.ai/code/session_01SpTpcsB4MdWM9htwQxbWsh