Add Pomodoro Timer with reliable background audio - #15
Open
GautamKumarOffical wants to merge 1 commit into
Open
Conversation
Single HTML file with Web Audio API for background tab audio support. Uses Date.now() deadlines for accurate timing when tab is inactive. Includes input validation, keyboard navigation, ARIA labels, and visual/audio completion notifications. Signed-off-by: GautamKumarOffical <gautamkumaroffical@gmail.com>
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.
Bounty Solution Submission
Closes #1
Problem Statement
Build a minimal pomodoro timer web app prototype focused on reliable background audio notifications in Chrome browser. The main challenge is ensuring the notification sound plays even when the Chrome tab is in the background or minimized.
Solution Approach
Single
pomodoro-timer.htmlfile with embedded CSS/JS, zero external dependencies. Uses Web Audio API (AudioContext + OscillatorNode) for background-tab-safe audio, andDate.now()absolute deadlines so the timer stays accurate even when Chrome throttles inactive tabs.Key decisions:
Date.now() + durationinstead of decrementing a counter means the timer catches up after any throttlingrequestAnimationFramefor smooth visible-tab updates + 1-secondsetIntervalfallback for background accuracyTechnical Implementation
pomodoro-timer.htmldirectly in ChromeTesting Evidence
Demo Evidence
pomodoro-timer.htmllocally, open in ChromeSetup Instructions
pomodoro-timer.htmlfrom this PRDatabase Setup
Not applicable — no database needed
Architectural Decisions
Browser Limitations
Documented in
docs/browser-limitations.md:Pre-submission Checklist:
I confirm this submission meets all requirements and is ready for review.
@adrianmurage