Commit Graph

319 Commits

Author SHA1 Message Date
8c269e8c47 fix(legacy-settings): keep alarm list after save for consistency 2026-04-26 21:52:58 +02:00
a197d5bc28 refactor(legacy-settings): migrate alarm CRUD to AsyncNotifier 2026-04-26 21:52:58 +02:00
3f9c298b6f fix(legacy-settings): go back after timezone save for consistency 2026-04-26 21:52:58 +02:00
3b1534d3b3 refactor(legacy-settings): migrate alerts to AsyncNotifier 2026-04-26 21:52:57 +02:00
eb2bde8d40 refactor(legacy-settings): migrate remote_management to AsyncNotifier 2026-04-26 21:52:57 +02:00
c3dcc6febc feat(legacy-settings): DST-aware timezone with phone auto-detect 2026-04-26 21:52:57 +02:00
c4d328d92c chore(legacy-theme): remove reserved timeframe dead code 2026-04-26 21:52:57 +02:00
2eee3489cd refactor(legacy-settings): migrate battery to AsyncNotifier 2026-04-26 21:52:57 +02:00
3b57d0e70d refactor(legacy-settings): migrate timezone, sound, sync_clock to AsyncNotifier 2026-04-26 21:52:57 +02:00
fe9476d417 refactor(legacy-customer-service): move contact form state to provider (no setState) 2026-04-26 21:52:56 +02:00
79d0f72f08 refactor(legacy-account): move delete_account dialog state to provider (no setState) 2026-04-26 21:52:56 +02:00
5925a97b01 refactor(legacy-account): move personal_data form state to provider (no setState) 2026-04-26 21:52:56 +02:00
41b22ad457 refactor(legacy-account): move change_password local error to provider (no setState) 2026-04-26 21:52:56 +02:00
66a08c8016 refactor(legacy-settings): move language selection state to provider (no setState) 2026-04-26 21:52:56 +02:00
3449ff9afd refactor(legacy-settings): migrate language to AsyncNotifier 2026-04-26 21:52:56 +02:00
d4fbbb8d4b refactor(legacy-customer-service): migrate contact form to AsyncNotifier 2026-04-26 21:52:56 +02:00
3147566241 refactor(sf_shared): add help center URL to BrandLinks 2026-04-26 21:52:55 +02:00
f7e69b1184 refactor(sf_shared): move brand links to Firebase Remote Config 2026-04-26 21:52:55 +02:00
41324c61bd refactor(legacy-account): use .select for AsyncValue field reads 2026-04-26 21:52:55 +02:00
b8bf71fbe3 refactor(legacy-account): migrate account_settings to AsyncNotifier 2026-04-26 21:52:55 +02:00
6d49e604be refactor(legacy-account): migrate delete_account to AsyncNotifier + fix A1 2026-04-26 21:52:55 +02:00
21dcafec26 refactor(legacy-account): migrate linked_devices to AsyncNotifier 2026-04-26 21:52:55 +02:00
8e8243345a fix(sf_shared): distinguish 401 vs 403 error UX 2026-04-26 21:52:55 +02:00
fe38e477e3 refactor(legacy-account): migrate personal_data to AsyncNotifier 2026-04-26 21:52:54 +02:00
db47543252 fix(legacy-account): show success dialog after password change 2026-04-26 21:52:54 +02:00
caf77b1fd9 refactor(legacy-account): migrate change_password to AsyncNotifier 2026-04-26 21:52:54 +02:00
dcc786d376 refactor(legacy-account): migrate app_users to FutureProvider 2026-04-26 21:52:54 +02:00
8cd01c6f3b feat(sf_tracking): consent-aware crashlytics wrapper 2026-04-26 21:52:54 +02:00
1c98c0842d feat(sf_shared): add FailureType + handleFailure + feedback dialogs 2026-04-26 21:52:54 +02:00
59cced7b17 chore(legacy): add test infrastructure + mocktail 2026-04-26 21:52:54 +02:00
4e14534b1b fix 2026-04-26 21:52:54 +02:00
72d0c79c74 Revert "docs: add snackbar messages reference in Spanish"
This reverts commit 7ea415cb6e.
2026-04-26 21:52:53 +02:00
5b1826a10d docs: add snackbar messages reference in Spanish 2026-04-26 21:52:53 +02:00
039f2bb051 chore(i18n): add missing translation keys and device debug logging 2026-04-26 21:52:53 +02:00
9d6953dbf5 feat(wifi): enable wifi settings entry point and add debug logging 2026-04-26 21:52:53 +02:00
90048ac159 fix(sos-contacts): prevent deleting last emergency contact 2026-04-26 21:52:53 +02:00
982dee6c7a feat(block-phone): add edit contact functionality 2026-04-26 21:52:53 +02:00
09897b7f69 fix(location): add sharePositionOrigin for iPad share 2026-04-26 21:52:53 +02:00
09a625530e fix(control-panel): match dropdown value by device id to prevent crash 2026-04-26 21:52:53 +02:00
c60761adab fix(do-not-disturb): return empty schedule on 404 instead of error 2026-04-26 21:52:53 +02:00
6694a4b0ce fix(personal-data): send all required fields in PUT and autofill form 2026-04-26 21:52:53 +02:00
850796e1ca fix(rewards): send rewards key instead of amount in command data 2026-04-26 21:52:52 +02:00
051424f58b fix(volume): use capabilities max per slider and fix 0-10 scale 2026-04-26 21:52:52 +02:00
ac986ac360 feat(capabilities): add volume limits (media, ringtone, alarm) 2026-04-26 21:52:52 +02:00
cf86570e4c feat(settings): add falldown, falldownLevel and rename gps to location 2026-04-26 21:52:52 +02:00
e30f5dabcc fix(notifications): handle deep linking on cold start without crash 2026-04-26 21:52:52 +02:00
79039b99e2 refactor(legacy): align with Riverpod architecture (DTOs, repos, drop UseCases) 2026-04-26 21:52:52 +02:00
14720b66bf refactor(legacy): split legacy_shared into cohesive packages
legacy_shared was the junk drawer of the legacy app mode — 37 files
mixing device entities, command infrastructure, UI primitives, generic
formatters, and a duplicate of sf_infrastructure's dio_error_mapper.
Any module needing one piece pulled the whole bag into its graph.

Split it by responsibility, following Mandamiento 4 of Real-World Flutter:

- legacy_ui (new): 6 widget/layout primitives (PageLayout, MenuButton,
  SectionButton, PulsingLocationMarker, RefreshableErrorState,
  WeekDayChips) plus mapStyleProvider — shared UI state that was the
  only reason two modules needed a common package.
- legacy_device_state (expanded 9 → 30): absorbed device entities,
  commands infrastructure (datasource + repo + provider + guard),
  device settings update flow, and the CSV exporter. Now one package
  owns the device domain end-to-end.
- packages/utils: absorbed battery_utils and date_format_utils as pure
  formatters that never belonged in a legacy-scoped package.
- legacy_shared: deleted entirely.

The duplicate dio_error_mapper in legacy_shared is gone; callers now use
the sf_infrastructure version (which was always the superset — it adds
ApiException and the dart:io socket handling).

DeviceEntity note: legacy_device_state keeps its own DeviceEntity (with
int timestamps and typed paymentOptions) separate from sf_shared's
DeviceEntity (String timestamps, untyped paymentOptions). The legacy
one is intentionally not exported from the barrel to avoid the
ambiguous_import collision that legacy_shared quietly hid by never
exporting it in the first place. Unifying the two is a domain-model
refactor out of scope here.

0 cross-module imports remain among legacy feature modules.
2026-04-26 21:52:51 +02:00
d7308229a0 chore(sf_localizations): switch i18n source to es.json and add parity check
Spanish is the app default (SFLocalizations.testInit uses 'es',
localeResolutionCallback falls back to the first supported locale), so
make that explicit by pointing the code generator at es.json instead of
en.json. Regenerating picked up 12 activity-meter keys that were already
present in every locale file but had drifted out of I18n.

Add scripts/check_i18n_parity.dart: treats es.json as the template and
reports any missing or orphan keys in en/fr/de/it/pt. Exits non-zero so
it can gate CI or a pre-commit hook later.
2026-04-26 21:52:51 +02:00
f7d3dbfd27 refactor(legacy): migrate theming to Material 3 + SfColors extension
Replace the ThemePort/ThemeCode abstraction (GetIt-registered adapter)
with a Riverpod-driven Material 3 ColorScheme, an SfColors ThemeExtension
for brand tokens, and a user-facing appearance selector for light/dark/
system modes. Persisted via SharedPreferences, reacts to system
brightness changes. Payments mode keeps the existing ThemePort API.

Highlights
- New legacy_theme package: LegacyAppTheme (light/dark), LegacyColorSchemes,
  SfColors ThemeExtension, LegacyThemePreferences, LegacyThemeNotifier,
  LegacyThemeSelector. Timeframe-based variants scaffolded but disabled.
- New /legacy/dashboard/control_panel/settings/appearance route + screen.
- MaterialApp.router picks the legacy theme only when isLegacyMode.
- ~90 ThemeCode.* usages migrated to colorScheme.* / context.sfColors.*.
- 25 widgets dropped the 'ThemePort theme' constructor param.
- ~145 hardcoded colors migrated (exact hex 1:1, grey.shade tiers,
  destructive red -> colorScheme.error, background whites -> surface).
  Content-over-color whites, transparents, and brand semantic reds/
  oranges/greens intentionally preserved.
- sf_localizations updated with appearance / appearanceDescription keys
  in all six locales.
2026-04-26 21:52:50 +02:00