Commit Graph

277 Commits

Author SHA1 Message Date
2eddb99c47 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-19 01:58:45 +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
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
bf1032245a refactor(device_setup): type API errors with status-code-based enum
Introduce LegacyDeviceSetupErrorEvent and two mappers for the
generate-activation-key and create-device endpoints. 403 on
activation-key maps to invalidIdentificator; 404 to deviceNotFound;
401 (already activated or B2B) unifies as deviceNotAvailable. On
create-device, 403 → invalidField and 404 → invalidActivationKey.
The view state now splits validation vs API errors with a
displayErrorKey extension, replacing the previous e.toString() leak
that could surface stack traces to users.
2026-04-17 11:12:37 +02:00
fad2c8792c refactor(recover_password): type API errors and hide email enumeration
Map PUT /auth/reset-password and PUT /auth/recovery-password failures
into LegacyRecoverPasswordErrorEvent. Reset-password now treats 404
(email not found) as success and surfaces a generic sent-if-exists
flow, closing an account enumeration vector. Recovery-password
differentiates 401 (tokenExpired), 404 (tokenNotFound), 403+Property
(invalidField) from 403 without Property (weakPassword). The view
state splits validation vs API errors with a displayErrorKey extension
for the inline error text.
2026-04-17 11:12:14 +02:00
73d9de45a2 refactor(signup): type API errors with status-code-based enum
Introduce LegacySignupErrorEvent to map backend failures from
POST /auth/signup: 400 → emailAlreadyExists, 403 → invalidField,
429 → tooManyAttempts, timeout → network. The view state now
separates validationErrorKey (pre-submit i18n keys) from apiErrorEvent
(typed API outcomes), and the screen listens to both to show proper
i18n messages instead of leaking raw backend text.
2026-04-17 11:11:52 +02:00
56d89fcdc4 refactor(login): type auth errors with status-code-based enum
Replace the raw errorMessage string in the login view state with a
typed LegacyAuthErrorEvent that classifies backend failures by HTTP
status (403/404 → invalidCredentials, 423 → accountLocked, 401 +
NOT_VERIFIED/expired → dedicated events, 429 → tooManyAttempts,
timeout → network). The login screen and 2FA sheet now switch on the
enum to show specific i18n messages instead of surfacing raw backend
text. Adds auth i18n keys for the full set of mapped states.
2026-04-17 11:11:23 +02:00
eff6f01924 feat(infra): preserve status code and network flag in ApiException
Replace the untyped Exception(msg) thrown by mapDioError with an
ApiException that exposes statusCode and isNetworkError alongside the
message. Callers can now classify failures by HTTP status without
string-matching on the error message — this unblocks typed error
mapping in the auth feature modules.
2026-04-17 11:10:13 +02:00
72d44b81df feat(legacy): add pull-to-refresh for control_panel and location
Introduce a shared RefreshableErrorState widget that wraps the retry
hint in a RefreshIndicator with an explicit 'pull down to retry'
caption, so users can recover from load failures without navigating
away. Wire it into the location screen's error fallbacks and make the
control_panel body pull-to-refresh at any time, invalidating the device
list so the dashboard picks up fresh data.
2026-04-17 09:44:29 +02:00
2942d7393e feat(wifi_settings): support setting saved networks as current
Add a setNetwork action that sends the setWifi command for a saved
network and waits for wifiCurrent confirmation with a 15s timeout.
Saved network cards are now tappable to trigger the switch, and
dedicated success/error states surface the result via snackbar.
2026-04-17 09:44:16 +02:00
0b160758e2 refactor(legacy): make guardDeviceCommand async with stale TTL refetch
Convert the shared command guard to an async check that refetches
/devices when the cached state is older than 30s, so the isDisconnect
flag reflects reality before a command runs. A TopSnackBar explains the
check only if the fetch takes longer than 400ms, avoiding noise on fast
responses. Update all 44 call sites to await the guard.
2026-04-17 09:43:52 +02:00
e7a4653c01 refactor(shared): move device providers and data layer from legacy_shared to sf_shared
Device providers (legacyDevicesProvider, selectedDeviceProvider), repository,
datasource, and GetDevicesResponseModel now live in sf_shared. Also moved
dio_error_mapper (safeCall, mapDioError, formatErrorMessage) to sf_infrastructure.
Consumers import directly from sf_shared instead of re-exporting through legacy_shared.
2026-04-17 08:48:38 +02:00
cbc40f7d95 feat(alerts): add device alerts screen with pagination, filters, and WebSocket 2026-04-17 04:00:25 +02:00
27e26ca921 refactor(utils): extract query params builder, migrate health and location 2026-04-17 04:00:12 +02:00
e83adbfdbf feat(firebase): add production config and push token refresh listener 2026-04-17 03:07:57 +02:00
973fc2490c feat(wifi-settings): redesign with device commands, WebSocket scan, and connect flow 2026-04-17 03:06:23 +02:00
e148b9fdfa fix(websocket): handle notification wrapper, hyphenated types, and stringified data 2026-04-17 03:06:09 +02:00
ddc5086b3b feat(legacy): block device commands when watch is disconnected 2026-04-16 23:48:07 +02:00
769e8fea27 refactor(do-not-disturb): move data layer to core, remove delete action 2026-04-16 21:26:07 +02:00
984a87f200 feat(alarm): changed alarm endpoint and modified models, entities and presentation 2026-04-16 18:42:29 +02:00
cda889a15b feat(websocket): add WebSocket service with typed events and auto-reconnect 2026-04-16 16:47:34 +02:00
514daf9c7c feat(do-not-disturb): add DND schedule feature with capabilities-driven UI 2026-04-16 13:54:13 +02:00
51a3979c03 feat(location-map): auto-center on first fix, follow toggle, refresh feedback 2026-04-15 22:13:12 +02:00
c7e32d1399 refactor(activity-meter): redesign screen with honest per-range stats 2026-04-15 21:51:08 +02:00
56e437ff13 refactor(device-management): migrate call_watch and remote_connection to SfPhoneNumber 2026-04-15 17:06:41 +02:00
85be483c4e refactor(legacy-auth): migrate link_phone to SfPhoneNumber with E.164 2026-04-15 17:05:50 +02:00
8a97304ff5 feat(design_system): add shared contacts permission dialog 2026-04-15 17:04:28 +02:00
8c1ca94a08 feat(sf_shared): add SfPhoneNumber value object and DeviceContactPicker service 2026-04-15 17:03:18 +02:00
95a03434ca fix(antelop): route FCM pushes through SDK, per-flavor plist on iOS, unify applicationId
- Add AntelopAwareMessagingService so the Antelop SDK gets first dibs on every
  FCM push before delegating to firebase_messaging. Unblocks SCA wallet
  activation on Android, which was waiting forever for pushes that the
  FlutterFirebaseMessagingService was swallowing ever since Firebase was
  integrated. Remove the stock Antelop and firebase_messaging services via
  manifest-merge so only the wrapper handles MESSAGING_EVENT.
- Add Copy AntelopRelease Build Phase in Xcode to copy
  Runner/AntelopRelease-{flavor}.plist over the fixed AntelopRelease.plist
  inside the .app bundle based on CONFIGURATION. Without this the iOS SDK
  silently used the production plist on every flavor.
- Revert the six applicationId values (3 AndroidManifest + 3 AntelopRelease
  plist) to the sample id 4713640103500149457, which is the only one
  provisioned in Antelop's backend today. The four env+platform ids they
  provided all fail with 9999 / cryptography: Error while decrypting data.
  To be updated once Treezor confirms the real ids.
- Add packages/flutter_treezor_entrust_sdk_bridge/example as a pub workspace
  member and bump its Dart SDK and flutter_lints constraints so
  'melos bootstrap' stops failing with 'dependencies for
  flutter_treezor_entrust_sdk_bridge_example missing'.
2026-04-15 11:25:06 +02:00
03998f9cf1 router fixes 2026-04-14 14:44:03 +02:00
1e60b38087 changed fcm token path 2026-04-14 10:20:24 +02:00
693f55369c feat(version-check): add in-app update prompt with Remote Config
Adds a production-grade in-app version check that prompts users to update when a new build is available. Soft updates are dismissable. Force updates block the app entirely. Configured via FirebaseRemote Config so rollouts can be triggered without redeploying.

- Sealed result types (NoUpdate / SoftUpdate / ForceUpdate) for type-safe pattern matching
- AppVersionCheckService
- AppUpdateGate widget encapsulates listener, route guard and dialog wireup, isolated from save_family_app
- Serialized notifier operations prevent race between dismiss and refresh, mounted checks blindar disposal edge cases                                                                                                  - Build-aware dismiss persistence via SharedPreferences
2026-04-09 14:52:37 +02:00
d352aec5be feat(notifications): register FCM token with backend post-login
Adds NotificationsRemoteDatasource in sf_shared that POSTs the current
Firebase Messaging token to /notifications/push, wired into the legacy
login flow right after getUserInfo so the device can receive targeted
push notifications.

