Repository navigation
feat(notifications): F022 browser rest timer and session reminder notifications - #111
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Phase 1 (Web Notifications API, tab-open only): - rest timer expiry notification via onExpired callback on startRestTimer - session reminder polling hook with 60s setInterval - settings UI permission status display and copy updates Out of scope: service workers, Web Push, Tauri changes (Phase 2 backlog)
…ifications Extends the browser notification path to cover rest timer alerts and session reminders, bringing browser parity with the Tauri native experience for in-tab usage. - active-workout-store: add _onRestExpired callback to startRestTimer; fires on natural expiry, silently cleared on skip/cleanup/finish/discard - notification-service: add sendRestTimerNotification and sendSessionReminderNotification with contextual permission requests (D-4) - use-active-workout: wire onExpired callback in confirmSet, reading prefs async and passing exercise/set context to the notification - use-session-reminder-browser: new 60s polling hook with Supabase queries for active program, today's session, and logged workouts; once-per-day guard - _authenticated: mount useSessionReminderBrowser in authenticated layout - notification-settings: add BrowserPermissionStatus (granted/default/denied), remove "requires native app" gate, add "tab must remain open" note Tasks: S001, S002, S003, S004, S005, S006 Feature: 022-Browser-Notifications
…open questions - Steps.md: status -> Complete, last milestone updated - Spec.md: mark open questions resolved, document advanceMinutes Phase 1 limitation (no session time-of-day column, matches Rust behavior), add revision history entry Feature: 022-Browser-Notifications
… guard correctness - P16-001: Capture err in bare catch in getNotificationPreferences JSON parse - P16-002: Add .catch() to discarded sendRestTimerNotification Promise in onExpired callback - P16-003: Wrap new Notification() constructor in try/catch in all three send functions - P16-004: Set _lastRemindedDate before firing notification to prevent Supabase query spam on failure - P16-005: Switch setNotificationPreferences to safeParse with prefixed error log - P16-006: Log console.error in update() guard clause before silent return - P16-007: Use local calendar date (not UTC) for once-per-day reminder guard - P16-008: Extract session_templates coercion with warn log when join returns no name - P16-010: Add unmounted flag to BrowserPermissionStatus to prevent listener leak on unmount race Review: Context/Reviews/0016-pr111-f022-browser-notifications-review.md
…rror branch tests Review: Context/Reviews/0016-pr111-f022-browser-notifications-review.md
…session reminder Add five tests covering all per-query error paths (activationErr, blockErr, weekErr, sessErr, logErr) in use-session-reminder-browser. Each test asserts the [session-reminder-browser] console.error fires with the correct prefix and that sendSessionReminderNotification is not called. Tasks: S008-T Feature: 022-Browser-Notifications
rghamilton3
force-pushed
the
worktree-feat+browser-notif
branch
from
April 15, 2026 20:32
8fda7e5 to
1ef9232
Compare
This branch was successfully deployed
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
Changes
active-workout-store.ts_onRestExpiredcallback: fires on expiry, silent on skip/cleanup/finish/discardnotification-service.tssendRestTimerNotification+sendSessionReminderNotificationwith contextual permission requestsuse-active-workout.tsconfirmSetpassesonExpiredcallback + exercise/set context tostartRestTimeruse-session-reminder-browser.ts_authenticated.tsxuseSessionReminderBrowser()in authenticated layoutnotification-settings.tsxBrowserPermissionStatus(granted/default/denied states), updated session reminders copyKnown limitation
advanceMinutesis not consumed in Phase 1 (no time-of-day column onscheduled_sessions). Matches Rust behavior. Documented in Spec.md. Will be addressed when session time fields are added.Test plan
bun run test-- 2508/2508 passingbun run lint-- cleanbun run build-- TypeScript + Vite build clean