Skip to content

feat: show next scheduled sync time in calendar status#2516

Closed
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1766544838-calendar-status-next-run
Closed

feat: show next scheduled sync time in calendar status#2516
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1766544838-calendar-status-next-run

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Updates the calendar settings status component to show a live countdown to the next sync (e.g., "Next sync in 45s") instead of the static "Syncs every minute automatically" message.

Uses TinyTick's useScheduledTaskRunIds and getTaskRunInfo to get the scheduled timestamp when available, and falls back to calculating from last completion time + interval.

Also exports CALENDAR_SYNC_INTERVAL from the apple-calendar service to avoid duplication.

Review & Testing Checklist for Human

  • Verify the wasRunningRef pattern (lines 80-86 in status.tsx) - Using useMemo to create a mutable ref-like object is unconventional. Confirm this correctly detects when a task transitions from running to not running.
  • Test the countdown UI in the actual app - Open Settings > Calendar with calendars selected and verify the countdown displays and updates correctly every second.
  • Test edge cases: first app load (no prior sync), clicking "Sync Now" button, and what happens when countdown reaches 0.

Recommended test plan:

  1. Open the desktop app and navigate to Settings > Calendar
  2. Select at least one calendar
  3. Observe the status text - should show countdown like "Next sync in Xs"
  4. Wait for sync to complete and verify countdown resets
  5. Click "Sync Now" and verify it shows "Syncing..." then resets countdown

Notes

  • Run history tracking was explicitly out of scope per user request
  • TinyTick does not persist completed task runs, so we track completion time in component state

Link to Devin run: https://app.devin.ai/sessions/a4890e8cfa794b19b3f5c9c5dbe337e6
Requested by: @yujonglee

- Track when calendar sync task completes and calculate next run time
- Display countdown to next sync (e.g., 'Next sync in 45s')
- Use TinyTick's useScheduledTaskRunIds and getTaskRunInfo to get scheduled timestamp
- Export CALENDAR_SYNC_INTERVAL from apple-calendar service for reuse

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Dec 24, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit afbda31
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/694b56914e7a930008aa0a7b
😎 Deploy Preview https://deploy-preview-2516--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 24, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit afbda31
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/694b5691a9602b0008311b7a
😎 Deploy Preview https://deploy-preview-2516--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@devin-ai-integration
Copy link
Contributor Author

Closing due to inactivity for more than 30 days. Configure here.

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.

1 participant