Repository navigation
fix(web): keep Devices page labels, checkboxes and anomaly badges readable - #4845
Conversation
…dable Secondary labels on the admin Devices page drew the muted colour at 70% opacity (about 4.1:1 on the panel), unchecked filter checkboxes had a 1.13:1 outline, and the red anomaly badges put plain red text on a red tint (4.15:1, 3.2:1 in high contrast). The sticky group header was 60% opaque, so bright rows scrolling under it washed out its text. Use the full muted colour for the labels, the form-control border token for the checkbox, the status-label red for the badges, and a 95% opaque header like the app's other blurred sticky headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 8 minutes. View limit details
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (claude-opus-5-5, reviewed d738a32)
The token choices check out. text-destructive-label on bg-destructive/10 is the same pairing the play-method tags use in adminActivityPresentation.ts, which is what app.css documents the token for. border-input is the token the shared ui/checkbox.tsx already uses for its edge. All six touched components are local to this file, and every class exists in the @theme inline block. In high contrast, checked:border-foreground now wins over the base border because no !important rule targets .border-input.
O1 (nit, inline): the sticky header can be solid bg-surface without backdrop-blur.
O2 (low, follow-up, not on a diff line): OverrideGauge still renders a zero count as text-muted-foreground/50 at 11px (AdminDevices.tsx:1393). That works out to about 2.7:1 on --surface and 2.8:1 on --background. The /50 class doesn't match the high-contrast !important rule, so high contrast mode leaves the 50% alpha in place. This PR says #4826 owns the group totals, rail counts, and last-seen dates; the override count is in neither list. If it isn't deliberately dimmed as decoration, it needs the same treatment as the other labels, here or in #4826.
AI disclosure: written by claude-opus-5-5 (Claude Code) as an automated adversarial review.
At 95% opacity the blur barely showed, but it still let a bright row under the header lower the badge's contrast. A solid surface matches the settings device list's sticky group header and removes the layer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
On O2 from the adversarial review: the |
Keyboard focus moving up the device list stopped with the row's name behind the sticky group header, now opaque. Scroll padding on the list makes focus scrolling leave room for the header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Adversarial review (gpt-6.2-sol, reviewed d738a32). The reviewer couldn't post its own review, so its findings are recorded here, each with what happened to it. Score: 8/10.
AI disclosure: summary written by claude-opus-5-5 (Claude Code) from the automated review's output. |
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (Gemini 4 Neon, reviewed d738a32)
The changed classes in web/src/pages/AdminDevices.tsx are valid in @theme inline, match web/src/app.css's documented token rules and existing bg-*/95 / text-destructive-label precedents, and introduce no variant or high-contrast !important regressions. Three contrast gaps remain on the same page (none fall on a diff hunk line):
G1 (medium) — Plain text-destructive and bg-destructive/90 still fail in high contrast inside AdminDevices.tsx
web/src/pages/AdminDevices.tsx:1926(ReadoutCell, between edited lines 1917 and 1934),web/src/pages/AdminDevices.tsx:775(Stat, above edited line 780), andweb/src/pages/AdminDevices.tsx:1345(DeviceRowanomaly dot).- Trigger: Open the Devices page with
data-high-contrast="true"and at least one anomalous device (and select it in the list). - Impact / evidence:
html[data-high-contrast="true"](web/src/app.css:803-822) lightens--surface(#1c1c20->#333336) and--surface-hover(#232328->#46464a) without lightening--destructive(#ef4444, calibrated inapp.css:655-657only against--backgroundand--card). In high contrast:ReadoutCell("Anomaly", 14px) on.surface-panel(#303033) drops from 4.55:1 to 3.51:1 (fails WCAG 2.1 AA 4.5:1).Statanomaly count (12px) on.surface-panel-subtle(#2a2a2e) drops from 4.62:1 to 3.80:1 (fails AA 4.5:1).DeviceRowanomaly dot (bg-destructive/90, the row's only visual anomaly marker) drops to 2.72:1 on hover (bg-surface-hover/40,#39393c) and 2.47:1 when selected (bg-surface-hover/70,#3f3f43) (fails WCAG 1.4.11 3:1).
- Suggested repair: Either lighten
--destructiveinhtml[data-high-contrast="true"]via a--destructive-basealias (keeping--destructive-labelreferenced to--destructive-base; solid buttons/badges already use--destructive-fill), which fixes all three without stretching--destructive-labelpast its 10%-tint contract (app.css:566); or, if keeping the fix insideAdminDevices.tsx, switch lines 775 and 1926 totext-destructive-label(6.21:1 / 8.31:1 and 6.12:1 / 7.69:1) and widen the comment inapp.css:566.
G2 (medium) — Two remaining dimmed text-muted-foreground/* labels in AdminDevices.tsx fail WCAG AA
web/src/pages/AdminDevices.tsx:1393(OverrideGauge,count === 0) andweb/src/pages/AdminDevices.tsx:492(list.countOfTotalmuted" of N"span).- Trigger: Default "All devices" view with any unselected 0-override device (line 1393); any active filter narrowing the list (line 492).
- Impact / evidence:
- Line 1393 (
text-muted-foreground/50, 11px"0"): 2.73:1 on.surface-panel(2.70:1 hovered) in normal mode and 3.87:1 (3.59:1 hovered) in high contrast — fails WCAG 2.1 AA 4.5:1 in both modes. - Line 492 (
text-muted-foreground/60, 10.5px" of N"): 3.35:1 on.surface-panelin normal mode — fails AA 4.5:1 (and is unmounted when the list is unfiltered). - Uncertainty: Neither line is among the three sibling PR #4826 targets (group totals, rail counts, last-seen dates), though I did not inspect PR #4826's diff directly to confirm whether it touches them. Note also
AdminDevices.tsx:1357(recency === "<24h" && "text-success/80"), which drops to 4.13:1 hovered and 3.78:1 active in high contrast on the same last-seen<span>as line 1358.
- Line 1393 (
- Suggested repair: Raise line 1393 to
text-muted-foreground(or/80to keep hierarchy below/85: 4.92:1 normal / 7.37:1 high contrast on panel; 4.79:1 / 6.57:1 hovered) and line 492 totext-muted-foreground(or/80).
G3 (low) — Identical text-destructive on bg-destructive/10 anomaly badges remain in DeviceProfileTabs
web/src/components/admin/deviceOverrides.tsx:369,web/src/components/admin/deviceOverrides.tsx:753, andweb/src/components/admin/deviceOverrides.tsx:407.- Trigger: Select a device with suspect, conflicting, or stale overrides in
DeviceDetailPanel(AdminDevices.tsx:1857isDeviceProfileTabs's only caller). - Impact / evidence: Both badges (lines 369 and 753) use the same
text-destructive bg-destructive/10pairing fixed in this PR: 4.13:1 normal and 3.21:1 high contrast on.surface-panel(slightly lower on line 753 where the 8% profile accent wash lightens the bar). The inline anomaly reason at line 407 (text-destructive/85) is 3.60:1 normal and 2.88:1 high contrast. - Suggested repair: Switch lines 369 and 753 to
text-destructive-label(and drop/85on line 407, or update alongside--destructivein G1), either here or in a follow-up PR fordeviceOverrides.tsx.
AI-assisted review using Gemini 4 Neon via Antigravity in T3 Code.
|
Answers to the Gemini review (G1–G3). All three describe problems already on
|
On a short screen the list's height cap left it shorter than its sticky group header, so a row reached with Tab stayed out of sight behind the header's scroll padding. Keep the list at least 10rem tall and let the page scroll instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Adversarial review round 2 (gpt-6.2-sol, reviewed 3416343). The reviewer couldn't post its own review, so its findings are recorded here. Score: 8/10. It marks O1 and S1 resolved. The other round-1 items are unchanged and already answered above.
AI disclosure: summary written by claude-opus-5-5 (Claude Code) from the automated review's output. |
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (Gemini 4 Neon, reviewed 3416343)
Round 2 check against web/src/pages/AdminDevices.tsx and web/src/app.css:
- O1 (
bg-surface, nobackdrop-blur) is resolved and matches the sticky group header precedent inweb/src/components/settings/DeviceList.tsx. - S1 (
scroll-pt-10on the list container) resolves the Shift+Tab row overlap, and the2.5rem(40px) offset clears the 36–37.1px header across default, large, and x-large text scales, strong text weight, narrow widths (truncate+shrink-0prevent wrapping), and larger browser font sizes. - One new low-severity finding (
G4) is posted inline onweb/src/pages/AdminDevices.tsx:510: puttingscroll-pt-10on the scroll container causes Chromium to jump the list upward when keyboard focus lands on a sticky group header's own<button>or<Link>, because both sit inside the top 40px exclusion band. Moving the offset toscroll-mt-10onDeviceRow's<Link>avoids that jump while keeping the same clearance on Shift+Tab.
AI-assisted review by Gemini 4 Neon via Antigravity in T3 Code.
Scroll padding on the list made Chromium scroll the list when Tab reached a stuck group header's own controls, because the header sits inside the padded area. A scroll margin on each device row keeps the focused row clear of the header without moving the header's controls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Adversarial review round 3 (gpt-6.2-sol, reviewed a8958e7). The reviewer couldn't post its own review, so its findings are recorded here. Score: 8/10. It marks O1, S3 and G4 resolved. The other round-1 items are unchanged and already answered above.
AI disclosure: summary written by claude-opus-5-5 (Claude Code) from the automated review's output. |
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (the admin Devices page exists only in the web app)
On the admin Devices page, several small labels and markers are hard to read on the Cinema Dark panels and fall below WCAG AA. This affects every admin who uses the page, especially people with low vision or a dim screen.
Approach
Each fix uses a token the app already has for that job:
text-muted-foreground, as the other admin pages' fixes did. They still read as secondary next to their values, through size, capitals and letter spacing. With high contrast on, they now get the boosted muted colour, which the/70class never matched.border-input, which app.css defines as the form-control edge. The checked look is unchanged. With high contrast on, the checked box now keeps its own white edge, where an override used to force it grey.text-destructive-label, the status-label red app.css defines for small text on a 10% tint of its own colour. The activity page's red tags already use it.bg-surfacewithout the blur, like the settings device list's sticky group header. At rest its colour moves by one RGB step. Each device row gets a scroll margin (scroll-mt-24belowlg, the admin layout's rule for clearing its mobile header;lg:scroll-mt-10on desktop) and scrolls itself to the nearest clear position on focus, so moving keyboard focus through the list doesn't leave the focused row's name behind either header. Firefox needs the explicit scroll because it doesn't move a partly visible link on focus. The list keeps at least 10rem of height, so a short screen scrolls the page instead of shrinking the list below the header.The group totals, rail counts and other dimmed counts on this page are left to #4826, which changes those lines. The two PRs merge cleanly in either order.
Validation
Measured live in headless Chromium against a page harness that renders the real Devices page with seeded data, in Cinema Dark with high contrast off and on. Each colour was composited over every background behind it, and the sticky header was sampled from screen pixels with rows scrolled under it. Every changed element failed on
mainand passes on this branch:Web gate:
pnpm run lint,format:check,build,budget:checkandmake test-weball pass. No Go files change.1.0 validation: the only passed case that uses this page is Device & override auditing — Web admin #1221 C1 (device and override auditing). Only colours change, so it isn't affected.
Evidence: https://evidence.siloserver.org/r/silo-server/admin-devices-muted-label-contrast/
Risks
None identified. Only CSS classes change.
Checklist
Council review
Background review: round 1 on d738a32, round 2 on 3416343, round 3 on a8958e7
Visual review: 2 rounds, final captures from this change's code
Fixed: the sticky header is now opaque instead of 95% with a blur (Opus O1, 21551e3), a scroll margin on each row keeps a focused row clear of it (Sol S1 in 3416343, moved from the list to the rows for Gemini G4 in a8958e7 so focusing the header's own controls doesn't scroll the list), the list keeps a minimum height so that row stays visible on short screens (Sol S3, 9d019f9), and the row clears the phone admin header and scrolls itself clear in Firefox (Sol S4 and S1 in Firefox; this PR merged at a8958e7 before that commit, so it's in #4889). The visual reviews found no problem in the changed elements. Follow-ups: #4850 (override rows in the device detail view), #4852 (red text in high contrast, also the anomaly count and Status value here), #4864 (Group-by selected state), #4900 (layout at phone width), #4889 (keyboard focus scroll in Firefox, which landed after this PR merged); #4831 covers the green last-seen date. Answered: plain red status text and the anomaly dot in high contrast (Sol S2, Gemini G1) are app-wide and goes to a follow-up; the dimmed counts, group totals and the override gauge's zero count and the filtered total (Opus O2, Gemini G2) belong to #4826; the red tags in the override rows (Gemini G3) go to a follow-up; the white edge on a checked box in high contrast is intended; the brighter labels and paler red in high contrast are how those tokens are meant to look. Older problems the reviews noticed on this page are tracked as follow-ups.
AI Disclosure
🤖 Generated with Claude Code