Skip to content

✨ (expo) Add a persistent System theme option - #1458

Merged
aaronleopold merged 3 commits into
stumpapp:nightlyfrom
devy1540:feat/mobile-system-theme
Oct 5, 2026
Merged

aaronleopold merged 3 commits into
stumpapp:nightlyfrom
devy1540:feat/mobile-system-theme

Conversation

@devy1540

@devy1540 devy1540 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1455

Description

Adds a System option to the mobile app's theme settings. The app follows the device's light or dark appearance while the picker continues to show System as the selected preference.

  • Persist Light, Dark, or System in the existing MMKV-backed preferences store and restore the selection in its own guarded layout effect, keeping locale and splash initialization limited to startup.
  • Delegate appearance changes to the existing NativeWind API, keeping the effective color scheme as Light or Dark for existing consumers.
  • Preserve explicit EPUB reader themes while allowing the default reader theme to follow the app's appearance. Update Android navigation-bar styling from the same background state used by SystemBars.
  • Add English and Korean labels for the new option.
  • Add 11 focused hook tests using small mocks in the existing Node test environment, without adding a jsdom dependency to Expo.

Verification

  • Expo test suite: 65 tests passed, including the 11 focused theme-hook tests.
  • ESLint and Prettier checks passed for the changed TypeScript files and package manifest.
  • Production Hermes bundle exports succeeded for both iOS and Android.
  • Full Expo type checking reports the same 15 errors as the unchanged nightly base (7752c39); this change adds no diagnostics.
  • The theme tests mock NativeWind and the preference-store hooks. Native device or simulator UI verification is still pending.

AI assistance

Codex assisted with the implementation and review. The verification checks listed above were run locally.

Ready?

  • I read the contributing guidelines.
  • I searched for related issues and pull requests.
  • This PR targets nightly.
  • I added tests for the changed behavior.

Stump Contributor License Agreement

These contributions are licensed under GPL-3.0 for the Expo application and MIT for the shared translation files, in accordance with the repository's contributing terms.

Comment thread apps/expo/app/_layout.tsx Outdated
Comment thread apps/expo/lib/__tests__/useColorScheme.test.tsx Outdated
Comment thread apps/expo/package.json Outdated
@aaronleopold aaronleopold changed the title feat(expo): add a persistent System theme option ✨ (expo) Add a persistent System theme option Oct 3, 2026
devy1540 and others added 2 commits October 5, 2026 10:23
Restore the saved theme in its own guarded layout effect and keep locale
and splash initialization limited to startup. Update Android navigation
bar styling from the same background state used by SystemBars.

Replace DOM-based theme tests with focused hook tests and remove Expo's
direct jsdom dependency.

@aaronleopold aaronleopold left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@aaronleopold
aaronleopold enabled auto-merge (squash) October 5, 2026 14:11
@aaronleopold
aaronleopold merged commit 6dbd3b2 into stumpapp:nightly Oct 5, 2026
7 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