From 16de27b3389ecf6d570b4030367e2341e56e47b4 Mon Sep 17 00:00:00 2001 From: ccsang Date: Sat, 7 Mar 2026 09:21:10 +0000 Subject: [PATCH] feat: implement Pomodoro Timer with background audio support Bounty: #1 (00) ## Features - Single HTML file, no external dependencies - Web Audio API for reliable background audio - Graceful permission handling with Chrome recovery instructions - Input validation (1-999 minutes) - ARIA labels and keyboard navigation - Visual state feedback (Running/Paused/Ready) ## Testing All test scenarios passed: - Background audio plays when tab is minimized - Timer continues when tab is inactive - Graceful permission handling - Input validation ## Technical Highlights - Audio scheduled at start time using Web Audio clock - Works even with JS timer throttling in background tabs - Auto-reset to original time after completion --- submissions/pomodoro-timer/README.md | 68 ++++ .../pomodoro-timer/pomodoro-timer.html | 345 ++++++++++++++++++ 2 files changed, 413 insertions(+) create mode 100644 submissions/pomodoro-timer/README.md create mode 100644 submissions/pomodoro-timer/pomodoro-timer.html diff --git a/submissions/pomodoro-timer/README.md b/submissions/pomodoro-timer/README.md new file mode 100644 index 0000000..29872bf --- /dev/null +++ b/submissions/pomodoro-timer/README.md @@ -0,0 +1,68 @@ +# Pomodoro Timer Solution + +Bounty: https://github.com/AkongaLabs/OSS-bounties/issues/1 + +## Solution Overview + +Single HTML file implementation of a Pomodoro timer with reliable background audio notifications. + +## Features Implemented + +### Core Functionality +- Configurable timer input (1-999 minutes) +- MM:SS format countdown display +- Start/Pause/Reset controls +- Notification sound on completion +- Auto-reset to original time after completion + +### Critical: Background Audio +- Web Audio API for background playback +- Sound plays even when tab is minimized/background +- Audio scheduled at start time (not dependent on throttled timers) + +### Input Validation +- Range validation (1-999 minutes) +- Whole number validation +- Clear error messages + +### Error Handling +- Graceful degradation if audio fails +- Chrome permission recovery instructions +- Persistent "sound blocked" indicator + +### Accessibility +- Keyboard navigation (Tab, Space, R key) +- ARIA labels on all controls +- Screen reader friendly +- Good color contrast + +### Visual Feedback +- Running/Paused/Ready states +- Sound status indicator +- Visual pulse animation on completion + +## Testing + +All test scenarios passed: +1. Background audio plays when tab is minimized +2. Timer continues when tab is inactive +3. Graceful permission handling +4. Input validation + +## Usage + +1. Open pomodoro-timer.html in Chrome +2. Set timer duration (1-999 minutes) +3. Click Start +4. Timer will notify with sound when complete + +## Technical Notes + +- Single HTML file with embedded CSS/JS +- No external dependencies +- Uses Web Audio API for reliable background audio +- Target: Chrome desktop + +## Bounty Payment + +Binance (USDT/USDC) - $200 diff --git a/submissions/pomodoro-timer/pomodoro-timer.html b/submissions/pomodoro-timer/pomodoro-timer.html new file mode 100644 index 0000000..3c1d8f3 --- /dev/null +++ b/submissions/pomodoro-timer/pomodoro-timer.html @@ -0,0 +1,345 @@ + + + + + + Pomodoro Timer + + + +
+

Pomodoro Timer

+
+ + +
+
25:00
+
Ready
+
Sound: idle (click Start to enable)
+ +
+ + + +
+
+ + +