Skip to content

fix(web): keep red admin status badges readable on their tint - #4888

Merged
Quick104 merged 1 commit into
mainfrom
fix/admin-red-status-badge-contrast
Nov 21, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/admin-red-status-badge-contrast

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none
Other clients: N/A (web admin only; the other clients have no admin screens)

Several web admin status badges draw red text on a 10% red tint: a failed device copy on Downloads, a denied policy simulation, autoscan poll and scan errors, a failed arr connection test, and a failed diagnostics report. On an admin card that red label measures 4.2:1 with high contrast off and 3.2:1 with it on, below the 4.5:1 small text needs. #4859 fixed the same pair on route chips and the Watch Providers error count; these screens still use the plain colour.

Approach

Draw these labels with the --<status>-label tokens from #4768, as the play-method tags and #4859's badges do. The success and warning badges on the same screens (storage Online, connection test succeeded, device copy Revoked) switch too, so each screen uses one pattern. Their default-mode colour doesn't change. With high contrast on, they get the lighter label colour.

The badges on the Devices page and in device overrides are left to #4845 and #4850. The token values are untouched, so this composes with #4852 and #4851.

Validation

  • Live check on a dev sandbox, base build and fixed build: each badge rendered with its component's classes on its real page surface, high contrast off and on, and measured against its tint. Red went from 3.24–4.30:1 to 5.64–5.79:1 (default) and 7.09–9.41:1 (high contrast). Success and warning are unchanged in default mode and lighter with high contrast on (7.24–10.11:1). The sandbox has no data in these failure states, so the badges were built from the component markup rather than reached through the UI.
  • Focused web tests for the touched admin pages, eslint, prettier and the TypeScript build pass.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/red-status-badges/

Risks

None identified. Class changes only.

Follow-ups: #4892 covers the larger red message boxes on the same tint (sign-in errors, policy and request rule errors, the autoscan error detail), which use the same class pair at 14 px and are not changed here. #4894 covers the Autoscan Success and Unresolved badges, which use Tailwind palette colours rather than status tokens.

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 #4859's review: one member per round.

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

Rounds: 1, last reviewed adfa991

Answered: S1 (Autoscan Success and Unresolved badges on hovered rows with high contrast on) is in lines this PR doesn't change and fails the same way on main, so it is tracked in #4894.

Visual review: Sol (gpt-6.2-sol, high), better, 9/10. One nit about capture noise between the before and after builds, recorded in the evidence notes.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, Codex CLI (review), silo skill, capture-web (Playwright)
  • Model(s): claude-opus-5-5 (implementation), gpt-6.2-sol (visual and adversarial review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: plan round skipped as a mechanical class swap; code review single-pass at medium on the full diff, no findings; simplify pass made no changes. See Council review.

🤖 Generated with Claude Code

Device copy, policy simulation, autoscan, connection test and diagnostics
badges drew red text on a 10% red tint, which measured 4.2:1 on an admin
card and 3.2:1 with high contrast on. Draw them, and the matching success
and warning badges on those screens, with the --<status>-label tokens, which
keep each label at 5.6:1 or more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 43 seconds.

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: f27628ee-889d-4b49-ad7a-d32a2857712d
Commits

Reviewing files that changed from the base of the PR and between ce96773 and adfa991.

Files selected for processing: 6

  • web/src/pages/AdminDiagnostics.tsx
  • web/src/pages/admin-downloads/StorageTab.tsx
  • web/src/pages/admin-downloads/downloadStoragePresentation.ts
  • web/src/pages/admin-policy/PolicySimulatePanel.tsx
  • web/src/pages/admin/autoscan/InlineConnectionPicker.tsx
  • web/src/pages/admin/autoscan/pollEventDisplay.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 21, 2026
@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:42:55.204325Z adfa991 PR opened
🔒 Security Review ✅ Completed 2026-11-21T04:44:53.326347Z adfa991 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.

@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 adfa991)

S1 · Low · web/src/pages/admin/autoscan/pollEventDisplay.ts:77 and :89

With high contrast enabled, hover a successful or unresolved row in the desktop Autoscan poll log. The row uses bg-surface-hover (ActivityPanel.tsx:606), which high contrast mixes with 16% white. The badges still use text-emerald-500 and text-amber-500 on tints of those colors. Calculated contrast is about 3.4:1 and 3.8:1 respectively, below the 4.5:1 minimum for the badge text. Use text-success-label with bg-success/10 and text-warning-label with bg-warning/10 for those states.

AI disclosure: gpt-6.2-sol, Codex in T3 Code.

@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 merged commit 5d52158 into main Nov 21, 2026
20 checks passed
@Quick104
Quick104 deleted the fix/admin-red-status-badge-contrast branch November 21, 2026 05:11
Quick104 pushed a commit that referenced this pull request Nov 30, 2026
* fix(web): keep red error messages readable on their red tint

Error boxes drew text-destructive on a 10% destructive tint. With high
contrast off that measured 4.10:1 on the card surface (the sign-in error
box) and 4.50:1 on the page background, below or at the 4.5:1 floor for
normal-size text. Use text-destructive-label, as the status badges do
since #4888: 5.52:1 on the card and 6.05:1 on the page. High contrast is
unchanged, since the label is the boosted red there.

Covers the sign-in and account sign-in errors, the policy editor,
simulation and vendor viewer errors, the request server and rule form
errors, the compatibility proxy error, the autoscan poll event error
detail and the autoscan webhook failure title.

Closes #4892

* fix(web): keep the autoscan connection test error readable

The failed result in Admin > Settings > Autoscan > Add connection drew
text-destructive on its red tint: 4.50:1 rounded, 4.497:1 measured.
Use text-destructive-label like the other red message boxes (6.05:1).
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