Skip to content

Comments

Feat: Implement Dual-Mode Timer for Standalone App Functionality#210

Merged
Annanyatiwary4 merged 1 commit intoDevSyncx:mainfrom
kmanish527:fix/standalonetimer
Nov 5, 2025
Merged

Feat: Implement Dual-Mode Timer for Standalone App Functionality#210
Annanyatiwary4 merged 1 commit intoDevSyncx:mainfrom
kmanish527:fix/standalonetimer

Conversation

@kmanish527
Copy link
Contributor

🚀 Pull Request Checklist

  • ✅ My issue is assigned to me, and I have not taken up another task simultaneously.
  • 🔁 I have pulled the latest changes from the main branch.
  • 🧪 My code is tested and does not break existing functionality.
  • 📚 I have added/updated documentation wherever necessary.
  • 🧹 My code follows the project’s coding standards.
  • ✍️ My commits are clear and meaningful.
  • 🧾 I have linked the issue this PR addresses with Closes #<issue_number>.

🧠 Description

The Pomodoro app had a hard dependency on the Chrome extension. If the extension was not installed or enabled, the Pomodoro Timer would not run or start, leading to a poor user experience for new users.

This PR refactors the TimerContext to be "dual-mode." It now intelligently detects if the extension is installed and running.

  • If Extension is Connected: The app works as it did before—as a "remote control" for the highly reliable background service worker, enabling all advanced features like focus-blocking.

  • If Extension is NOT Found: The app gracefully degrades to a "Standalone Mode." It uses its own internal setInterval clock and localStorage persistence to provide a fully-functional Pomodoro timer.


✅ Type of Change

  • 🐞 Bug fix
  • 💡 Feature
  • 🧹 Code cleanup/refactor
  • 🧪 Test cases
  • 📚 Docs update

@vercel
Copy link

vercel bot commented Nov 2, 2025

Someone is attempting to deploy a commit to the Annanya's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

🙌 Thanks @kmanish527 for raising this PR!
Our team will review it soon ⏳ — meanwhile, please make sure your PR follows our contributing guidelines 👉 Contributing Guidelines 🎉

@vercel
Copy link

vercel bot commented Nov 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
devsync Ready Ready Preview Comment Nov 5, 2025 8:35am

@Annanyatiwary4 Annanyatiwary4 merged commit f1858f9 into DevSyncx:main Nov 5, 2025
2 of 3 checks passed
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

🎉🎉 Thank you for your contribution! Your PR #210 has been merged! 🎉🎉

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