Skip to content

Hide rest timer immediately on expiry instead of showing expired state#30

Merged
willchan merged 2 commits intomainfrom
claude/fix-timer-hiding-fSwek
Mar 19, 2026
Merged

Hide rest timer immediately on expiry instead of showing expired state#30
willchan merged 2 commits intomainfrom
claude/fix-timer-hiding-fSwek

Conversation

@willchan
Copy link
Owner

No description provided.

claude added 2 commits March 19, 2026 22:46
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
@willchan willchan merged commit 1e618b2 into main Mar 19, 2026
1 check passed
@willchan willchan deleted the claude/fix-timer-hiding-fSwek branch March 19, 2026 23:06
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