Skip to content

Commit d65b547

Browse files
committed
Improve Pomodoro timer auto-start and messaging
Auto-starts break sessions after work periods and updates toast messages for clarity. The timer now stops after breaks, prompting the user to manually start the next work session.
1 parent bedefde commit d65b547

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/dashboard/todo/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,19 +119,19 @@ export default function TodoPage() {
119119
}, 1000)
120120
} else if (pomodoroTime === 0) {
121121
// Timer finished
122-
setPomodoroActive(false)
123122
playNotificationSound()
124123

125124
if (pomodoroMode === 'work') {
126125
// Work session completed
127126
setPomodoroSessions((s) => s + 1)
128-
setToast({ message: '🎉 Work session completed! Time for a break.', type: 'break' })
129-
// Switch to break mode
127+
setToast({ message: '🎉 Work session completed! Break starting now...', type: 'break' })
128+
// Switch to break mode and keep running (Auto-start break)
130129
setPomodoroMode('break')
131130
setPomodoroTime(breakDuration * 60)
132131
} else {
133132
// Break completed
134-
setToast({ message: '💪 Break is over! Ready for another session?', type: 'work' })
133+
setPomodoroActive(false) // Stop after break
134+
setToast({ message: '💪 Break is over! Click Start to begin focus.', type: 'work' })
135135
setPomodoroMode('work')
136136
setPomodoroTime(workDuration * 60)
137137
}

0 commit comments

Comments
 (0)