feat(ci): adds possiblitity to configure durations time#67
Conversation
- Add workDuration, shortBreakDuration, longBreakDuration to Settings. - Read durations from config into TimerStateMachine. - Use 22, 5, 12 as defaults for work, short break, and long break.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
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
editDurationflow inDoroApp(state, blink ticker instepClock,handleDurationEdit/saveDurationEdit/clearDurationEdit) wired throughUiRenderStateand rendered as a special banner inDoroUi. - New
increaseDuration/decreaseDurationcontrol commands mapped to up/down/left/right and +/-/=/_ ininput.ts, plusTimerStateMachine.updateConfigthat adjustsremainingSeconds. - Settings extended with
workDuration/shortBreakDuration/longBreakDuration(defaults exported fromconfig.ts, consumed byconstants.tsandDoroAppconstructor); 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. |
|
@copilot fix ci, keep pr title related to feature, not recent fixes |
Fixed in |
that's not a fix. issue is in node version 24.16.0/x64 it should be fixed to 24.15.0 as new version has problems @copilot |
Fixed in |
Simplified npm install step by removing cache directory creation.
|
ci is failing. and the last still running ci is this commit: 158a8a6
ac:
|
Fixed in the latest commit:
PR now contains only the duration configuration feature changes + the |
|
@copilot resolve the merge conflicts in this pull request |
Resolved in |
feat(ci): adds possiblitity to configure durations time