Skip to content

Add persistent focus timer and improve task management#441

Open
binduhasini11 wants to merge 1 commit into
Charushi06:mainfrom
binduhasini11:fix/pomodoro-persistence
Open

Add persistent focus timer and improve task management#441
binduhasini11 wants to merge 1 commit into
Charushi06:mainfrom
binduhasini11:fix/pomodoro-persistence

Conversation

@binduhasini11
Copy link
Copy Markdown

Related Issue

Closes #138

Summary

Implemented persistent Pomodoro timer recovery so active focus sessions continue correctly after page refreshes or accidental reloads.

Changes Made

  • Added localStorage support for Pomodoro timer state
  • Saved timer progress, duration, and running state
  • Restored timer automatically on page refresh
  • Recalculated elapsed time using timestamps for accurate recovery
  • Added cleanup of stored timer state on reset/completion

Testing

  • Started timer and refreshed page to verify persistence
  • Tested pause and resume functionality
  • Verified timer resets correctly
  • Confirmed completed sessions clear saved state
  • Tested multiple refreshes during active countdown

Screenshots

timerPersistsOnRefresh.mp4

Before Refresh:
Screenshot 2026-05-19 at 3 22 31 PM

After Refresh:
Screenshot 2026-05-19 at 3 22 46 PM

Checklist

  • Code follows project style
  • Tested locally
  • No unrelated changes included
  • Documentation updated (if applicable)

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.

Focus timer does not persist across page refres

1 participant