Fix dark-mode reader readability + make API 37 E2E required #6

Merged
JMR-dev merged 3 commits from fix-dark-mode-colors into main 2026-06-30 23:35:08 +00:00
JMR-dev commented 2026-06-30 23:17:41 +00:00 (Migrated from github.com)

Dark-mode reader readability

In dark mode the reader rendered HTML emails as black-on-black: the WebView
background was TRANSPARENT (the near-black app surface showed through) and the
injected CSS defined no text/background color, so the WebView used its default
black text.

  • Wrap each email with explicit, theme-derived background/color/link colors
    (surface / onSurface / primary) and a matching color-scheme.
  • Set the WebView background to the surface color (no more transparent
    show-through).
  • Enable WebView algorithmic darkening where supported (androidx.webkit) as a
    backstop for emails that hardcode their own foreground colors.

Tests

  • HtmlBodyTest — pins the wrapper's readability contract (explicit colors that
    meet WCAG AA in both light and dark).
  • ColorSchemeContrastTest — audits the fallback Material light/dark schemes'
    role pairs for WCAG AA contrast.

CI

  • Make the API 37 preview E2E job required by adding it to the aggregating
    ci-passed gate's needs (the preview emulator has proven stable). No branch
    protection change needed — ci-passed is the single required check.

Verification

  • ./gradlew testDebugUnitTest assembleDebug — green.
  • Manually verified on the API 37 emulator in dark mode: reader text is
    light-on-dark and readable, links light blue, no black-on-black.

🤖 Generated with Claude Code

## Dark-mode reader readability In dark mode the reader rendered HTML emails as **black-on-black**: the WebView background was `TRANSPARENT` (the near-black app surface showed through) and the injected CSS defined no text/background color, so the WebView used its default black text. - Wrap each email with explicit, theme-derived `background`/`color`/link colors (`surface` / `onSurface` / `primary`) and a matching `color-scheme`. - Set the WebView background to the surface color (no more transparent show-through). - Enable WebView algorithmic darkening where supported (`androidx.webkit`) as a backstop for emails that hardcode their own foreground colors. ### Tests - `HtmlBodyTest` — pins the wrapper's readability contract (explicit colors that meet WCAG AA in both light and dark). - `ColorSchemeContrastTest` — audits the fallback Material light/dark schemes' role pairs for WCAG AA contrast. ## CI - Make the **API 37 preview E2E** job required by adding it to the aggregating `ci-passed` gate's `needs` (the preview emulator has proven stable). No branch protection change needed — `ci-passed` is the single required check. ## Verification - `./gradlew testDebugUnitTest assembleDebug` — green. - Manually verified on the API 37 emulator in dark mode: reader text is light-on-dark and readable, links light blue, no black-on-black. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.