Earnings: provider Demand chart and Why? stay blank until the next minute poll
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Kotlin
- Estrellas
- 224
- Forks
- 14
- Merge medio
- 55 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de urnetwork/android
-
urnetwork vpn IssueAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
-
Verify change from cell to WiFiQuizá libre de nuevo @Ryanmello07 la tomó hace 73 días y no hay ningún pull request abierto. Abierto
-
DebuggingQuizá libre de nuevo @Ryanmello07 la tomó hace 73 días y no hay ningún pull request abierto. Abierto
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
WebRTC leakAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de urnetwork/android
Issues similares
-
autoteam community connectors/destination/mssql connectors/source/hubspot team/use
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
airbytehq/airbyte#91201 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Source: c7 Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
2.23
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ankidroid/Anki-Android#23042 · 4 comentarios ·
Los mantenedores suelen responder en 1 día