Skip to content

feat: add configurable Pomodoro duration#12

Merged
okaryo merged 4 commits into
mainfrom
feature/configurable-timer-duration
May 23, 2026
Merged

feat: add configurable Pomodoro duration#12
okaryo merged 4 commits into
mainfrom
feature/configurable-timer-duration

Conversation

@okaryo
Copy link
Copy Markdown
Owner

@okaryo okaryo commented May 23, 2026

Summary

  • Add a Pomodoro timer duration setting
  • Allow focus duration to be set from 1 to 60 minutes
  • Persist the duration in local settings
  • Update the Settings dialog UI for the Pomodoro controls

Checks

  • pnpm run format:check
  • pnpm run lint
  • pnpm run check
  • pnpm test
  • pnpm run build
  • cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
  • cargo clippy --manifest-path src-tauri/Cargo.toml --locked -- -D warnings
  • cargo test --manifest-path src-tauri/Cargo.toml --locked

@okaryo okaryo self-assigned this May 23, 2026
@okaryo okaryo merged commit a62819f into main May 23, 2026
2 checks passed
@okaryo okaryo deleted the feature/configurable-timer-duration branch May 23, 2026 09:44
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 406d8afcb1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/pomodoro/timer.ts
Comment on lines +66 to +70
if (state.running) {
return state;
}

return initialPomodoroState(durationSeconds);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve paused session when applying duration updates

setPomodoroDuration resets any non-running state to a fresh timer, which discards elapsed time for paused sessions. In the current flow (PomodoroSection calls this when settings change), if a user changes duration while a session is running and then pauses, the next state update resets remaining time to the full new duration even though they did not press Reset. This breaks expected pause/continue behavior and can silently lose in-progress focus time; the reset should be limited to truly idle states (e.g., not running and at full remaining time).

Useful? React with 👍 / 👎.

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 participant