Commit Graph
19 Commits
Author SHA1 Message Date
FuelBoard Contributor 1ff14607c5 Widget tap relay via fuelboard:// scheme; full station names; no check-again
- WidgetKit widgets can only open their containing app — the Link URL is
  delivered to FuelBoard via onOpenURL, never opened directly in Maps. The
  widget now links to a registered fuelboard://directions?lat=&lng= URL,
  and FuelBoardApp forwards it to native maps://?daddr= directions.
  (http://maps.apple.com and raw maps:// both silently dropped in-app.)
- Widget rows (small + medium) now show the full station name (station.name)
  instead of just the brand.
- Onboarding network page: removed the 'Check again' secondary screen after
  the Local Network prompt — Open Settings remains the only retry path.
  35 tests pass.
2026-08-12 12:54:08 +01:00
FuelBoard Contributor 9ce0c83d66 Widget opens Maps via maps://; onboarding prompts after Continue; forced first fetch
- Widget tap-to-directions now uses the native maps:// scheme instead of
  http://maps.apple.com. The universal-link http URL failed to open from a
  widget and fell back to launching the containing app; maps:// opens
  Apple Maps directly for both small (whole widget) and medium (per row).
- Onboarding: removed the Skip button (mandatory flow), and system prompts
  (location, notifications, local network) now fire only when the user taps
  Continue/Allow on each page — not when the page appears. Pages
  auto-advance once a permission is granted.
- After 'Start Using FuelBoard' the first data fetch is forced, so a
  reinstall that leaves a recent lastRefresh in app-group defaults can no
  longer skip the fetch and leave the station list empty. 35 tests pass.
2026-08-12 12:41:19 +01:00
FuelBoard Contributor 1f50d7dcf4 Tied cheapest stations become notification action buttons
When several stations share the cheapest price within the radius (within
0.01p), the alert registers a dynamic UNNotificationCategory with up to
4 action buttons (brand + distance, nearest first) and taps open
directions to the chosen station. Shared FuelStore.tiedStations helper
used by both the live geofence path and the Settings real-data test;
35 tests pass.
2026-08-12 10:48:08 +01:00
FuelBoard Contributor 46d5d45c93 Alerts choose their own fuel, independent of the Stations tab
The proximity monitor was tied to the Stations-tab fuel selection, so
switching the list to another fuel silently re-targeted geofences. Now the
Alerts tab has its own 'Fuel to monitor' picker (persisted as
fuelboard.alertsFuel):
- Monitor reads loadAlertsFuel() on init/background relaunch
- Changing the alerts fuel re-registers geofences around stations selling
  that fuel only
- Favourites priority slots stay scoped to the monitored fuel
- Tests: alerts fuel round-trip + default (33/33 passing)
2026-08-12 08:51:31 +01:00
FuelBoard Contributor 35e0adaf0b Favourites are fuel-scoped: starring pins the station for one fuel only
Fixing the bug where favouriting an Unleaded entry also created a Diesel
favourite. Favourites are now [FavouriteEntry] = (station, fuel) pairs:
- Starring a row pins it only for the fuel being viewed
- Favourites tabs show only fuels that actually have favourites
- Geofence monitor gives priority slots only to favourites matching the
  monitored fuel
- Tests updated + new fuel-scoping test (31/31 passing)
2026-08-12 08:31:08 +01:00
FuelBoard Contributor 44c6c38536 Add Settings tab: distance units toggle, onboarding replay, £4.99 tip; drop E10/E5 from labels
- FuelType labels: 'Unleaded (E10)'/'Premium (E5)' -> 'Unleaded'/'Premium'
- New DistanceUnit (miles/km) preference; all app + widget distances,
  radii and alert text convert/display in the chosen unit
- Settings tab (4th tab): segmented miles/km picker, 'Show introduction'
  replay button (onboarding moved out of Alerts tab), StoreKit tip £4.99
- ProximityMonitor + widget notifications use the chosen unit
- Tests: label expectations updated, DistanceUnit conversion + format tests
2026-08-12 07:46:08 +01:00
FuelBoard Contributor fb79cf0788 Add first-launch onboarding with location + notification permission prompts
- OnboardingView: 4-page flow (welcome + features, location, notifications, done)
- Triggers system prompts in-context via OnboardingPermissionPrompter
- Shown at initial launch only (FuelStore.onboardingCompleted flag, app-group defaults)
- Test hook: 'Show onboarding (testing)' button at bottom of Alerts tab
2026-08-12 07:10:54 +01:00
FuelBoard Contributor 05f3ef0a70 Add (E10)/(E5) bracket labels to Unleaded/Premium in picker and descriptions 2026-08-11 22:41:50 +01:00
FuelBoard Contributor aee890e2a8 Title-case station names: fix Sainsbury's apostrophe, lowercase/mixed names, hyphen/paren chunks, acronyms; re-sanitize cache on load 2026-08-11 21:23:36 +01:00
FuelBoard Contributor cf9765be7b Fetch full-UK dump (no radius/limit); stations in app-group defaults only; alert path keeps focused radius fetch 2026-08-11 19:30:02 +01:00
FuelBoard Contributor 213f93aa04 Results filter is now search radius in miles (5/10/15); relay fetch scoped to radius, limit 500; changing miles re-fetches; caption shows stations within N miles 2026-08-11 18:02:23 +01:00
FuelBoard Contributor 8230daa249 Cache-first refresh policy: auto-fetch at most twice a day (12h gate), no fetch on launch/foreground/location/fuel-switch, pull-to-refresh forces; geofences still follow location 2026-08-11 17:43:11 +01:00
FuelBoard Contributor 75629b39b5 Price right-aligned on second row; word-capitalise station titles (keep BP/MFG/ASDA) 2026-08-11 15:40:19 +01:00
FuelBoard Contributor 60d25164d6 Tabs (Stations/Favourites/Alerts): favourites with cheapest-first ranking, proximity geofence alerts (favourites priority, 3km default radius, 1h dedup), Always location + background mode 2026-08-11 15:17:26 +01:00
FuelBoard Contributor d220023917 Round brand logos in station rows: 11 bundled assets (Simple Icons + Wikimedia), fuel-pump fallback for unknown brands 2026-08-11 15:00:26 +01:00
FuelBoard Contributor acb5c33578 Remove Location status section; add 10/25/50/75/100 station limit picker; refresh location every foreground 2026-08-11 14:41:39 +01:00
FuelBoard Contributor d9ec2f8c35 Sort toggle (cheapest/closest) + RAG value rating per station with TOP badge 2026-08-11 14:14:07 +01:00
FuelBoard Contributor 4f5f1999a9 Location-driven results: widget fetches its own location (async, cache fallback), app auto-requests on first launch, Halifax sample stations 2026-08-11 14:03:41 +01:00
FuelBoard Contributor b0a5b5a326 Scaffold FuelBoard: petrol price widget + app (sample data, Maps deep-links, provider seam for Fuel Finder API) 2026-08-11 13:54:56 +01:00