Repository navigation
feat: notify when a focus session or break ends - #14
Merged
Merged
Conversation
## Summary System notifications when a timer runs out on its own: - "Focus session complete" with the goal, when a focus countdown ends. - "Break is over", when a break countdown ends. They only appear while the timer tab is out of view (the end bell covers the visible case), are silent because the bell already plays, reuse one tag so they replace instead of stack, and clicking one focuses the timer. Permission is requested on the first Start Focus / Start Break, since browsers only allow the request from a user gesture; a denial is respected. The extension manifest gains the `notifications` permission so extension pages can notify without a prompt. ## Testing - Lint, typecheck, unit tests and build pass. - In the browser with a hidden tab: 1-minute focus and break sessions each produced the right notification; permission was requested once.
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.
Summary
System notifications when a timer runs out on its own:
They only appear while the timer tab is out of view (the end bell covers the visible case), are silent because the bell already plays, reuse one tag so they replace instead of stack, and clicking one focuses the timer. Permission is requested on the first Start Focus / Start Break, since browsers only allow the request from a user gesture; a denial is respected. The extension manifest gains the
notificationspermission so extension pages can notify without a prompt.Testing