Skip to content

fix(android): use light-only theme for Auth/Sync/Onboarding screens - #309

Merged
ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:fix/settings-light-theme-dark-text
Oct 10, 2026
Merged

ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:fix/settings-light-theme-dark-text

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Problem

Follow-up to #301 / #300.

After #301 switched AppTheme to Theme.AppCompat.DayNight.NoActionBar, the
native settings screens (API Authentication, Sync Settings) and the onboarding
flow started showing white text on a white background in dark mode.

Root cause: applySafeWindowInsets() explicitly locks the Activity root
background to chrome_light = #FFFFFF for these screens (native light chrome is
intentional). But these Activities were still inheriting AppTheme (DayNight).
In night mode the DayNight parent theme resolves attributes such as
?android:attr/textColorSecondary and ?android:attr/textAppearanceListItem to
white — producing invisible white text on the unchanged white background.

Reported by @akirad3d4 in #300 (2026-09-26).

Fix

Add AppTheme.LightOnly (Theme.AppCompat.Light.NoActionBar) and apply it to:

  • OnboardingActivity
  • AuthSettingsActivity
  • SyncSettingsActivity

MainActivity is unaffected — it calls applySystemBarAppearance() based on
the WebView's reported colour scheme and correctly follows the OS night mode.

applySafeWindowInsets() pins the Activity root to chrome_light (#FFFFFF),
but all three Activities inherited AppTheme (DayNight). In night mode,
DayNight resolves textColorSecondary, textAppearanceListItem, and similar
attributes to white — producing white text on a white background (ActivityWatch#300 P2).

Fix: introduce AppTheme.LightOnly (Theme.AppCompat.Light.NoActionBar) and
apply it to OnboardingActivity, AuthSettingsActivity, and SyncSettingsActivity.
MainActivity is unaffected — it overrides applySystemBarAppearance() via the
WebView theme callback and correctly follows the system night mode.

Git-Session-Id: 0e11e0e3-0698-5a4e-87a4-ca86f468f5c8
@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Changes theme styling for three native Android screens.

The PR appears safe to merge, with a non-blocking regression-test gap for night-mode text contrast.

Findings

  1. P2 Night-mode contrast lacks coverage ▶

Summary

The PR gives Onboarding, Auth Settings, and Sync Settings a fixed-light AppCompat theme to match their existing white native background.

  • MainActivity retains its DayNight theme.
  • The night-mode contrast fix would benefit from a targeted regression test.

Reviews (1) · Last reviewed commit: "fix(android): use light-only theme for A..."

Comment thread mobile/src/main/res/values/styles.xml
@TimeToBuildBob

TimeToBuildBob commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 AI code review

Adds a new AppTheme.LightOnly style based on Theme.AppCompat.Light.NoActionBar and applies it to OnboardingActivity, AuthSettingsActivity, and SyncSettingsActivity in AndroidManifest.xml, replacing the previous AppTheme.NoActionBar on Onboarding and the inherited AppTheme on the other two. No code changes outside themes are made.

Safe to merge — no P0/P1 findings

Confidence 5/5

✅ No thread-worthy findings. Advisory notes follow; they are retained without opening review threads.

1 advisory finding (summary-only, not scored)

These P2 guard, heuristic, trade-off, or documentation claims are retained for judgment without opening review threads.

⚠️ P2 medium — mobile/src/main/res/values/styles.xml

This is a fix(...) PR but no test files are included in the diff. Erik's feedback: 'where is the repro & fixes they are supposed to catch' (gptme#3441), 'that measurement should come with a regression test' (gptme#3446). Add a test that would have caught this bug. (Advisory: Erik merged all such PRs but consistently requested tests.)

Add a test file that reproduces the bug before the fix and passes after it.

How this was verified: static preflight: fix-commit + touched-files scan (rule 7)

Files changed (2) — the diff as I read it
  • mobile/src/main/AndroidManifest.xml — Changes OnboardingActivity's theme to AppTheme.LightOnly and adds AppTheme.LightOnly to AuthSettingsActivity and SyncSettingsActivity.
  • mobile/src/main/res/values/styles.xml — Adds the AppTheme.LightOnly style, a light-only theme based on Theme.AppCompat.Light.NoActionBar.
Previous review passes
commit score findings engine when
056dfb0cf996 5/5 0 llm 2026-09-26 20:01 UTC

Reviewed 056dfb0cf996 · openrouter/deepseek/deepseek-v4-flash-0731 · llm engine · 811s · about this reviewer

Maintainer commands

@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.

@ErikBjare
ErikBjare merged commit 96372f6 into ActivityWatch:master Oct 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants