Add Smart data checking mode

This commit is contained in:
FuelBoard Contributor
2026-08-29 13:48:08 +01:00
parent 50036c8a67
commit 457816ec61
9 changed files with 226 additions and 9 deletions
+13 -6
View File
@@ -113,12 +113,19 @@ Status: TODO / IN PROGRESS / DONE / BLOCKED.
action in the Alerts tab that forces a fetch and immediately re-evaluates the
cheapest-favourite alert. Copy should set expectation honestly: standard
mode checks when FuelBoard refreshes prices (up to twice daily).
- [ ] **Price-drop alerts: optional frequent-check mode**if the app ever
relaxes the current "twice daily max" data policy, expose this as a clearly
separate mode rather than a freeform frequency slider. Example framing:
`Standard` (current behaviour) vs `Frequent` (best-effort extra checks),
with conservative caps (e.g. every 46 h, not hourly) and copy that does not
promise exact timing under iOS background scheduling.
- [ ] **Data checking mode: Standard vs Smart**keep the current cache-first
/ 12 h policy as `Standard`, and add an optional `Smart` mode in Settings.
`Smart` should try lightweight background checks of the mirror pointer
(`latest.json` / `data_updated`) more often, and only download the full price
dataset when a newer snapshot is available. Design goal: better freshness
without pretending to do real-time refreshes or re-downloading the full dump
unnecessarily. User-facing copy must be explicit and honest:
- `Standard` — Saves battery. Refreshes price data up to twice daily.
- `Smart` — Checks for newer data more often in the background and refreshes
full prices only when an update is available.
Add a footnote/subcopy that background checks are best-effort and happen only
when iOS allows, so timing is not exact. Prefer this 2-mode setting over a
freeform frequency slider.
- [ ] **Pull-to-refresh spinner state** — surface refresh in-flight state
(currently `refreshable` fires but no visible progress in the row list).
- [x] **Offline first-run** — bundled REAL 8,022-station dump (`FuelBoardDump`,