Skip to content

fix(web): declare the rule tokens the Dashboard reads, and guard undeclared custom properties - #885

Merged
mforce merged 1 commit into
mainfrom
fix/dashboard-rule-tokens
Sep 16, 2026
Merged

mforce merged 1 commit into
mainfrom
fix/dashboard-rule-tokens

Conversation

@mforce

@mforce mforce commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

Two custom properties the app reads were never declared, and one more had been undeclared for longer:

Found while #834 (link colour) walked the token consumers. Surfaced as a fix rather than an issue because the Dashboard on main is missing its rules today.

Guard, red first

web/src/styles.declared-tokens.test.ts walks every var(--x) in non-test web/src (the fake names under src/test/ excluded) and asserts each is declared in styles.css. Against main's stylesheet it fails with:

undeclared custom properties:
--rule-strong in routes/Dashboard.tsx
--rule in routes/Dashboard.tsx
--accent in styles.css

At this head it passes, with styles.test.ts, styles.elevation.test.ts and Dashboard.test.tsx (142 tests). npm run typecheck clean.

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.

…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.
@mforce

mforce commented Sep 16, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c0c9c4a0-caeb-4b38-90f0-ea30994a6400

📥 Commits

Reviewing files that changed from the base of the PR and between 2e94277 and 3ff5349.

📒 Files selected for processing (2)
  • web/src/styles.css
  • web/src/styles.declared-tokens.test.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mforce

mforce commented Sep 16, 2026

Copy link
Copy Markdown
Owner Author

Before is main (the #883 final capture at ab6dddc, demo farm); after is this head, sim stack rebuilt, same farm, 1:1. The row hairlines, the header rules and the double rule over the total appear; nothing else changes.

Before, 1280 light
After, 1280 light
Before, 390 light
After, 390 light

@mforce

mforce commented Sep 16, 2026

Copy link
Copy Markdown
Owner Author

Review round (CodeRabbit rate limited; local Codex CLI review of git diff origin/main...HEAD at 3ff5349 stood in): no correctness findings. Codex independently re-ran the guard's scan and found 53 declared tokens and no undeclared references. Loop closed at one round with no product defect.

@mforce
mforce merged commit 5bead1f into main Sep 16, 2026
17 of 18 checks passed
@mforce
mforce deleted the fix/dashboard-rule-tokens branch September 16, 2026 15:26
mforce pushed a commit that referenced this pull request Sep 16, 2026
🤖 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant