Skip to content

Tasks/doro 010 adjust durations#67

Open
dnim wants to merge 23 commits into
mainfrom
tasks/doro-010-adjust-durations
Open

Tasks/doro 010 adjust durations#67
dnim wants to merge 23 commits into
mainfrom
tasks/doro-010-adjust-durations

Conversation

@dnim
Copy link
Copy Markdown
Owner

@dnim dnim commented May 15, 2026

No description provided.

@codecov

This comment was marked as resolved.

@dnim dnim closed this May 15, 2026
@dnim dnim reopened this May 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an in-TUI duration editor: arrow keys (or +/-/=/_) adjust the current mode's minutes, with a brief blinking display, a 2-second auto-save that writes through to settings, and a "saved" confirmation banner. Defaults are extracted to shared constants and the timer state machine gains an updateConfig method that re-bases remainingSeconds by the duration delta.

Changes:

  • New editDuration flow in DoroApp (state, blink ticker in stepClock, handleDurationEdit/saveDurationEdit/clearDurationEdit) wired through UiRenderState and rendered as a special banner in DoroUi.
  • New increaseDuration/decreaseDuration control commands mapped to up/down/left/right and +/-/=/_ in input.ts, plus TimerStateMachine.updateConfig that adjusts remainingSeconds.
  • Settings extended with workDuration/shortBreakDuration/longBreakDuration (defaults exported from config.ts, consumed by constants.ts and DoroApp constructor); test fixtures and VRT scenarios updated for the new state shape.

Reviewed changes

Copilot reviewed 44 out of 93 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/app.ts Adds duration-edit state machine, blink counter, save/clear timeouts, settings persistence, and routes new commands.
src/ui.ts Rewrites banner selection as if/else chain with editing/saved states; exports splitAtVisible for tests.
src/stateMachine.ts New updateConfig that mutates config and adjusts remainingSeconds by the duration diff.
src/input.ts Adds increaseDuration/decreaseDuration and maps arrow keys plus +/-/=/_ to them.
src/constants.ts DEFAULT_TIMER_CONFIG now derived from shared DEFAULT_*_MINS constants in config.ts.
src/config.ts Adds duration default constants and per-mode *Duration settings fields with defaults.
src/tests/ui.test.ts Adds splitAtVisible test and adds new editDuration* fields to all render-state fixtures.
tests/visual.spec.mts Adds VRT scenarios for edit/blink/saved states; switches pty.spawn to process.execPath.

Comment thread src/app.ts
Comment thread src/app.ts
Comment thread src/app.ts Outdated
Comment thread src/__tests__/ui.test.ts Outdated
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.

2 participants