Skip to content

feat: notify when a focus session or break ends - #14

Merged
ttncode merged 1 commit into
mainfrom
feat/notifications
Oct 11, 2026
Merged

ttncode merged 1 commit into
mainfrom
feat/notifications

Conversation

@ttncode

@ttncode ttncode commented Oct 11, 2026

Copy link
Copy Markdown
Owner

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.

## 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.
@ttncode
ttncode merged commit fc68541 into main Oct 11, 2026
2 checks passed
@ttncode
ttncode deleted the feat/notifications branch October 11, 2026 15:01
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.

1 participant