mirror of
https://github.com/block/buzz.git
synced 2026-11-27 19:52:31 +00:00
## Summary Light/Dark/System was saved in the synced per-community theme preference. A mode picked on one device, or carried over from an old setting, followed the account to every other device. A user could end up on Light without ever choosing it on that phone. Brightness depends on the device (its OS setting, time of day), so mobile now keeps the mode on the device: - New `appearanceModeProvider` saves the mode in SharedPreferences under `buzz-appearance-mode.v1`. It defaults to System. - `App` reads the mode from that provider. The age-restricted path still uses System. - The Appearance picker starts from the device mode. **Set** saves the mode locally and syncs only the chat color. The synced `theme` and `followSystem` are written back unchanged, so the wire format stays the same and other clients are unaffected. The Buzz 1.0 desktop app (block/buzz-app) already keeps the mode per device (`appearance.mode`, default System), so this brings mobile in line. The deprecated 0.X desktop app is unchanged. **Accepted tradeoff:** after updating, every mobile user starts on System, including people who picked Light or Dark on purpose. They need to pick it again once. This one-time reset is what fixes accounts stuck on a carried-over Light setting. Seeding from the synced value would keep them stuck. ### Related issue None found. Came from an internal discussion about mobile defaulting to Light. ### Testing - `dart format`, `flutter analyze`, and the full `flutter test` suite pass. - New `test/shared/theme/appearance_mode_provider_test.dart`: covers the System default even when the old synced or legacy settings are pinned, reading and saving the mode, and unknown values. - Picker tests: the mode is saved locally, the synced `theme` and `followSystem` are kept, and Close discards changes. - Not yet exercised on a device. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Arthur Garza <arthur.garzajr@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>