Fix distance filtering persistence and add geofence debugging#39
Merged
Conversation
Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix distance-based ping filtering and Ottawa regional geofence
Fix distance filtering persistence and add geofence debugging
Dec 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Distance-based ping filtering (25m) was not persisting error state - button became unclickable but status cleared prematurely. Geofence (150km) wasn't blocking pings from London (5361km away).
Changes
Distance Filtering
checkLocationRestrictions()running every 1s to continuously monitor location vs last ping"Haven't moved far enough. Need X.Xm more"until user moves ≥25m"Haven't moved far enough (need X.Xm), waiting for next ping (Xs)"with countdowntooCloseToLastPing/outsideGeofencecentrally managed to avoid race conditionsGeofence Debugging
lat == nullinstead of!latto allow 0 coordinates)State Management
sendPing()-checkLocationRestrictions()is now single source of truthTesting
Console will show detailed geofence logs on dev. If London pings still succeed, logs will reveal why (likely browser cache, GPS permission denied, or deployment timing).
Distance reference: Ottawa 0km ✅, Kingston 146km ✅, Montreal 166km ❌, London 5361km ❌
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.