Commit Graph

554 Commits

Author SHA1 Message Date
298f73b02b ci(codemagic): add staging + production workflows for legacy store builds
Codemagic se usa como herramienta de release (Play Store + App Store),
no como CI general. La validación de develop / feature branches sigue
siendo local.

Workflows:
- staging_android / staging_ios — push a fusion-app → Play Internal Track + TestFlight
- production_android / production_ios — tag 1.0.0(N) → Play (draft) + App Store (manual review)

Todos los workflows publicables buildean en APP_MODE=legacy mientras
el roadmap premium de Treezor no esté listo para producción.

Scripts en codemagic_scripts/:
- project_setup.sh — melos bootstrap (build_runner no es necesario,
  los .freezed.dart y .g.dart están commiteados)
- analyze_and_test.sh — melos run analyze + test con --no-select
  obligatorio (sin TTY melos crashea con StdinException)
- android_dependencies.sh — verifica gradle wrapper
- android_key_properties.sh — escribe key.properties desde CM_KEYSTORE_*
- ios_signing_cocoapods.sh — gem install cocoapods + xcode-project use-profiles
- flutter_build.sh — build aab/ipa con --dart-define=APP_MODE; parser
  para tags formato 1.0.0(N) o v1.0.0(N) en producción
- print_versions.sh — log de versiones y herramientas
- build_status.sh — exit + notificación Google Chat ante fallo

Setup detallado y bloqueantes externos en docs/codemagic-integration.md.
2026-05-12 07:32:52 -05:00
bb0d3c253a fix(ci): unblock melos run analyze + test on fusion-app
- Add !context.mounted/!mounted guards in control_panel_screen and
  location_map to clear use_build_context_synchronously info-level
  lints that were failing flutter analyze
- Wrap PrimaryButton's Text in Flexible so TextOverflow.ellipsis
  can truncate when width is constrained (Row was overflowing 44px
  with the "small" golden scenario)
- Regenerate primary_button and secondary_button goldens after the
  layout fix
- Remove empty boilerplate widget_test.dart from
  flutter_treezor_entrust_sdk_bridge/example (referenced an SDK with
  platform channels that crashed in vm test mode)
- Gitignore **/test/failures/ (transient diff artifacts written by
  flutter test when goldens fail)

Also dropped 10 empty test/ directories scaffolded by flutter create
that were failing melos run test with "Test directory does not
contain any test files": auth, dashboard_shell, home, legacy_auth,
notifications, profile, sca_treezor, sf_infrastructure, splash, utils
2026-05-12 06:43:14 -05:00
ccef0fd186 fix 2026-05-12 05:46:01 -05:00
6ff2d77a32 added filters to getPositionHistory and getLastPosition in location feature 2026-05-12 04:05:12 -05:00
ecfaaec161 payments child wallet available balance changed to solde 2026-05-12 03:35:39 -05:00
4f6e3684bf release: 1.0.0+10 — chat: state in Riverpod + dispose fix
Chat refactor — no setState
- ChatConversationState: new isReconciling flag in the view state
- reconcileFromRemote sets isReconciling true/false with idempotent guard and try/catch error path; isReconciling is now the single source of truth for the AppBar refresh button and the inverted pull-to-refresh spinner
- ChatConversationScreen drops the local _isRefreshing field; AppBar e inverted pull-to-refresh read state.isReconciling and dispatch the controller directly
- ChatImageBubble migrated to a pure ConsumerWidget; local file existence check and remote file resolution are now FutureProvider.family.autoDispose providers (_localFileExistsProvider, _remoteFileProvider)

Chat dispose fix
- ChatContextNotifier exposes releaseList() and releaseConversation(chatId) so callers no longer need to read .state (which is @protected)
- ChatConversationScreen and ChatListScreen schedule the release inside Future.microtask from dispose(); Riverpod 3.x prohibits mutating providers during widget lifecycle, the microtask defers the mutation past tree finalization and resolves the "Tried to modify a provider while the widget tree was building" assertion
2026-05-11 03:55:14 -05:00
abdbc2bf2e release: 1.0.0+6 — chat notifications + videocall refactor
Chat notifications (production-ready)
- ChatDeeplinkService: resolves client chat ID from incoming push/WS payloads using the (senderId, chatId) matrix and switches selectedDeviceProvider when the payload references a different watch (multi-device deeplink)
- IncomingChatResolver in domain layer with full unit coverage of the 4-case matrix
- ChatContext provider (sealed: outsideChat / list / conversation) wired into ChatListScreen and ChatConversationScreen via initState/dispose to enable WhatsApp-style suppression
- notifications_init refactor: foreground CHAT_MESSAGE notifications are suppressed on chat list and matching conversation; tap navigation goes through ChatDeeplinkService
- ChatSyncService.subscribeToReconnect: reconciles from REST when the WebSocket comes back from a disconnect (recovers messages missed in background)
- 5s message-id dedup window in the WS listener (mitigates server-side duplicate chat-message-received events)
- Reconcile from remote on conversation mount (covers cached controller from background)
- AppBar refresh button + inverted pull-to-refresh in the conversation (overscroll either edge of the reverse list)

WS event parser fix
- chat-message-received normalises to chat_message_received; parser now accepts both that and chat_message so the conversation reactively refreshes when a watch sends a message

Chat application layer
- Split the conversation controller into services: chat_send_service, chat_sync_service, chat_participants_service, chat_permission_flow_service, chat_media_cleanup_service
- chat_conversation_config centralises page size, polling interval, dedup window
- chat_bubble_shell extracted; input bar split into smaller widgets
- emoji picker sheet + emoji blocking input formatter + watch_emoji_catalog
- Multipart upload header race fixed via synchronized.Lock around the shared Dio instance

Videocall (carryover from earlier work in this branch)
- Application services: incoming, outgoing, session
- Domain entities: VideocallIncomingArgs, VideocallRoom, VideocallUserId, parseDeviceIdFromRoom helper
- Views split: idle, incoming, active call, group call
- Widgets: picture_in_picture_video, remote_or_fallback_video, video_call_header
- videocall_config centralises timeouts, ringing duration, battery threshold
- Incoming via push (channel mode) with full-screen notification + ringtone
- Hangup-on-remote-left moved to controller; redirect on participant update documented
- treezor_token_interceptor: distinguish session expiry from operation-denied 401s

Localization & misc
- New keys for chat conversation, refresh, errors across en/es/de/fr/it/pt
- Location map: dispose ref-after-unmount fix; route history layer cleanup
- Legacy device view model: position update event handling
- AndroidManifest: notification channel + permissions for incoming-call full-screen intent
2026-05-08 07:20:40 -05:00
54b81818ec feat(chat): add 1:1 and family group chat module for legacy dashboard
- Module structure mirrors location pattern (core/data, core/domain, core/providers, features)
- Supports text, emoji, image and audio messages over POST /chat-messages multipart
- Optimistic UI with status reconciliation via 4s polling and circuit breaker after 3 errors
- Offline queue persisted in SharedPreferences, drained on conversation re-open
- WhatsApp-style audio recorder with long-press, slide-to-cancel, haptics and animated overlay
- Image picker (camera/gallery) with on-device 1024px JPEG compression
- Single-audio playback coordinator across bubbles
- Family group fan-out: N parallel POSTs sharing chatId, members derived from delegationId
- Reuses LegacyOptionCard extracted from videocall idle screen
- Tracking events legacy_chat_opened, message_sent, image_sent, audio_sent, permission_denied (no PII)
- WebSocket ChatMessageEvent parser added for future backend support
- Push command CHAT_MESSAGE handled in notifications_init for deep-linking
- 15 unit tests covering id resolver, file url builder and repository

Pending backend coordination: GET /chat-messages 500 (parseQueryParams), push routing heuristic, file size/mime limits.
2026-05-05 23:32:54 -05:00
62b38acab4 chore: pending staged changes 2026-05-05 10:31:43 -05:00
924ecd83ee france localizations corrections 2026-04-30 14:55:15 +02:00
4510d2bb28 fix(location): add orderBy to positions query to show latest position 2026-04-27 18:09:30 +02:00
f54bf24417 feat(videocall): handle device response via WebSocket and show ringing state 2026-04-27 14:12:39 +02:00
b5d12f31a1 chore(ui): replace loading gif with birds animation and add loading text 2026-04-27 01:14:59 +02:00
74f470219a feat(friends): add friends list screen with delete support 2026-04-27 01:14:48 +02:00
24ddbf34e4 fix(videocall): fix SDK re-entry lifecycle and add logout on session clear
- Skip login when SDK client is already logged in (early return with isSdkReady)
- Set isSdkReady immediately when login() returns true instead of waiting for async callback
- Add ref.mounted check after userInfo future to prevent state updates on disposed provider
- Logout VideocallClient on session clear to prevent stale SDK sessions
- Use getActiveCallItem() in onCallItemUpdate for fresh call state (matches JC demo app)
2026-04-27 00:22:48 +02:00
69297f826e fix: regenerate freezed files with system and imei fields 2026-04-26 23:28:46 +02:00
390f2501b4 merge: sync feature/videocall-sdk-integration with fusion-app 2026-04-26 22:03:00 +02:00
555a668481 feat(videocall): complete signaling integration, group call support, and UI polish
- Wire VIDEO_CALL_REQUEST/CANCEL/REFUSE/ROOM_COUNT commands via CommandsRepository
- Add VideocallChatType enum (single/multi) with chatType stored in state
- Implement auto-login to Juphoon SDK using sanitized email + user UUID
- Add runtime camera/microphone permissions before call start
- Add RetryInterceptor for transient TLS/socket errors in Dio
- Migrate VideocallItem to Freezed with isTalking extension
- Implement startGroupCall/leaveGroupCall using ChannelService with participant grid
- Add PopScope to intercept back navigation during active calls
- Redesign idle screen with device option cards and group call button
- Redesign active call UI with video overlay, PiP local view, and new controls layout
- Clean up SDK wrapper: remove unused streams, merge destroy+dispose into shutdown
- Add i18n keys for videocall UI across 6 locales
2026-04-26 21:53:32 +02:00
5aa0c0acc7 fix(videocall): apply PR review fixes and add i18n translations
- Replace setState with FutureBuilder in VideoViewWidget
- Remove comments from datasource impl
- Replace GetIt.I with ref.read(provider) in controllers
- Fix state comparison using isTalking getter
- Add hangUp/stopAudio/stopCamera cleanup on dispose
- Remove duplicate SafeArea from IncomingCallOverlay
- Add missedCall error event to enum
- Replace Colors.white70 with theme colorScheme
- Move VIDEOCALL_INTEGRATION.md to apps/mobile_app/docs/
- Gitignore config JSON files with app keys
- Add 28 i18n keys in 6 locales for all videocall strings
- Map error events to specific i18n messages
2026-04-26 21:53:32 +02:00
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
8ff94a1e92 feat(legacy): add connection status indicator to device banners 2026-04-26 21:53:05 +02:00
a87c7e8732 refactor(heartbeat): refresh devices every 2min instead of pinging /auth/me 2026-04-26 21:53:05 +02:00
4be46f71c7 fix(control-panel): use iso_sf.png in map preview banner 2026-04-26 21:53:05 +02:00
105211e334 fix(control-panel): prevent device name from overlapping header logo 2026-04-26 21:53:05 +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
cf6a9dd6df test(do-not-disturb): add enabled field and toggle tests (4 new cases) 2026-04-26 21:53:04 +02:00
0d677afd32 test(app-usage-schedules): add controller and editor unit tests (6 cases) 2026-04-26 21:53:04 +02:00
323d28bb17 test(installed-apps): add InstalledAppsController unit tests (3 cases) 2026-04-26 21:53:04 +02:00
92f6035b84 chore(i18n): add GPS functions, history and delete confirmation keys 2026-04-26 21:53:04 +02:00
c5c85c4fda fix(settings): capitalize language names in selector 2026-04-26 21:53:04 +02:00
4cfee8ced3 fix(legacy): replace hardcoded colors for dark mode contrast 2026-04-26 21:53:04 +02:00
376e6bc13a fix(legacy): add dark mode support for pickers and dialogs 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
a9a34fbbc5 test(location): add LocationMapController unit tests (22 cases) 2026-04-26 21:53:03 +02:00
04b8d1609c feat(location): add history playback, GPS functions dialog and UX improvements 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
bc946cfc39 refactor(legacy): replace showTopSnackbar with feedback dialogs 2026-04-26 21:53:03 +02:00
c4bdf707e1 chore: regenerate health controller codegen 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
05c96bc10e fix(call-history): sort calls by most recent first 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
440adcdf8d feat(device-management): add app usage schedules feature 2026-04-26 21:53:02 +02:00