Skip to content

Fix auto ping status sequence to prevent countdown timer conflicts#26

Merged
MrAlders0n merged 2 commits intomainfrom
copilot/fix-auto-ping-status-behavior
Dec 17, 2025
Merged

Fix auto ping status sequence to prevent countdown timer conflicts#26
MrAlders0n merged 2 commits intomainfrom
copilot/fix-auto-ping-status-behavior

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 17, 2025

Auto ping status messages appeared out of order: "Waiting for API post" immediately followed by "Sending auto ping..." because the countdown timer's updateAutoCountdownStatus() continued running during the ping cycle, overwriting in-flight status updates.

Changes

  • Stop countdown timer when ping starts: Added stopAutoCountdown() call at entry to sendPing() in auto mode to prevent timer from overwriting status during ping operations
  • Set initial status explicitly: Display "Sending auto ping..." immediately when auto ping begins, before GPS and message operations
  • Normalize status message text: Changed "Waiting to post to API" to "Waiting for API post" for consistency

Flow

// Before: timer kept running, overwrote statuses mid-ping
updateAutoCountdownStatus() // runs every 1s, shows "Sending auto ping..." when remainingMs <= 0
   conflicts with "Waiting for API post" during 7s API delay

// After: timer stopped during ping, restarts only after completion
sendPing(false)
   stopAutoCountdown() // lines 476
   "Sending auto ping..."
   "Waiting for API post" (+100ms)
   API call (+7000ms)
   scheduleNextAutoPing()  startAutoCountdown() (+8000ms)
   "Waiting for next auto ping (30s)"

The countdown now properly pauses during active ping operations and resumes only when scheduleNextAutoPing() is called after the full ping cycle completes.

Original prompt

Since the last merge the auto ping behaviour is now working correctly but the status seems werid. It goes from Waiting for API post to sending auto ping... immediatly. What is sending auto ping? When the timer runs out it should go:

Sending auto ping -> Waiting for API post -> waiting for next auto ping


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix auto ping status transition issues Fix auto ping status sequence to prevent countdown timer conflicts Dec 17, 2025
Copilot AI requested a review from MrAlders0n December 17, 2025 23:55
@MrAlders0n MrAlders0n marked this pull request as ready for review December 17, 2025 23:55
@MrAlders0n MrAlders0n merged commit 430aeee into main Dec 17, 2025
@MrAlders0n MrAlders0n deleted the copilot/fix-auto-ping-status-behavior branch December 18, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants