Skip to content

fix: ask for notifications on first visit and keep the task after a session - #16

Merged
ttncode merged 1 commit into
mainfrom
fix/keep-goal-and-ask-notifications
Oct 11, 2026
Merged

ttncode merged 1 commit into
mainfrom
fix/keep-goal-and-ask-notifications

Conversation

@ttncode

@ttncode ttncode commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

Two fixes from daily use.

Ask for notifications on first visit. A small banner ("Get a notification when a focus session or break ends") with Allow and a dismiss button appears the first time the app opens, while the browser has not asked yet. Allow opens the browser's permission dialog (browsers only show it after a click, which the banner provides). Dismiss hides it for good. If the browser dialog is closed without a choice, the banner stays to try again. Replaces the request that used to fire on the first Start Focus.

Keep the task after a session. Reset and the end of a break used to clear the focus goal, so continuing the same task meant typing it again. The goal now stays filled in; edit or clear it when you switch tasks.

Testing

  • Lint, typecheck, unit tests and build pass.
  • Browser with a stubbed permission state: banner shows on first visit, Allow requests permission once and hides it.
  • "Write chapter 3" stayed in the goal field after Reset, and after a 1-minute focus session plus a 1-minute break.

…ession

## Summary
Two fixes from daily use.

**Ask for notifications on first visit.** A small banner ("Get a notification when a focus session or break ends") with **Allow** and a dismiss button appears the first time the app opens, while the browser has not asked yet. Allow opens the browser's permission dialog (browsers only show it after a click, which the banner provides). Dismiss hides it for good. If the browser dialog is closed without a choice, the banner stays to try again. Replaces the request that used to fire on the first Start Focus.

**Keep the task after a session.** Reset and the end of a break used to clear the focus goal, so continuing the same task meant typing it again. The goal now stays filled in; edit or clear it when you switch tasks.

## Testing
- Lint, typecheck, unit tests and build pass.
- Browser with a stubbed permission state: banner shows on first visit, Allow requests permission once and hides it.
- "Write chapter 3" stayed in the goal field after Reset, and after a 1-minute focus session plus a 1-minute break.
@ttncode
ttncode merged commit 1155272 into main Oct 11, 2026
2 checks passed
@ttncode
ttncode deleted the fix/keep-goal-and-ask-notifications branch October 11, 2026 15:24
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