Skip to content

fix(web): keep device override rows readable on the admin Devices page - #4850

Merged
Quick104 merged 1 commit into
mainfrom
fix/device-override-row-contrast
Nov 21, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/device-override-row-contrast

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #1221 C1
Other clients: N/A (web admin page; the native clients have no admin Devices page)

On the admin Devices page, the device detail view drew many small labels below the 4.5:1 contrast that small text needs, both in Cinema Dark and with high contrast on. The worst case was every setting the device inherits rather than overrides, which is most of the list. Those rows were drawn at 70% opacity, so their DEFAULT/PROFILE tag, "· app default" source and "change to add override" hint measured about 2.3:1 in Cinema Dark. The setting key measured 3.06:1 and the description 4.08:1. The profile summary bar's "30 inherited" count was a 60%-opacity grey at 3.18:1. The red text, meaning the "2 SUSPECT" badge, a row's STALE tag and the anomaly reason under it, measured between 2.9:1 and 4.2:1. That red got worse with high contrast on, because the tint behind it brightens while the red stays the same.

This change brings every one of these labels above 4.5:1 in both modes. They stay secondary to the setting name and value.

Approach

Inherited rows are no longer drawn at reduced opacity. Opacity dims a row's text and its background together, so a level light enough to keep the setting key above 4.5:1 would show almost no dimming. Inherited rows are still easy to tell apart: they carry the bordered DEFAULT/PROFILE tag, the italic "change to add override" hint and their value's source, and they have no override dot. Their controls, which the admin can still use, no longer look disabled.

For the rest, this follows the rule the page already uses. Muted labels use the full text-muted-foreground. Red text on a red tint uses text-destructive-label, the status-label red that app.css defines for small text, with its own high-contrast value. Grey labels inside an element that is already muted now take that element's colour, so their wrapper spans are gone. The setting key keeps text-muted-foreground/80, which passes once the row opacity is gone.

DeviceOverrideRow and DeviceProfileTabs render only on the admin Devices page. The other files that import this module, such as the admin Users preferences and activity tabs and the user's own device settings, use only its platform icon and label helpers, which this change doesn't touch.

Validation

  • Contrast was measured live in headless Chromium at 1440 px, on base c1e36dc4a2 and on this branch, in Cinema Dark and with high contrast on. The device was dormant, with a profile and two flagged overrides. Each label's colour was multiplied by its ancestors' opacity and composited over the dominant background pixel under it. That background includes the summary bar's accent gradient. Every label above fails on the base in at least one mode and passes in both on this branch. The lowest after the change are 4.89:1 (the setting key) in Cinema Dark and 6.46:1 (the SUSPECT badge) with high contrast on.
  • The page ran in a local Vite harness that renders the real AdminDevices component with seeded query data, because no sandbox could start on the build host. Only colours and opacity change, so layout at other widths and hover and focus states were not captured.
  • Typecheck passes. eslint reports no new problems and prettier passes. make lint-changed has no Go to check.
  • Device & override auditing — Web admin #1221 C1 (inspect and correct device overrides in the web admin) runs on these rows. Only the colour of secondary text and the inherited rows' dimming change there. The values, sources, Reset and anomaly flags work as before.

Evidence: https://evidence.siloserver.org/r/silo-server/device-override-row-contrast/

Risks

None identified. Only CSS classes change, including the removed row opacity, plus three wrapper spans that had no attributes after the change.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

Council review

Ran as a follow-up of #4845, with one member per round at high effort.

Background review: round 1 on 1bba28c

Member Round 1
Sol (gpt-6.2-sol, high) 8/10

Visual review: 2 rounds, final captures from 1bba28c

Member Round 1 Round 2
Sol (gpt-6.2-sol, high) better, 8/10 better, 8/10

Fixed: inherited rows' 70% opacity, which still pulled their labels and setting key under 4.5:1 (Sol S1, S2). Answered: the ANOMALY badge in the device header is changed by #4845 (S3). In high contrast, the muted source text is slightly brighter than the value beside it, which is how that token is designed, and the line still reads in order (S4). No profile-inherited row exists in the test data, and its PROFILE tag uses the same class as DEFAULT. The background review's two findings (the header anomaly badge and status value, and the readout labels and captions in AdminDevices.tsx) predate this change. #4845 fixes all of them except the status value, which is tracked in #4856.

