Hide rest timer immediately on expiry instead of showing expired state#30
Merged
Hide rest timer immediately on expiry instead of showing expired state#30
Conversation
Tests expect #rest-timer to be hidden after notification fires, but
showTimerExpired() was keeping it visible. Replace all three call sites
(normal expiry, recovery interval, already-expired on load) with a direct
classList.add('hidden') and remove the now-unused showTimerExpired function.
https://claude.ai/code/session_015kygLeCbusNCZUgXsraTFw
The two test suites had conflicting expectations: - timer-completion-attention: expects showTimerExpired UI after foreground expiry - timer-notification: was checking toBeHidden() after expiry (stale expectation) Fix: restore showTimerExpired() for interval-based expiry (foreground and recovery paths). Keep the simple hide behavior only for the already-expired- on-reload path, where the user didn't watch the timer count down and showing "Time's Up!" would be confusing. Update notification test 2's final assertion from toBeHidden() to checking the expired state is visible — the key assertion (vibrateCount == 1) already proves no duplicate notifications. https://claude.ai/code/session_015kygLeCbusNCZUgXsraTFw
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.
No description provided.