Skip to content

Conversation

@tcobbs-bentley
Copy link
Member

  • Receive updates from addon
  • Store the online status in a global
  • Use the global to avoid doing checking for cloud container changes when offline

imodel-native-internal: https://github.com/iTwin/imodel-native-internal/pull/921

* Receive updates from addon
* Store the online status in a global
* Use the global to avoid doing checking for cloud container changes when offline
@tcobbs-bentley tcobbs-bentley requested review from a team as code owners November 19, 2025 19:52
@tcobbs-bentley tcobbs-bentley enabled auto-merge (squash) November 19, 2025 21:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds network reachability monitoring to mobile applications by integrating online/offline events from the native platform. The changes enable the backend to track connectivity status and optimize workspace operations by skipping remote checks when offline.

Key Changes:

  • Added "online" and "offline" device events to the mobile platform API
  • Implemented handlers to update global connectivity status when network state changes
  • Modified workspace container logic to skip cloud synchronization checks when offline

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
core/mobile/src/common/MobileAppProps.ts Added "online" and "offline" to the DeviceEvents type definition
core/mobile/src/backend/MobileHost.ts Implemented event handlers that update NativeHost's connectivity status when online/offline events are received
core/backend/src/internal/workspace/WorkspaceImpl.ts Added early return logic to skip cloud container checks when offline in mobile environments
core/backend/src/NativeHost.ts Added global process.internetConnectivityStatus to expose connectivity state without direct NativeHost references
common/changes/@itwin/core-mobile/tcobbs-reachability_2025-11-19-19-50.json Changelog entry for mobile package (type: none)
common/changes/@itwin/core-backend/tcobbs-reachability_2025-11-19-19-50.json Changelog entry documenting workspace update check optimization
common/api/core-mobile.api.md Updated API surface to reflect new device event types

@tcobbs-bentley tcobbs-bentley enabled auto-merge (squash) November 25, 2025 18:14
@tcobbs-bentley tcobbs-bentley merged commit 3335c9e into master Nov 25, 2025
15 checks passed
@tcobbs-bentley tcobbs-bentley deleted the tcobbs/reachability branch November 25, 2025 18:42
@tcobbs-bentley
Copy link
Member Author

@Mergifyio backport release/5.4.x

@mergify
Copy link
Contributor

mergify bot commented Nov 25, 2025

backport release/5.4.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 25, 2025
Co-authored-by: Paul Connelly <[email protected]>
Co-authored-by: Copilot <[email protected]>
(cherry picked from commit 3335c9e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants