Repository navigation
fix(web): keep red admin status badges readable on their tint - #4888
Conversation
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>
|
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 43 seconds. 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 (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.
* 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).
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>-labeltokens 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
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
Council review
Ran as a follow-up of #4859's review: one member per round.
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
🤖 Generated with Claude Code