fix(web): declare the rule tokens the Dashboard reads, and guard undeclared custom properties - #885
Conversation
…clared custom properties #883's ruled Dashboard reads --rule and --rule-strong, which nothing declared, so every row hairline and header rule was dropped at computed-value time with no error; .named-picker-trigger's focus ring read an undeclared --accent and fell to a literal blue. Both are declared now (--rule as the hairline, --rule-strong as 28% ink in each theme; the focus ring takes --focus), and a guard walks every var(--x) the app reads against the stylesheet's declarations, red first on all three.
|
@coderabbitai review |
|
Warning Review limit reachedNext included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Review round (CodeRabbit rate limited; local Codex CLI review of |
🤖 I have created a release *beep* *boop* --- ## [0.1.2](v0.1.1...v0.1.2) (2026-09-16) ### Features * **data:** standardize business record chronology ([#820](#820)) ([6231b31](6231b31)) * **infra:** optional leader-lease endpoint for pooled deploys ([#869](#869)) ([e9bc6a7](e9bc6a7)) * **sim:** seed a second farm for the README dashboard capture ([#867](#867)) ([de407c6](de407c6)) * **web:** adopt MUI, themed from the farm palette tokens ([#674](#674)) ([#860](#860)) ([6c83c5c](6c83c5c)) * **web:** convert Daily entry to MUI, field-first on the phone ([#888](#888)) ([b66f8b8](b66f8b8)) * **web:** convert the Dashboard and app shell to MUI ([#829](#829)) ([#883](#883)) ([2e94277](2e94277)) * **web:** retire the Slack-blue link colour for ink + a rule underline ([#884](#884)) ([c08f9d8](c08f9d8)) * **web:** serve a per-request CSP nonce so Emotion's styles apply under style-src 'self' ([#874](#874)) ([ba4e6f3](ba4e6f3)) * **web:** visual language theme overrides for the MUI revamp ([#864](#864)) ([#882](#882)) ([0bb6b73](0bb6b73)) * **web:** whole-app MUI baseline, theme policy guard and the [#740](#740) phone action rule ([#823](#823)) ([#871](#871)) ([af565e4](af565e4)) ### Bug fixes * **auth:** fail closed on unresolved flock-scope actors ([#787](#787)) ([#868](#868)) ([16d0350](16d0350)) * **auth:** make farm configuration owner-only ([#870](#870)) ([42f9036](42f9036)) * **e2e:** repoint the canary at the markup two PRs replaced ([#844](#844)) ([18b45dc](18b45dc)) * **i18n:** tl glossary uses the standard passive of ilagay ([#813](#813)) ([20dec10](20dec10)), closes [#738](#738) * **sim:** stop the k6-baseline EXIT trap masking a clean run as failed ([#838](#838)) ([f5ec96f](f5ec96f)) * **web:** declare the rule tokens the Dashboard reads, and guard undeclared custom properties ([#885](#885)) ([5bead1f](5bead1f)) ### Performance * **ci:** start the serialized integration collection first ([#861](#861)) ([1dcc7f6](1dcc7f6)), closes [#839](#839) ### Documentation * **auth:** record the OAuth 2.1 decision for MCP authentication ([#801](#801)) ([0510854](0510854)) * **designs:** MUI revamp design doc, component map, layout system, IA ([#862](#862)) ([da49481](da49481)) * **readme:** recapture the daily entry, reports and sales screenshots ([#865](#865)) ([f18e336](f18e336)) * **specs:** correct the sales_order_items column list in §10.5 ([#812](#812)) ([afe4a02](afe4a02)), closes [#737](#737) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: cluckwork-lockfix[bot] <309265648+cluckwork-lockfix[bot]@users.noreply.github.com>




Summary
Two custom properties the app reads were never declared, and one more had been undeclared for longer:
--ruleand--rule-strong(10 reads inDashboard.tsx, shipped by feat(web): convert the Dashboard and app shell to MUI (#829) #883 for web: convert the Dashboard to MUI — ledger desktop, field-first phone #829): every row hairline, header rule and the double rule over the total was dropped at computed-value time, with no error anywhere. Declared now in both themes:--ruleis the hairline,--rule-strongis 28% ink, as DIRECTION.md defines the two rule weights.--accent(.named-picker-trigger:focus-visible): the focus ring fell to its literal blue fallback on every palette. It now reads--focus, the farm's focus token.Found while #834 (link colour) walked the token consumers. Surfaced as a fix rather than an issue because the Dashboard on
mainis missing its rules today.Guard, red first
web/src/styles.declared-tokens.test.tswalks everyvar(--x)in non-testweb/src(the fake names undersrc/test/excluded) and asserts each is declared instyles.css. Againstmain's stylesheet it fails with:At this head it passes, with
styles.test.ts,styles.elevation.test.tsandDashboard.test.tsx(142 tests).npm run typecheckclean.Screenshots
Before is #883's final capture on
main; after is captured from the sim stack rebuilt at this head on the demo farm. Attached in a comment below.Refs #829, #834.