Skip to content

fix(ui): give status pills an opaque background so selection tints keep contrast - #274

Merged
erkamyaman merged 2 commits into
mainfrom
forms/badge-contrast
Oct 11, 2026
Merged

erkamyaman merged 2 commits into
mainfrom
forms/badge-contrast

Conversation

@erkamyaman

@erkamyaman erkamyaman commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

What and why

In the light theme, the INVALID status badge on a selected row of the Forms inspector's Fields table measured 4.14:1, below the WCAG AA minimum of 4.5:1. The badge tint was mixed with transparent, so the selected row's --accent-soft tint showed through it. In the dark theme it sat at exactly 4.50:1.

The badge tints are now mixed with --surface instead, as the Analog inspector's live pill already does. Each pill has its own opaque background, so its contrast is the same on normal, hovered and selected rows. The same change applies to the other status pills with this pattern:

  • Forms: the VALID, INVALID and PENDING badges, the error count in the forms list (4.14:1 on the active form in light), and the warning flag in the Fields table.
  • Routes: the error count on the Live route tab (4.36:1 on its selected tab in light).

No tokens, labels or behaviour changed.

INVALID on a selected row Before After
Light 4.14:1 4.96:1
Dark 4.50:1 5.73:1

How it was verified

  • pnpm format:check
  • pnpm typecheck (includes the ngc template check)
  • pnpm test:panel (29 files, 165 tests), with a new test that selects an invalid field and checks that no status pill rule uses a transparent background (it fails on main)
  • pnpm extension:build, with extension/ui committed
  • pnpm commit:check
  • Panel axe (scripts/panel-axe.mjs, on the installed Chromium 1194 because pnpm test:axe could not launch its pinned one) on every tab and view, dark and light: no violations
  • SSR demo, /examples/forms, Forms tab with an invalid field row pressed: axe finds no violations and nothing scrolls sideways at 1280px and 360px in both themes, and contrast measured in Chromium is 4.5:1 or more for every pill. With the old styles, axe reports color-contrast on the badge in light.

Screenshots

None attached.

Notes for reviewers

Found while verifying #272. The pill borders stay translucent on purpose: they are decorative and the text contrast does not depend on them. The Analog tables also tint the selected row, but their pills were already opaque, so they are unchanged. The Live route count value (4.95:1 after) is calculated, not measured in the browser.


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated form error counts, field status badges, warning flags, and live-route count badges to use the interface surface color as the tint base. These indicators now appear with a visible background tint instead of blending into a transparent background.

…ep contrast

The status pills in the Forms inspector (the VALID, INVALID and PENDING
badges, the error count in the forms list and the warning flag in the
Fields table) and the error count on the Live route tab mixed their tint
with transparent. On a selected row or item the accent tint showed
through, which lowered the contrast: the INVALID badge on a selected
Fields row measured 4.14:1 in the light theme and 4.50:1 in the dark
theme, below or at the WCAG AA minimum of 4.5:1.

Mix the tint with --surface instead, as the Analog inspector's live pill
already does, so each pill has its own opaque background and the same
contrast on normal, hovered and selected rows: 4.96:1 in light and
5.73:1 in dark for INVALID. Add a panel test that selects an invalid
field and checks that no status pill rule falls back to a transparent
background.
@github-actions github-actions Bot added area: panel The devtools panel app (app/) area: extension The Chrome extension labels Oct 10, 2026
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b2d7b636-4d73-4716-930c-5f779c068e4a

📥 Commits

Reviewing files that changed from the base of the PR and between a240664 and 6f4d011.


⛔ Files ignored due to path filters (1)
  • extension/ui/assets/index-DbNGREg7.js is excluded by !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].js

📒 Files selected for processing (4)
  • app/src/__tests__/forms-panels.test.ts
  • app/src/pages/forms-inspector.ts
  • extension/ui/assets/browser-agent-rpc-BXhoSh1z-D6F3uQZn.js
  • extension/ui/index.html

 ____________________________________________________
< Veni, Vidi, Verificavi. I came, I saw, I verified. >
 ----------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 21678f01-3ac4-4e60-bebf-cc6f55679b5a


📥 Commits

Reviewing files that changed from the base of the PR and between f245551 and a240664.



⛔ Files ignored due to path filters (1)
  • extension/ui/assets/index-Bbf1x-bA.js is excluded by !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].js


📒 Files selected for processing (5)
  • app/src/__tests__/forms-panels.test.ts
  • app/src/pages/forms-inspector.ts
  • app/src/pages/live-route.ts
  • extension/ui/assets/browser-agent-rpc-BXhoSh1z-CjnCi3tC.js
  • extension/ui/index.html


Limit details: You’ve used all 10 included reviews currently available.




📝 Walkthrough
📝 Walkthrough

Walkthrough

Form and live-route status tint backgrounds now mix with the surface color. A forms inspector test checks badge backgrounds and the active-form count. Extension UI bundle references now point to a different JavaScript asset.

Changes

Status badge backgrounds

Layer / File(s) Summary
Surface-based status tints
app/src/pages/forms-inspector.ts, app/src/pages/live-route.ts, app/src/__tests__/forms-panels.test.ts
Form and live-route status backgrounds mix their status colors with var(--surface). The test checks the invalid, pending, and valid badges and the active-form count for non-transparent backgrounds.

Extension bundle references

Layer / File(s) Summary
Update extension bundle references
extension/ui/index.html, extension/ui/assets/browser-agent-rpc-BXhoSh1z-CjnCi3tC.js
The module script and browser-agent RPC module now reference index-Bbf1x-bA.js.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix



Merge Risk: ⚪ Minimal · up to a2406

The status tints and extension bundle references have no identified merge-blocking issue. Merge after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main UI change: status pills now use opaque backgrounds to preserve contrast against selection tints.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (1 skipped: 1 unsupported.)




  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR



🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: In progress 🔵

View logs ↗
6f4d011 2026-10-11T02:01:36.533Z View logs ↗
  • Build: Failed ❌

View logs ↗
a240664 2026-10-10T23:31:10.468Z View logs ↗

Copy link
Copy Markdown
Member Author

The "Workers Builds: angular-devtools" check fails here the same way it fails on every open PR right now (#244 to #273 included), including PRs that do not touch the docs site. Its logs are only on the Cloudflare dashboard, so the cause can't be seen or fixed from this branch. The repo's own checks for this change (format, typecheck, panel tests, extension build, commit check) pass locally.


Generated by Claude Code

# Conflicts:
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-C_twCiPD.js
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-CjnCi3tC.js
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-d1Tsxw97.js
#	extension/ui/assets/index-BEfrZ0QX.js
#	extension/ui/assets/index-Bbf1x-bA.js
#	extension/ui/assets/index-ByEDQ2k8.js
#	extension/ui/index.html
@erkamyaman
erkamyaman merged commit 392aec4 into main Oct 11, 2026
1 of 2 checks passed
@erkamyaman
erkamyaman deleted the forms/badge-contrast branch October 11, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: extension The Chrome extension area: panel The devtools panel app (app/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant