Skip to content

Conversation

@IvanStepanok
Copy link
Contributor

Address issue #581

Problem:
Even when the device is connected to a network (e.g., via Wi-Fi), there might be no actual internet access. In such cases, the app continuously tries to fetch data, leading to a poor user experience.

Solution:
After confirming network availability, we send a request to our server. If no successful response is received within 15 seconds, we assume there is no internet access and switch the app to offline mode. This internet reachability check is performed every time we detect network availability, but no more frequently than once every 30 seconds.

Examples:
Old connectivity

Old.Connectivity.mov

New connectivity

New.Connectivity.mov

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 6, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Aug 6, 2025

Thanks for the pull request, @IvanStepanok!

This repository is currently maintained by @openedx/openedx-mobile-maintainers.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.


Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Aug 6, 2025
@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Aug 6, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Needs Tests Run or CLA Signed in Contributions Aug 6, 2025
@mphilbrick211 mphilbrick211 removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Aug 6, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Tests Run or CLA Signed to Waiting on Author in Contributions Aug 6, 2025
@edschema
Copy link

Hi team! Noticed this PR with work on the associated bug. Wanted to flag that this issue is cross platform; the Android version of this ticket can be found here: openedx/openedx-app-android#458

@mphilbrick211
Copy link

Hi @IvanStepanok! Is this pull request still in progress?

@openedx-webhooks openedx-webhooks added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Sep 12, 2025
@codecov
Copy link

codecov bot commented Sep 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@05e5ee3). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             develop   #635   +/-   ##
========================================
  Coverage           ?      0           
========================================
  Files              ?      0           
  Lines              ?      0           
  Branches           ?      0           
========================================
  Hits               ?      0           
  Misses             ?      0           
  Partials           ?      0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@IvanStepanok
Copy link
Contributor Author

Hi @IvanStepanok! Is this pull request still in progress?

Yes, we want to merge it after the current scope of work (Course Home tab and video navigation).

@IvanStepanok IvanStepanok marked this pull request as ready for review October 29, 2025 15:41
request.timeoutInterval = verificationTimeout
do {
let (_, response) = try await URLSession.shared.data(for: request)
if let http = response as? HTTPURLResponse, (200..<400).contains(http.statusCode) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What happens on 401..405 responses? As example 404 is a "not found" response, not a connection issues. Also 500...599 is a server response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Waiting on Author

Development

Successfully merging this pull request may close these issues.

5 participants