Fix auto countdown not resuming after manual ping blocked during auto mode#110
Conversation
When a manual ping is blocked (GPS stale, outside geofence, or too close to last ping) during auto mode, the UI now resumes the auto ping countdown instead of staying stuck on the skip message. Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Created handleManualPingFailureDuringAutoMode() helper function to eliminate code duplication across three manual ping failure paths. Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Added comprehensive JSDoc comments to handleManualPingFailureDuringAutoMode() following codebase conventions. Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Renamed handleManualPingFailureDuringAutoMode to handleManualPingBlockedDuringAutoMode to better reflect that it handles blocked pings, not failures. Updated JSDoc to clarify it handles GPS unavailable, geofence, and distance checks. Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
|
@copilot You said this and I just want to confirm you understood and did not make unnessary changes However, the problem is that when manual ping is blocked during auto mode, the auto countdown was already paused at line 858. The paused auto countdown needs to be resumed after the manual ping is blocked, but this doesn't happen. Let me check the flow more carefully: No no, it looks to me like the auto ping is resumed because then later on an auto ping is sent however the resumed countdown is not displayed to the user |
You're correct! I understood the issue properly: Before the fix: The auto ping timer continued running in the background (so auto pings were eventually sent), but the countdown display was not shown to the user - the UI stayed stuck on "Ping skipped, too close to last ping". After the fix: When a manual ping is blocked during auto mode, The key was resuming the countdown display (via Commit: 8491055 |
When auto mode is active and a manual ping gets blocked (GPS stale, outside geofence, or too close to last ping), the UI gets stuck showing the skip message instead of resuming the auto countdown.
Changes
handleManualPingBlockedDuringAutoMode()that resumes paused auto countdown when manual ping is blockedImplementation
The fix resumes the paused auto countdown after a manual ping is blocked, allowing the skip reason to be displayed within the countdown message:
Applied at all manual ping validation failure points:
Behavior
Before: UI stuck on "Ping skipped, too close to last ping" with no countdown visible
After: UI shows "Ping skipped, too close to last ping, waiting for next ping (11s)" with countdown resuming immediately
The skip reason persists in the countdown message until the next auto ping attempt.
Screenshot
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.