Repository navigation
feat(app): add System / Light / Dark appearance setting on mobile - #19378
Merged
Merged
Conversation
# Conflicts: # app/lib/l10n/app_ar.arb # app/lib/l10n/app_be.arb # app/lib/l10n/app_bg.arb # app/lib/l10n/app_bn.arb # app/lib/l10n/app_bs.arb # app/lib/l10n/app_ca.arb # app/lib/l10n/app_cs.arb # app/lib/l10n/app_da.arb # app/lib/l10n/app_de.arb # app/lib/l10n/app_el.arb # app/lib/l10n/app_en.arb # app/lib/l10n/app_es.arb # app/lib/l10n/app_et.arb # app/lib/l10n/app_fa.arb # app/lib/l10n/app_fi.arb # app/lib/l10n/app_fr.arb # app/lib/l10n/app_he.arb # app/lib/l10n/app_hi.arb # app/lib/l10n/app_hr.arb # app/lib/l10n/app_hu.arb # app/lib/l10n/app_id.arb # app/lib/l10n/app_it.arb # app/lib/l10n/app_ja.arb # app/lib/l10n/app_kn.arb # app/lib/l10n/app_ko.arb # app/lib/l10n/app_localizations.dart # app/lib/l10n/app_localizations_ar.dart # app/lib/l10n/app_localizations_be.dart # app/lib/l10n/app_localizations_bg.dart # app/lib/l10n/app_localizations_bn.dart # app/lib/l10n/app_localizations_bs.dart # app/lib/l10n/app_localizations_ca.dart # app/lib/l10n/app_localizations_cs.dart # app/lib/l10n/app_localizations_da.dart # app/lib/l10n/app_localizations_de.dart # app/lib/l10n/app_localizations_el.dart # app/lib/l10n/app_localizations_en.dart # app/lib/l10n/app_localizations_es.dart # app/lib/l10n/app_localizations_et.dart # app/lib/l10n/app_localizations_fa.dart # app/lib/l10n/app_localizations_fi.dart # app/lib/l10n/app_localizations_fr.dart # app/lib/l10n/app_localizations_he.dart # app/lib/l10n/app_localizations_hi.dart # app/lib/l10n/app_localizations_hr.dart # app/lib/l10n/app_localizations_hu.dart # app/lib/l10n/app_localizations_id.dart # app/lib/l10n/app_localizations_it.dart # app/lib/l10n/app_localizations_ja.dart # app/lib/l10n/app_localizations_kn.dart # app/lib/l10n/app_localizations_ko.dart # app/lib/l10n/app_localizations_lt.dart # app/lib/l10n/app_localizations_lv.dart # app/lib/l10n/app_localizations_mk.dart # app/lib/l10n/app_localizations_mr.dart # app/lib/l10n/app_localizations_ms.dart # app/lib/l10n/app_localizations_nl.dart # app/lib/l10n/app_localizations_no.dart # app/lib/l10n/app_localizations_pl.dart # app/lib/l10n/app_localizations_pt.dart # app/lib/l10n/app_localizations_ro.dart # app/lib/l10n/app_localizations_ru.dart # app/lib/l10n/app_localizations_sk.dart # app/lib/l10n/app_localizations_sl.dart # app/lib/l10n/app_localizations_sr.dart # app/lib/l10n/app_localizations_sv.dart # app/lib/l10n/app_localizations_ta.dart # app/lib/l10n/app_localizations_te.dart # app/lib/l10n/app_localizations_th.dart # app/lib/l10n/app_localizations_tl.dart # app/lib/l10n/app_localizations_tr.dart # app/lib/l10n/app_localizations_uk.dart # app/lib/l10n/app_localizations_ur.dart # app/lib/l10n/app_localizations_vi.dart # app/lib/l10n/app_localizations_zh.dart # app/lib/l10n/app_lt.arb # app/lib/l10n/app_lv.arb # app/lib/l10n/app_mk.arb # app/lib/l10n/app_mr.arb # app/lib/l10n/app_ms.arb # app/lib/l10n/app_nl.arb # app/lib/l10n/app_no.arb # app/lib/l10n/app_pl.arb # app/lib/l10n/app_pt.arb # app/lib/l10n/app_ro.arb # app/lib/l10n/app_ru.arb # app/lib/l10n/app_sk.arb # app/lib/l10n/app_sl.arb # app/lib/l10n/app_sr.arb # app/lib/l10n/app_sv.arb # app/lib/l10n/app_ta.arb # app/lib/l10n/app_te.arb # app/lib/l10n/app_th.arb # app/lib/l10n/app_tl.arb # app/lib/l10n/app_tr.arb # app/lib/l10n/app_uk.arb # app/lib/l10n/app_ur.arb # app/lib/l10n/app_vi.arb # app/lib/l10n/app_zh.arb # app/lib/pages/settings/usage_page.dart
Failure-Class: none
Failure-Class: none
Failure-Class: none
Replace the two hardcoded light-mode bubble colours with surface2 and a pale alpha-blend of the speaker colour, so the mobile UX contract's colour-literal ratchet stays flat. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 2, 2026
Git-on-my-level
added a commit
that referenced
this pull request
Oct 3, 2026
…mode (#20419) Offline Sync’s Manage Storage sheet mixed fixed dark card backgrounds with palette-dependent text, making category labels unreadable in light appearance and secondary labels too faint in dark appearance. Resolve card, badge, title and secondary text colors together for both themes. The extracted production `OfflineSyncStorageSheet` retains the page’s existing counts, confirmation dialogs and deletion handlers. Category Clear actions use `OmiButton.secondary` for readable primary text and a 48pt tap target. Titles truncate beside the count; actions move below the details on narrow sheets or enlarged text. ## Screenshots Captured on the connected iPhone 16 and Android LAVA LZG411 using separate debug app identities. The isolated target renders the production storage sheet and existing Home empty-state widget, with zero counts or inert sample counts (2 synced / 3 pending). Before uses the original storage row; after runs the fix. The surrounding fixture is not the complete Offline Sync or Home page, and no auth, sync or recording operation is exercised. | Platform | Light before | Light after | Dark after | | --- | --- | --- | --- | | iOS · iPhone 16 | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-before.png" width="240" alt="iOS · iPhone 16 before"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-after.png" width="240" alt="iOS · iPhone 16 after"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-dark-after.png" width="240" alt="iOS · iPhone 16 dark-after"> | | Android · LAVA LZG411 | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-before.png" width="240" alt="Android · LAVA LZG411 before"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-after.png" width="240" alt="Android · LAVA LZG411 after"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-dark-after.png" width="240" alt="Android · LAVA LZG411 dark-after"> | Nonzero counts show the reviewed Clear actions: | Platform | Light after | Dark after | | --- | --- | --- | | iOS · iPhone 16 | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-actions-after.png" width="240" alt="iOS · iPhone 16 actions-after"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-actions-dark-after.png" width="240" alt="iOS · iPhone 16 actions-dark-after"> | | Android · LAVA LZG411 | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-actions-after.png" width="240" alt="Android · LAVA LZG411 actions-after"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-actions-dark-after.png" width="240" alt="Android · LAVA LZG411 actions-dark-after"> | The Home empty-state defect already has a merged fix in #20047. Its existing production widget was checked in both themes; this PR does not change Home behavior. ## Validation - Seven focused widget tests passed: category/title/subtitle/count contrast in both themes, zero-count eligibility, nonzero callbacks, and a 320px French sheet at 2× text scaling with contrast, minimum target size and reachability checks. The original row fails the contrast guard (light title 1.47:1, dark subtitle 3.10:1). - Physical iOS and Android debug captures visually verified in both themes. Native iOS button bounds confirm 48pt category targets. Only the isolated development apps were installed, then removed; production apps and data were retained and reopened. - The local iOS fixture artifact omitted the unused unsigned Watch payload after the native app compiled; no native project or signing configuration change is included in this PR. - Pinned Flutter 3.44.5 / Dart 3.12.2 analyzer ratchet passed with no baseline changes. - Full `TZ=UTC bash app/test.sh --concurrency=4 --reporter expanded`: **3,929 tests passed**, exit code 0, plus the 138-test protected spine. - `make preflight`: all 24 selected checks passed. Draft-body preflight: 23 checks passed. Bounded pre-push gate passed; `df970edef3` is pushed. - All three review findings were fixed, replied to and resolved. ## Failure class Failure-Class: new FC-offline-storage-mixed-palette records the mixed palette/card-background failure introduced by #19378 and the executable production-sheet contrast guard. ## Product invariants affected none
kodjima33
added a commit
that referenced
this pull request
Oct 8, 2026
…y the setup rating question (#20985) ## Summary - Device (pendant) tutorial: the shared step scaffold, progress dots, Continue button and the transcription / ask-a-question / power-cycle / double-press steps hard-coded white or black from the old dark-only design. On the default light palette (#19378) the last steps showed white text and white cards on a white gradient. All of it now resolves from `OmiColors` (works in light and dark). - Onboarding setup rating alert copy: "Are you enjoying Omi?" with **Yes** / **No** in all 49 locales (`scripts/l10n.py set`); the separate "Rating us 5 stars…" line is removed (`scripts/l10n.py remove`). ## Verification - `flutter test test/widgets/device_onboarding_step_contrast_test.dart test/widgets/onboarding_setup_page_test.dart test/widgets/onboarding_intro_skip_test.dart test/widgets/device_onboarding_voice_reply_step_test.dart` → 17 passed. The new contrast test fails on the old scaffold in both palettes. - `flutter analyze` on changed files: no issues. `python3 scripts/l10n.py check`: ok, 49 locales. - iOS simulator (iPhone 16 Pro, light + dark): built the dev flavor with a local-only (uncommitted) harness that opens the tutorial and steps through all six screens, then the setup page with the rating alert; screenshots below. ## Screenshots         ## Product invariants affected none ## Failure class Failure-Class: new
sauranshbhardwaj
pushed a commit
to sauranshbhardwaj/omi
that referenced
this pull request
Oct 8, 2026
…y the setup rating question The pendant tutorial's shared step scaffold, progress dots, Continue button and the transcription, ask-a-question, power-cycle and double-press steps hard-coded white or black from the dark-only design. Since the app defaults to the light palette (BasedHardware#19378), step titles and cards rendered white on the white surface gradient. They now resolve from OmiColors (textPrimary/textSecondary/surface1/accent/onAccent), so both appearances work. The onboarding setup rating alert now asks "Are you enjoying Omi?" with Yes / No (all 49 locales via scripts/l10n.py; the separate 5-star body line is removed). Verification: flutter test device_onboarding_step_contrast_test (fails on the old scaffold in both palettes, passes now), onboarding_setup_page_test, onboarding_intro_skip_test, device_onboarding_voice_reply_step_test: 17 passed; flutter analyze on changed files clean; scripts/l10n.py check ok (49 locales). Failure-Class: new
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.
Summary
Adds an Appearance setting to mobile (Settings → Notifications & Display) with System / Light / Dark, defaulting to System (follows the OS). The choice persists and applies live.
OmiColors(about 1.8k references across 233 files) now resolves each token from an activeOmiPalette(dark or light). The app root swaps the palette when the resolved brightness changes and rebuilds the tree, so existing token users flip without per-file edits.constexpressions that embedded tokens were un-consted.test/unit/appearance_test.dartasserts that every dark token equals its original value.#F2F2F7page, white cards). The accent stays neutral per INV-UI-1: black with white on-accent text.buildOmiThemebuilds both light and darkThemeData. The status bar style follows brightness, and the forced-dark Cupertino overrides (text selection, notification picker, action-item form sheet) are now brightness-aware.AppearanceProviderplus aSharedPreferencesUtilkey. The Settings row is localized in all 49 locales.Light-mode audit (follow-up commits)
The visual-audit harness can now render light mode (
OMI_AUDIT_BRIGHTNESS=light). All 73 production scenarios were rendered in both modes and every light frame was reviewed. Fixed:surface2/surface3darkened).A dark-palette identity test still guards against any dark-mode change.
Known limitations (deferred)
Wrapped 2025, sync diagnostics, third-party WebViews, and native splash/launch screens keep fixed dark styling. Nothing has been verified on a physical device yet.
Product invariants affected
brand-ui.mdandmobile-ux-contract.mdwording is updated; no check is weakened.app/lib/main.dartchanges only theme wiring. API and identity routing are unchanged.Failure-Class: none
Verification
flutter test --no-pub test/unit/appearance_test.dart: 8/8 pass, including the dark palette identity test.app/scripts/analyze_ratchet.sh: passes.python3 app/scripts/l10n.py check: 49 locales OK.make preflight, pass locally.🤖 Generated with Claude Code