Earnings: provider Demand chart and Why? stay blank until the next minute poll
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 62/100
Hướng nghiên cứu
Start in the Earnings screen's onRefresh and in providerStatusDisplay(), which sets why = false when the snapshot is absent. Wire the existing vc.refresh() on ProviderStatusViewController into pull-to-refresh, then add a retry action to the chart's unavailable state. Done when pull-to-refresh re-polls provider status and a failed Demand chart can be retried without waiting for the next minute tick.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
On Earnings, the provider stats block's Demand histogram often fails to load, and the expandable Why? under it disappears with it. It comes back only after several pull-to-refresh gestures (scroll to the top, drag down, scroll back to check), which makes the section feel broken.
Cause
The two panels are one state, not two bugs: providerStatusDisplay() sets why = false whenever the snapshot is absent, so the Why? goes with the chart.
That snapshot comes from the SDK's ProviderStatusViewController, which polls GET /network/provider-status once at start and then about once a minute. On a failed poll it retries at its next interval, not sooner (step() stamps nextPollAt when it launches the fetch).
The Earnings pull-to-refresh does not touch that controller. Its onRefresh refreshes account points, wallet, epochs, claims, settlements and consent — not provider status. So the gesture cannot affect this section, and the apparent "recovery" is the next 60-second tick landing while the user is scrolling.
ProviderStatusViewController.Refresh() exists (cgo urn_provider_status_view_controller_refresh, Kotlin vc.refresh()) but nothing in the app calls it.
Two things make that first poll fail more often than it should:
- The chart's unavailable state has no action, so there is no way to ask again before the interval.
GET /network/provider-statusanswers503 Cached response is temporarily unavailable.withRetry-After: 5to concurrent or post-failure callers while a cache fill lease is held, and the SDK ignores the hint. Admission and ranking are also cached for 5 minutes.
Suggested fix
- Call
vc.refresh()from the screen's pull-to-refresh, and offer a retry in the chart's unavailable state — ideally only where asking again can change the answer (a failed poll or a missing histogram, not "this device is not a provider client", which the server caches for minutes). - Optionally, retry a failed first poll after a few seconds, bounded, instead of waiting the full interval.
Repro
Providing enabled (provide mode not Never) → open Earnings → scroll to Provider statistics. With a brief network interruption around app start, the Demand chart shows "Provider status isn't available right now", the Why? is absent, pull-to-refresh does nothing, and the section recovers on its own about a minute later.
The iOS client has the same limitation
Checked against urnetwork/apple main. It is not a platform difference — the same shape is there:
ProviderStatusPresentation.swiftreturnsshowsWhy: falsewhen the snapshot is not loaded or has no row for the device, so the Why? goes with the chart exactly as on Android.EarningsView.swift.refreshable { await refresh() }refreshes the wallet, epochs and subnet, not the provider status.- The
ProviderStatusControllingprotocol inProviderStatusStore.swiftexposes onlystart,stop,addStatusListenerandreadSnapshot— no force-poll at all, so a fix there needs arefresh()added to the protocol or a controller restart to force the poll.
- Ngôn ngữ chính
- Kotlin
- Star
- 224
- Fork
- 14
- Merge trung bình
- 55 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của urnetwork/android
-
urnetwork vpn IssueĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
-
Verify change from cell to WiFiCó thể làm lại được @Ryanmello07 đã nhận 73 ngày trước và không có pull request nào đang mở. Đang mở
-
DebuggingCó thể làm lại được @Ryanmello07 đã nhận 73 ngày trước và không có pull request nào đang mở. Đang mở
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
WebRTC leakĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của urnetwork/android
Issue tương tự
-
unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
thunderbird/thunderbird-android#11893 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
Droid-Deck/DroidDeck#2198 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
world-federation-of-advertisers/cross-media-measurement#4846 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
autoteam community connectors/destination/mssql connectors/source/hubspot team/use
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
airbytehq/airbyte#91201 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày