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.
- 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
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
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
- 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)
- 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
- 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
- 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
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