Repository navigation
fix(ui): restore dark-mode contrast in settings and contact verification (#340) - #342
Open
RedFox-ious wants to merge 2 commits into
Open
RedFox-ious wants to merge 2 commits into
RedFox-ious wants to merge 2 commits into
Conversation
The AFT tier cards in Settings -> Anti-Flood carried an inline `background: #fff`, which beats the stylesheet, so in dark mode the text followed the theme (near-white) while the card stayed white (1.1:1 contrast). Same pattern elsewhere inside .fm-app: - settings.rs: AFT usage cards, AFT tier picker and the identity switcher popover now use var(--bg-card) instead of #fff. - login.rs: import-contact "unverified" warning uses the new --danger-ink token (was #991b1b on the dark card, 2.1:1). - settings.css: contact "unknown" trust badge uses --caution; the verify-box tick uses the new --on-trust token (white on the dark theme's brighter green was 2.3:1). - tokens.css: add --danger-ink and --on-trust; light values equal the previous hard-coded colors, so light mode is unchanged. All changed pairs now meet WCAG AA in dark mode (>= 4.7:1 for text). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The switcher popover got var(--bg-card) in the previous commit, but each inactive row still set its own inline `background: #fff` (built via a `bg` variable, so the earlier search missed it). In dark / system-dark mode that left identity names at 1.23:1 and fingerprints at 2.56:1. Rows now use var(--bg-card): 14.07:1 and 6.76:1 in dark, unchanged in light mode. Add no_hardcoded_white_backgrounds_340, which scans the non-test part of settings.rs for #fff/#ffffff literals so a hard-coded white surface can't come back on any Settings screen (all render inside the themed .fm-app). Verified it fails on the old code, pointing at line 144. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RedFox-ious
marked this pull request as draft
October 13, 2026 10:55
RedFox-ious
marked this pull request as ready for review
October 13, 2026 11:47
Author
|
All seven steps of the build job passed locally, so it should pass in CI. It does produce three compiler warnings, but none of them fails the job.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
AFT cards and inactive identity-switcher rows retained white backgrounds while their text followed the dark theme. Contact-import warnings, unverified-contact badges, and verification ticks also used fixed colors with poor dark-mode contrast.
Closes #340.
Fix
--bg-cardfor AFT cards and identity-switcher surfaces.--danger-inkand--on-trusttokens for import warnings and verification ticks.--cautionfor unverified-contact badges.Explicit dark mode and system-dark mode receive matching overrides. Light-theme colors preserve the previous palette.
Verification
On the latest commit,
e5c3087:Broader validation on
42f633f, before the final switcher follow-up:The full end-to-end suite and release builds were not rerun after the final follow-up. Skipped browser tests require a deployment or live Freenet nodes. The new unit test scans source text; rendered contrast was checked separately.
Security review found no newly introduced vulnerabilities or defects.
[AI-assisted — Codex]