Fire-and-forget with catchError so a failure never blocks login.
2026-04-08 15:40:37 +02:00
29887818f9 melos format 2026-04-07 17:07:47 +02:00
42ec003b05 refactor(tracking): tighten sf_tracking package
- Lazy-init sfTracking to avoid touching Firebase at import time
- DRY SfTrackingRepository with a single _broadcast helper
- Drop empty DashboardTracking, fix double step_completed in device_setup
- Move yearsBetween to packages/utils
- Add 5 unit tests for SfTrackingRepository
- Strip noisy comments from mixins and view models
2026-04-07 16:59:38 +02:00
4728e25803 feat(tracking): expand legacy module analytics coverage 2026-04-07 16:17:53 +02:00
7b91447cad feat(tracking): add sf_tracking package and instrument legacy module
Introduces packages/sf_tracking — a multi-client, GDPR-first analytics layer with feature mixins, a GoRouter listener for automatic screen views, and a user properties helper that runs on login.
Wires the package into the legacy module 61 events
2026-04-07 13:47:07 +02:00
c1954497b8 chore: add root .gitignore and untrack auto-generated cache files
The repo had no root-level .gitignore, so .dart_tool/, ephemeral plugin
symlinks and build artifacts were being tracked across the workspace.
Every flutter pub get regenerated them and they polluted PRs as recurring
noise.

- Add root .gitignore covering .dart_tool/, ephemeral plugin symlinks,
  build/, coverage/, IDE files
- Untrack ~39 existing cache files across root, modules and packages
2026-04-07 03:30:35 +02:00
9cdb4c7724 refactor: rename Questia to SaveFamily across the codebase 2026-04-07 00:47:29 +02:00
a560e19db2 fix: configure Antelop SDK applicationIds per environment 2026-04-07 00:37:39 +02:00
c263e4227e feat: split legacy/payment apps via APP_MODE flag 2026-04-07 00:09:48 +02:00
4a57bb35c5 style: apply dart format tall style and fix curly braces lints 2026-04-06 23:15:32 +02:00
3c4159ae8c chore: upgrade melos to 7.5.1 with pub workspaces and dep catalog
- Upgrade Melos to 7.5.1 using Dart pub workspaces (Melos 7 paradigm).
- Replace per-package pubspec_overrides.yaml with workspace-native resolution. Add dependencies.yaml as a centralized catalog for all external deps with sync_deps.dart tool to propagate and validate versions across the monorepo.
2026-04-06 23:08:51 +02:00
3d267aff37 chore: clean up flutter analyze warnings
Highlights:
- Add publish_to: 'none' to legacy pubspec.yaml files                                                      - Replace print() with dart:developer log() in Treezor SDK
- Add !context.mounted guards in async callbacks (defensive bug fix)                                                       - Add super.key to widget constructors
- Remove redundant @Default(null) from device_model                                     - Fix implementation_imports in legacy_auth datasources                                        - Add ignore comments for scaffolding code
- Add missing shared_preferences dependency in splash module                                                                                                            Mostly code quality improvements, with one defensive bug fix              context.mounted) and one missing dependency fix (shared_preferences).
2026-04-06 22:21:22 +02:00
b63b06ef14 refactor: group payment app modules under payment/ folder 2026-04-06 21:21:15 +02:00
8ade5ad3d7 refactor(i18n): rename keys for clarity and complete missing translations 2026-04-06 20:33:57 +02:00
26e89fb177 Merge branch 'set-reset-card-pin-and-renew' into fusion-app 2026-04-06 19:44:26 +02:00
1810dc6e2a fix 2026-03-25 18:53:21 +01:00
b7614a39f1 feat: sync device settings after updates and improve remote connection features
- Add DeviceSettingsSync extension on Ref to centralize device provider
    updates after settings changes (sound, volume, language, timezone,
    battery, disable functions, alerts, pedometer, heart rate freq,
    location freq, background image)
  - Add photo capture countdown with Lottie animation in remote camera
  - Replace Image.network with Image.memory for photo display
  - Fix commands datasource to handle text/html responses (post<dynamic>)
  - Add typed error/success events to RemoteConnectionViewModel
  - Add background image active indicator and backgroundImageId to device settings
  - Change photos endpoint from /devices/identificator/:id/photos/files to /photos/files
  - Remove dead deviceId param from getBackgroundImage chain
  - Relax PictureEntity required fields to @Default for API compatibility
  - Fix LocationViewModel rebuild crash (ref.watch → ref.read)
  - Use .select() in RemoteCameraScreen for optimized rebuilds
  - Increase health measure countdown to 60s
2026-03-25 13:51:48 +01:00