[Homepage Sports Widget] [phase2] No internet connection error is displayed if no team has been selected
Categories
(Firefox for Android :: Homepage, defect)
Tracking
()
People
(Reporter: ljanos, Assigned: skhan)
References
Details
(Whiteboard: [fxdroid][group3][world-cup-phase2])
Attachments
(2 files, 3 external files)
Steps to reproduce
- Enable "Homepage Sports Widget" feature from Secret Settings.
- Set the date and time of the device between 4th-10th of June 2026.
- 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
| Reporter | ||
Updated•5 months ago
|
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.
Updated•5 months ago
|
Comment 5•5 months ago
|
||
| bugherder | ||
Comment 6•5 months ago
|
||
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
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
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
| Reporter | ||
Comment 9•5 months ago
|
||
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.
| Reporter | ||
Updated•5 months ago
|
| Reporter | ||
Updated•5 months ago
|
| Assignee | ||
Comment 10•5 months ago
|
||
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
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 11•5 months ago
|
||
| uplift | ||
Updated•5 months ago
|
Comment 12•5 months ago
|
||
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).
Updated•5 months ago
|
Description
•