Closed Bug 2041705 Opened 5 months ago Closed 5 months ago

[Homepage Sports Widget] [phase2] No internet connection error is displayed if no team has been selected

Categories

(Firefox for Android :: Homepage, defect)

Firefox 153
All
Android
defect

Tracking

()

VERIFIED FIXED
153 Branch
Tracking Status
firefox151 --- verified
firefox152 --- verified
firefox153 --- verified

People

(Reporter: ljanos, Assigned: skhan)

References

Details

(Whiteboard: [fxdroid][group3][world-cup-phase2])

Attachments

(2 files, 3 external files)

Attached image image.png —

Steps to reproduce

  1. Enable "Homepage Sports Widget" feature from Secret Settings.
  2. Set the date and time of the device between 4th-10th of June 2026.
  3. Without selecting a team, turn the internet connection OFF.

Expected behavior

An error message is displayed regarding user being offline. (Like on iOS - screenshot)

Actual behavior

The Countdown widget is displayed, without any error message.

Device information

  • Firefox version: Nightly 153.0a1
  • Android device model: All
  • Android OS version: All
Severity: -- → S3
Blocks: 2037222

Previously the error card only swapped into live match rows on a failed
refresh poll. Server 500s, cold-start offline, debug-toggle while offline,
and pre-7-day refresh all hit other paths that either kept rendering stale
data or silently fell back to the FollowTeam / Countdown / Following promos.

Closes those gaps:

  • WorldCupMatchesRepository: a null body from the client (returned when
    the underlying network / API call was caught as an exception, including
    5xx) is now a failure instead of an empty success. The middleware now
    dispatches LoadFailed instead of an empty MatchCardStateUpdated that
    cleared errorState as a side effect.
  • SportsWidgetMiddleware: take an isOnline lambda and short-circuit
    fetchAndBuild to FetchFailed(ConnectionInterrupted) before invoking the
    repository. Wired in Components.kt via ConnectivityManager.isOnline(),
    so every dispatch site (HomeFragment, controller, debug-tool toggles,
    Apply button, override updates) produces the right error variant without
    its own connectivity check.
  • HomeFragment.onResume: also dispatch ConnectionInterrupted in the
    countdown phase (pre-7-day) when offline, so cold-open offline replaces
    the inert countdown promo with the error card.
  • SportsWidget.sportsCardPages: when errorState is set the pager always
    leads with the error card, replacing the FollowTeam / Countdown-with-
    Follow-CTA / Following promos. If no live match exists anywhere in
    matchCardStates, collapse to a single error card and suppress all match
    cards. Live matches keep MatchBody's existing in-line swap.
  • WorldCupMatchesRepositoryTest: updated for the new contract.
Assignee: nobody → skhan
Status: NEW → ASSIGNED
Pushed by skhan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cd7235add907 https://hg.mozilla.org/integration/autoland/rev/2c3495f0751f Surface the sports widget error card in every failure mode r=android-reviewers,petru
Pushed by rperta@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/589c1aab18f9 https://hg.mozilla.org/integration/autoland/rev/a04dae246119 Surface the sports widget error card in every failure mode r=android-reviewers,petru

Backed out by mistake, relanding now. Sorry!

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch

Authored by https://github.com/sarah541
https://github.com/mozilla/enterprise-firefox/commit/cd7235add9076305defc224f24be19e9757bec98
[enterprise-main] Bug 2041705 - Surface the sports widget error card in every failure mode r=android-reviewers,petru

Authored by https://github.com/sarah541
https://github.com/mozilla/enterprise-firefox/commit/589c1aab18f9cf9a8feefeaac4a70c0726638c6d
[enterprise-main] Bug 2041705 - Surface the sports widget error card in every failure mode r=android-reviewers,petru

Blocks: 2043299
Flags: qe-verify+

Previously the error card only swapped into live match rows on a failed
refresh poll. Server 500s, cold-start offline, debug-toggle while offline,
and pre-7-day refresh all hit other paths that either kept rendering stale
data or silently fell back to the FollowTeam / Countdown / Following promos.

Closes those gaps:

  • WorldCupMatchesRepository: a null body from the client (returned when
    the underlying network / API call was caught as an exception, including
    5xx) is now a failure instead of an empty success. The middleware now
    dispatches LoadFailed instead of an empty MatchCardStateUpdated that
    cleared errorState as a side effect.
  • SportsWidgetMiddleware: take an isOnline lambda and short-circuit
    fetchAndBuild to FetchFailed(ConnectionInterrupted) before invoking the
    repository. Wired in Components.kt via ConnectivityManager.isOnline(),
    so every dispatch site (HomeFragment, controller, debug-tool toggles,
    Apply button, override updates) produces the right error variant without
    its own connectivity check.
  • HomeFragment.onResume: also dispatch ConnectionInterrupted in the
    countdown phase (pre-7-day) when offline, so cold-open offline replaces
    the inert countdown promo with the error card.
  • SportsWidget.sportsCardPages: when errorState is set the pager always
    leads with the error card, replacing the FollowTeam / Countdown-with-
    Follow-CTA / Following promos. If no live match exists anywhere in
    matchCardStates, collapse to a single error card and suppress all match
    cards. Live matches keep MatchBody's existing in-line swap.
  • WorldCupMatchesRepositoryTest: updated for the new contract.

Original Revision: https://phabricator.services.mozilla.com/D302140

Attachment #9591104 - Flags: approval-mozilla-beta?
Flags: in-testsuite+
Attachment #9591104 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified on the latest Nightly 153.0a1 build.

The no internet error message is displayed when no team is selected.

Verified on:

  • Samsung Galaxy S25 Ultra (Android 16);
  • Oneplus Pad 3 (Android 15);
  • Motorola Nexus 6 (Android 8).

Marking the ticket as verified on 153.

Summary: [Homepage Sports Widget] [phase2] No internet connection error is not displayed if no team has been selected → [Homepage Sports Widget] [phase2] No internet connection error is displayed if no team has been selected

Previously the error card only swapped into live match rows on a failed
refresh poll. Server 500s, cold-start offline, debug-toggle while offline,
and pre-7-day refresh all hit other paths that either kept rendering stale
data or silently fell back to the FollowTeam / Countdown / Following promos.

Closes those gaps:

  • WorldCupMatchesRepository: a null body from the client (returned when
    the underlying network / API call was caught as an exception, including
    5xx) is now a failure instead of an empty success. The middleware now
    dispatches LoadFailed instead of an empty MatchCardStateUpdated that
    cleared errorState as a side effect.
  • SportsWidgetMiddleware: take an isOnline lambda and short-circuit
    fetchAndBuild to FetchFailed(ConnectionInterrupted) before invoking the
    repository. Wired in Components.kt via ConnectivityManager.isOnline(),
    so every dispatch site (HomeFragment, controller, debug-tool toggles,
    Apply button, override updates) produces the right error variant without
    its own connectivity check.
  • HomeFragment.onResume: also dispatch ConnectionInterrupted in the
    countdown phase (pre-7-day) when offline, so cold-open offline replaces
    the inert countdown promo with the error card.
  • SportsWidget.sportsCardPages: when errorState is set the pager always
    leads with the error card, replacing the FollowTeam / Countdown-with-
    Follow-CTA / Following promos. If no live match exists anywhere in
    matchCardStates, collapse to a single error card and suppress all match
    cards. Live matches keep MatchBody's existing in-line swap.
  • WorldCupMatchesRepositoryTest: updated for the new contract.

Original Revision: https://phabricator.services.mozilla.com/D302140

Attachment #9591770 - Attachment description: WIP: Bug 2041705 - Surface the sports widget error card in every failure mode → Bug 2041705 - Surface the sports widget error card in every failure mode
Attachment #9591770 - Flags: approval-mozilla-release+
Whiteboard: [fxdroid][group3][world-cup-phase2]

Verified as fixed on the latest Firefox for Android Beta 152.0b6, and 151.0.3 build 1, using a Pixel tablet (Android 16), and a Samsung Galaxy A56 (Android 16).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
QA Whiteboard: [qa-triage-done-c153/b152]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: