Commit Graph

308 Commits

Author SHA1 Message Date
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
bd7c47351f chore: ignore flutter auto-generated files
These files are regenerated by flutter pub get and contain machine-
specific paths (FLUTTER_ROOT, FLUTTER_APPLICATION_PATH). They should
not be tracked — the file header itself states "do not check into
version control".

- Update .gitignore: prepend **/ to .flutter-plugins-dependencies so
  it matches in sub-packages, add Generated.xcconfig and
  flutter_export_environment.sh patterns.
- git rm --cached the 4 files that were already tracked (keeps them
  on disk for local builds but removes from repo).
2026-04-26 21:52:50 +02:00
6cf994cd5d refactor(legacy): extract shared device state into legacy_device_state package
- New package legacy_device_state hosts shared device/position state
  consumed by both control_panel and location screens. ControlPanel*
  classes renamed to LegacyDevice* in 8 moved files.
- Move PositionEntity + AddressEntity + NetworkEntity +
  LatestPositionsResponseModel + BatteryUtils + DateFormatUtils from
  control_panel to legacy_shared (shared domain entities).
- Remove anti-pattern re-export of sf_infrastructure/dio_error_mapper
  from legacy_shared barrel. Update consumers to import
  sf_infrastructure directly.
- Clean 14 unused legacy_shared imports across view models in
  account, device_management, legacy_auth and settings modules.

Eliminates cross-module dependency location -> control_panel.
0 errors, 0 warnings in flutter analyze across 11 packages/modules.
2026-04-26 21:52:50 +02:00
fa3d7aa1fd fix(location): keep map visible on transient network errors
Show snackbar instead of replacing the entire map with an error state
when a reload fails. Only show RefreshableErrorState on first load failure.
2026-04-26 21:52:50 +02:00
5b4d31e2f1 fix(location): guard frequency timer minimum and filter zero options
Prevent position polling timer from firing with frequency < 60s (protects
against 0s values that saturate the API). Also filter out 0 from location
capability options in the frequency selector.
2026-04-26 21:52:50 +02:00
b9b49f0b26 feat(videocall): complete channel wrapper + add integration plan doc
Add 11 missing JCMediaChannel methods to VideocallChannelService:
getSelfParticipant, subscribeParticipantAudio, startScreenShareVideo,
stopScreenShareVideo, enableSelfVideoRatio, getMaxResolution,
sendCommandToDelivery, enableVolumeChangeNotify, getCaptureScreen,
getScreenRenderId, getScreenUserId.

Add VIDEOCALL_INTEGRATION.md with full implementation checklist
tracking phases 1-10.
2026-04-17 15:51:36 +02:00
afa916a30d feat(videocall): add native permissions for video calling
Android: RECORD_AUDIO, ACCESS_WIFI_STATE, MODIFY_AUDIO_SETTINGS,
BLUETOOTH permissions + camera/bluetooth uses-feature + ProGuard
rules for Juphoon/JusTalk.

iOS: NSMicrophoneUsageDescription, NSPhotoLibraryUsageDescription,
updated NSCameraUsageDescription + Podfile GCC_PREPROCESSOR_DEFINITIONS
for camera, photos and microphone permissions.
2026-04-17 15:51:27 +02:00
4347cefaed feat(videocall): add videocall_sdk package wrapping Juphoon jc_sdk
Full wrapper around jc_sdk v2.16.5 with clean architecture:
- 7 services covering 100% of jc_sdk public API (Client, Call, Device, Channel, Push, Net, Log)
- Constructor injection with GetIt DI module (follows sca_treezor pattern)
- VideocallSdkManager orchestrator for init/destroy lifecycle
- VideocallSdkConfig abstract for environment-specific AppKey
- Stream-based callbacks for reactive UI consumption
- Riverpod providers (service + stream) for feature layer
- AppKey configured per environment via dart-define-from-file
- Integrated in init_app.dart alongside scaTreezorModule
2026-04-17 15:17:56 +02:00
e7ebe7f403 fix 2026-04-17 15:13:34 +02:00
ed41b82076 chore(legacy): hide wifi settings and forgot password entry points
Comment out the navigation entry points for the wifi settings flow
from the device settings list and for the forgot-password link from
the login screen while these flows wait for product sign-off. The
underlying screens and providers stay in place so re-enabling them is
a single uncomment.
2026-04-17 11:16:08 +02:00
9470f54867 chore(notifications): log push token registration outcome for debugging
Add debugPrint entries before and after POST /universal-notifications/push
so we can trace whether a given token was accepted by the backend
during debugging of push delivery issues.
2026-04-17 11:13:59 +02:00
f82d222df3 style(device_setup): redesign activation code dialog with icon and OK action
Replace the bare centered text with a rounded dialog that leads with a
mail icon, keeps the activation-code message, and adds an explicit OK
button to dismiss. Aligns the dialog with the rest of the legacy
design system.
2026-04-17 11:13:53 +02:00