AI Disclosure

  • Harness: Claude Code, run inside T3 Code
  • Tool(s): Claude Code; T3 Code delegated tasks for review (Codex); playwright-core with headless Chromium for contrast measurement and captures
  • Model(s): claude-opus-5-5 (implementation); review by gpt-6.2-sol and claude-sonnet-5-5
  • Involvement: Fully AI-generated; a maintainer reviews it before merge
  • Adversarial review: A medium-level code review ran three finders and a 1.0 validation check. It found no defects. Its one cleanup, replacing the classless wrapper spans with fragments, was applied. A simplify pass removed the classes that repeated their parent's colour. The class swaps to existing tokens needed no plan check. Sol's first visual review found that the inherited rows' opacity still failed contrast, and a plan check by one Opus member (claude-opus-5-5, medium effort) agreed with removing it and adding nothing in its place. For the visual and background reviews, see Council review above.

🤖 Generated with Claude Code

Note

Fix dimmed and hard-to-read text in device override rows on admin Devices page

Restyles the admin Devices page for readability in deviceOverrides.tsx. Non-overridden rows no longer get reduced opacity or hover-opacity changes. Text that used the muted/60 variant — non-set badges, hints, and default/inherited value suffixes — now uses full-strength muted text or inherits the surrounding color. Anomaly badges, reason text, and suspect-count badges switch from the destructive token to the destructive-label color token. Style-only change; no logic or data flow is affected.

Macroscope summarized 1bba28c.

The device detail's override rows and profile summary bar drew small text below 4.5:1.
Inherited rows were dimmed to 70% opacity, which pulled every label in them under the
bar (row tag, source, setting key, description, "change to add override"). Muted labels
at 60% opacity and red tags and the anomaly reason in plain or 85% destructive red failed
too.

Drop the row opacity (the tag, italic hint and missing override dot already mark an
inherited row), and use the full muted foreground and the destructive status-label red,
as the rest of the page does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 30 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6e099022-7a06-4ee8-88f4-8a21dd12de82
Commits

Reviewing files that changed from the base of the PR and between 675402d and 1bba28c.

Files selected for processing: 1

  • web/src/components/admin/deviceOverrides.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-kody

silo-kody Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T04:02:52.766036Z 1bba28c PR opened
🔒 Security Review ✅ Completed 2026-11-21T04:05:06.664976Z 1bba28c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-triage silo-triage Bot added bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 21, 2026

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review (gpt-6.2-sol, reviewed 1bba28c)

S1 · Low · Device anomaly status remains hard to read. Open a device flagged as stale or an override outlier. The detail header still uses text-destructive on the red tint (web/src/pages/AdminDevices.tsx:1741), and the Status readout uses the same text color on the panel (:1928). Compositing the committed colors in Chromium gives the badge about 4.15:1 in Cinema Dark and 3.20:1 in high contrast. The status value is about 3.50:1 in high contrast. An admin can still miss the device warning even when the override warnings below are readable. Use text-destructive-label for both device status labels.

S2 · Low · Device readout labels and captions still miss 4.5:1 in Cinema Dark. Open any device detail. The headings and captions use text-muted-foreground/70 (web/src/pages/AdminDevices.tsx:1919 and :1937). The committed colors composite to about 4.09:1 on the detail panel in Chromium. This makes details such as the last update date and the reason for an anomaly harder to read. Use text-muted-foreground for both lines.

@Quick104

Copy link
Copy Markdown
Contributor Author

On the adversarial review above: both findings are in web/src/pages/AdminDevices.tsx and predate this change, which doesn't touch that file.

@Quick104
Quick104 merged commit b1edb85 into main Nov 21, 2026
20 checks passed
@Quick104
Quick104 deleted the fix/device-override-row-contrast branch November 21, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant