feat(pomodoro): Pomodoro timer app (spec + plan + ADR + implementation)#1
Open
TheBeege wants to merge 2 commits into
Open
feat(pomodoro): Pomodoro timer app (spec + plan + ADR + implementation)#1TheBeege wants to merge 2 commits into
TheBeege wants to merge 2 commits into
Conversation
…ntation Implements specs/2026-05-30-pomodoro-timer.md (Ratified → Delivered). The app runs with `python3 server.py` on a stock Python install; no external packages, no build step, no database. All timer logic is client-side vanilla JS using a wall-clock anchor (Date.now()) so background-tab throttling reduces UI refresh rate without accumulating timing drift. Files added: - index.html / app.js / styles.css — single-page Pomodoro SPA - server.py — Python stdlib ThreadingHTTPServer, directory-anchored, Cache-Control: no-store - tests/test_cycle.html — self-running pure-logic test harness (25 tests, 0 failures) - adr/2026-05-30-client-side-timer-static-server.md — records the client-side timer + static-server architecture decision (status: Proposed) - specs/ and plans/ artifacts committed alongside the code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…de, ADR status P1: signalTransition() now captures the completed interval's label before calling nextInterval(), so the aria-live announcement correctly reads "<completed> — interval complete. <next> starting next." (was using the next label for both sides). Added a test assertion that confirms the completed and next labels differ for a Work → Short Break transition. P3: Remove dead _skipInProgress flag from skip(); completeInterval() already sets phase='idle' synchronously, making the flag unreachable. Remove unused `import sys` and the no-op log_message override from server.py. P2: Mark ADR 2026-05-30-client-side-timer-static-server as Accepted (this branch implements and is merge-ready) in both the ADR file and the README index, per adr/README.md lifecycle rules. 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.
Summary
specs/2026-05-30-pomodoro-timer.md(spec is nowDelivered).python3 server.py) on stock Python — no packages, no build step, no database.Files changed
index.html#time-remaining,#interval-type,#cycle-progress,#btn-*,#app[data-interval],aria-liveregions)app.jsnextInterval,formatMMSS) exposed onwindow.Pomodorofor testabilitystyles.cssserver.pyThreadingHTTPServer+SimpleHTTPRequestHandlersubclass; directory-anchored;Cache-Control: no-store; respectsPORTenv; clean Ctrl+Ctests/test_cycle.htmladr/2026-05-30-client-side-timer-static-server.mdspecs/2026-05-30-pomodoro-timer.mdplans/2026-05-30-pomodoro-timer.mdREADME.mdadr/README.mdIntentional interface/contract changes
This is greenfield — no existing contracts are altered. The contracts introduced:
#time-remaining,#interval-type,#cycle-progress,#btn-start/pause/skip/reset,#app[data-interval]) — stable; tests depend on them.window.Pomodoronamespace exposingformatMMSS,nextInterval,getState,setNow, and control functions for the test harness.server.pyhonoursPORTenv var (default 8000) and serves files from the script's directory.ADRs added
adr/2026-05-30-client-side-timer-static-server.md(status:Proposed) — records the decision to keep all timer state client-side and reduce the Python backend to a stdlib static file server. Documents alternatives rejected (server-authoritative timer, frameworks, counter-decrement countdown, JSON persistence).Verification results
python3 -m py_compile server.pycurl /,/app.js,/styles.css,/tests/test_cycle.htmlCache-Control: no-storeheader presentSpec / Plan
specs/2026-05-30-pomodoro-timer.mdplans/2026-05-30-pomodoro-timer.md🤖 Generated with Claude Code