feat(pomodoro): zero-dependency vanilla Pomodoro timer#3
Open
TheBeege wants to merge 1 commit into
Open
Conversation
Delivers the full Pomodoro timer web app per spec 2026-05-30-pomodoro-app.md. Three static files (index.html, styles.css, app.js) work via file:// and any static server with no build step, no CDN, and no runtime dependencies. Key behaviors implemented: - 25/5/15-minute Work/Short-Break/Long-Break cycle with Long Break every 4th work - Start/Pause/Resume toggle, Reset (no cycle advance), Skip (no Pomodoro credit) - Wall-clock-derived countdown (endAtMs reference) prevents cumulative drift - End-of-interval: synthesized Web Audio beep + CSS flash animation; visual cue fires independently of audio so browser autoplay suppression is handled safely - Completed-Pomodoro counter; no auto-start after transition (waits for Start) - ARIA live region announces transitions; role="timer" on countdown; no color-only interval signaling; visible :focus-visible ring on all buttons - No localStorage, no Notification API, no network requests ADRs added: - adr/2026-05-30-vanilla-single-page-no-build.md (Accepted) - adr/2026-05-30-walltime-drift-free-countdown.md (Accepted) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
What and why
Implements a self-contained Pomodoro timer web app as a set of three static files
(
index.html,styles.css,app.js) with zero build tooling, zero runtimedependencies, no CDN, and no external assets. The app opens directly via
file://andworks on any static server. Closes spec
specs/2026-05-30-pomodoro-app.md.Files changed
index.htmlstyles.cssdata-intervalattribute, flash animation, focus stylesapp.jsspecs/2026-05-30-pomodoro-app.mdDeliveredplans/2026-05-30-pomodoro-app.mdadr/2026-05-30-vanilla-single-page-no-build.mdadr/2026-05-30-walltime-drift-free-countdown.mdadr/README.mdIntentional interface / contract changes
Greenfield feature — no existing interfaces changed.
The three filenames and their relative co-location are the observable contract:
index.html→styles.css+app.jsmust stay siblings forfile://to work.ADRs added
adr/2026-05-30-vanilla-single-page-no-build.md— Accepted: three sibling static files via classic<script defer>; no ES modules (blocked underfile://), no bundler, no dependencies.adr/2026-05-30-walltime-drift-free-countdown.md— Accepted: remaining time derived fromendAtMs = Date.now() + remainingMson each tick rather than accumulated from tick deltas, preventing cumulative drift under background-tab throttling.Spec / plan
specs/2026-05-30-pomodoro-app.mdplans/2026-05-30-pomodoro-app.mdQuality gate results
node --check app.js— SYNTAX OKgrep -rIn -E "https?://|//cdn|fonts\\.|unpkg|jsdelivr|cdnjs" index.html styles.css app.js— NO EXTERNAL URLS FOUNDtest ! -e node_modules— PASS (no node_modules)test ! -e package-lock.json— PASStype="module"in any script taglocalStorage,sessionStorage,NotificationAPI usagenpx eslint— blocked by sandbox auto-mode policy;node --check(syntax gate) passed cleanly as the fallback per the planTest plan
index.htmlviafile://— displays25:00, "Work", count 0, Start button25:00, stopped, count unchanged00:00(fast-mode or wait) — count +1, beep + flash fire, Short Break loaded ready (not auto-started)25:00/Work/0 state🤖 Generated with Claude Code