Repository navigation
Conversation
A stray click on the window's X shut Ultra Tracker down mid-event, dropping the RFID connection. Closing the window now asks first, with Cancel as the default. Deliberate quits (menu quit, the updater's restart, OS shutdown) skip the prompt. The prompt notes the RFID reader and OpenSplitTime only when they are connected, since each needs reconnecting after a restart. Closes #436 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #436
What
Clicking the window's X, pressing Alt+F4, or using Window → Close now asks before Ultra Tracker shuts down:
Cancel is the default and the cancel button, so Enter or Esc keeps the app open.
No prompt for deliberate quits:
before-quit)session-endon the window), so the prompt never blocks a shutdownHow
src/main/lib/confirm-close.ts:confirmBeforeClosing(window)hooks the window'scloseevent and uses a synchronousshowMessageBoxSync, so a double-click on X can't stack two promptsGetRFIDStatus()and OpenSplitTimegetAuthStatus()at the moment the prompt openscreateWindowcalls it for the main windowTests
confirm-close.test.ts(9 tests): cancel keeps the window, quit callsapp.quit, Cancel is the default,before-quitandsession-endskip the prompt, and the detail wording with and without RFID and OST.index.test.tschecks the main window is wired up. The fullsrc/mainsuite passes (813 tests).The prompt and its wording were reviewed in the app. The RFID, OpenSplitTime, updater, and shutdown paths are covered by the tests only.
🤖 Generated with Claude Code