Commit Graph

224 Commits

Author SHA1 Message Date
57f0f64d08 refactor(videocall): migrate to @riverpod controller pattern and add device config
- Rename ViewModel → Controller, ViewState → State with @riverpod codegen
- Move state/ → providers/ folder for consistency
- Add post-init device configuration (camera, speaker, maxCallNum, mediaConfig)
- Use MediaConfig.generateByMode based on device capabilities.system (rtos/android)
- Add CallParam.ticket for smartwatch wake-up protocol
- Start audio/camera before call, stop on hangup
- Granular video management based on uploadVideoStreamSelf/Other flags
- Build watch userId from device.imei (w_ prefix)
- Add imei field to DeviceEntity
- Add system field to DeviceCapabilitiesEntity with isRtos/isAndroid helpers
2026-04-26 21:53:32 +02:00
9f23ecb42e feat(videocall): integrate videocall feature with architecture refactor
Merges videocall stash, resolves conflicts with installed_apps routes,
and refactors UI to match current legacy patterns:
- Replace themePortProvider with context.sfColors and Theme.of(context)
- Replace showTopSnackbar with feedback dialogs
- Replace hardcoded colors with theme-aware colorScheme
- Wrap test login button in kDebugMode
- Rename error enum values to be more descriptive
2026-04-26 21:53:32 +02:00
6d2d16d8cb fix 2026-04-26 21:53:05 +02:00
424f2af0cc fix(tests): update feedback_dialogs test for queue implementation 2026-04-26 21:53:05 +02:00
41f1797dcf test(device-entity): add queueCommands and isDisconnected tests (11 cases) 2026-04-26 21:53:05 +02:00
92f6035b84 chore(i18n): add GPS functions, history and delete confirmation keys 2026-04-26 21:53:04 +02:00
4422f93903 fix(feedback-dialogs): add queue system to prevent dialog stacking 2026-04-26 21:53:03 +02:00
e901b22981 feat(location): redesign device banner to match reference UI 2026-04-26 21:53:03 +02:00
2d87cd5aee fix(location): add refresh success feedback and fix queueCommands null crash 2026-04-26 21:53:03 +02:00
bef87262b1 chore(i18n): improve positionUpdated message text 2026-04-26 21:53:03 +02:00
3f28aa95bc chore(i18n): add positionUpdated key in 6 locales 2026-04-26 21:53:03 +02:00
dd8faa9f35 feat(device): add queueCommands to DeviceEntity and command guard 2026-04-26 21:53:03 +02:00
17d931ffda chore(i18n): add localization keys for new features and fixes 2026-04-26 21:53:03 +02:00
a21a8af9b1 fix(tracking): shorten event names to fit Firebase 40-char limit 2026-04-26 21:53:03 +02:00
bbdaa25e12 feat(navigation): add routes for installed apps and app usage schedules 2026-04-26 21:53:03 +02:00
cb897a3243 feat(location): add manual frequency option and optimize position loading 2026-04-26 21:53:02 +02:00
516197b819 fix(splash): distinguish network errors from auth errors in session check 2026-04-26 21:53:02 +02:00
309c7b1d87 fix payments 2026-04-26 21:53:01 +02:00
ab1a0a88f9 removede shadow and blurs 2026-04-26 21:53:01 +02:00
5be9136e06 feat(legacy): replace CircularProgressIndicator with animated GIF loading
Add LegacyLoadingIndicator widget using a transparent GIF animation
for all full-page loading states across legacy modules. Also fix
HealthController crash by deferring provider mutation during build.
2026-04-26 21:53:01 +02:00
003604444c warning icon 2026-04-26 21:53:01 +02:00
c7ed2f16c1 feat(ui): use pill style for offline and technical error dialogs 2026-04-26 21:53:00 +02:00
92c922a130 feat(ui): redesign feedback dialogs with pill style for legacy mode 2026-04-26 21:53:00 +02:00
6e6225d6b6 refactor(legacy_auth): migrate device_setup to Riverpod + polish QR scanner UX 2026-04-26 21:53:00 +02:00
ba76348936 refactor(device_management): migrate scheduled_activities to Riverpod 2026-04-26 21:53:00 +02:00
4d2cd62267 refactor(device_management): migrate contacts to Riverpod 2026-04-26 21:52:59 +02:00
a2ef28a1b5 refactor(device_management): migrate do_not_disturb to Riverpod + add delete button 2026-04-26 21:52:59 +02:00
6ff11b8c1e fix(router): rename duplicate notifications route name 2026-04-26 21:52:59 +02:00
460fbffcad fix(websocket): parse wifi-current event type for wifi settings 2026-04-26 21:52:58 +02:00
ad0b8d209a refactor(settings): migrate block_phone to Riverpod CRUD pattern 2026-04-26 21:52:58 +02:00
c3dcc6febc feat(legacy-settings): DST-aware timezone with phone auto-detect 2026-04-26 21:52:57 +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
6d49e604be refactor(legacy-account): migrate delete_account to AsyncNotifier + fix A1 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
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
039f2bb051 chore(i18n): add missing translation keys and device debug logging 2026-04-26 21:52:53 +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
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
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
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