Skip to content

Implement minimal Pomodoro timer UI with countdown logic - #81

Draft
moulongzhang with Copilot wants to merge 4 commits into
mainfrom
copilot/add-timer-ui-and-logic
Draft

Implement minimal Pomodoro timer UI with countdown logic#81
moulongzhang with Copilot wants to merge 4 commits into
mainfrom
copilot/add-timer-ui-and-logic

Conversation

Copilot AI commented Dec 16, 2025

Copy link
Copy Markdown

Implements a 25-minute Pomodoro timer with circular progress visualization and basic controls (start/stop/reset).

Implementation

  • timer.html: SVG-based circular progress bar, time display (MM:SS), control buttons
  • timer.css: Gradient UI with CSS variables for maintainability, state-based styling (working/stopped)
  • timer.js: Class-based timer logic with 1-second countdown, progress calculation, Web Audio API notification

Technical Details

// Reuses AudioContext to avoid resource leaks
constructor() {
  this.audioContext = new (window.AudioContext || window.webkitAudioContext)();
  // ... setup
}

// Progress calculation drives SVG stroke-dashoffset
updateProgress() {
  const progress = this.timeRemaining / this.initialTime;
  const offset = this.circumference * (1 - progress);
  this.progressCircle.style.strokeDashoffset = offset;
}

CSS variables enable computed circumference:

:root {
  --progress-circumference: 817;
}
.progress-ring-circle {
  stroke-dasharray: var(--progress-circumference);
}

Screenshots

Initial state (stopped)
Timer Stopped

Running state with countdown
Timer Running

Original prompt

This section details on the original issue you should resolve

<issue_title>ステップ1: 最小構成のタイマーUIとロジック</issue_title>
<issue_description>## 概要
最小構成のタイマーUIとロジックを実装する

タスク

  • HTML/CSS/JSで静的なタイマー画面(円形プログレスバー、25:00表示、開始・リセットボタン)を作成
  • タイマーのカウントダウンロジック(JavaScript)を実装
  • ボタンでタイマーの開始・リセットができる
  • 状態表示(作業中/停止中)

参照

plan.md のステップ1に基づく実装</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits December 16, 2025 08:24
Co-authored-by: moulongzhang <39043782+moulongzhang@users.noreply.github.com>
…e alert

Co-authored-by: moulongzhang <39043782+moulongzhang@users.noreply.github.com>
Co-authored-by: moulongzhang <39043782+moulongzhang@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement minimal timer UI and logic Implement minimal Pomodoro timer UI with countdown logic Dec 16, 2025
Copilot AI requested a review from moulongzhang December 16, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ステップ1: 最小構成のタイマーUIとロジック

2 participants