Describe the bug
When the auto-scheduler re-plans and moves a task that has already been pushed to Google Calendar (the "task block" feature), the task's calendar event is not updated — it stays at the old time. The in-app schedule shows the new time, but the Google Calendar event is stale, so the two disagree until something else dirties the block.
Root cause
The bulk re-plan path writes the task's new slot without marking the block for re-push:
SchedulingService.scheduleTask updates scheduledStart/scheduledEnd but never sets blockDirty.
repushDirtyBlocks only selects tasks that are blockDirty = true or scheduled-with-blockEventId = null (i.e. brand-new blocks). A task that was moved but already has a blockEventId matches neither, so its event is never updated.
Manual edits and drag-and-drop go through schedulePushTaskBlock and update correctly; only the bulk auto-schedule (scheduleAllTasksForUser) is affected.
Expected behavior
After an auto-schedule run, a moved task's Google Calendar event should move to the task's new time.
Fix
scheduleAllTasksForUser snapshots each task's pre-replan scheduledStart/scheduledEnd, and after scheduling flags blockDirty = true for tasks that have an existing blockEventId and actually moved. The existing repushDirtyBlocks → pushTaskBlock → updateExistingEvent path then moves the event in place. Unchanged slots are left untouched to avoid needless Calendar API churn.
Verified on a self-hosted instance: re-planning that shifts already-pushed tasks now updates the corresponding Google events in place (same event id, new time) instead of leaving them stale.
Describe the bug
When the auto-scheduler re-plans and moves a task that has already been pushed to Google Calendar (the "task block" feature), the task's calendar event is not updated — it stays at the old time. The in-app schedule shows the new time, but the Google Calendar event is stale, so the two disagree until something else dirties the block.
Root cause
The bulk re-plan path writes the task's new slot without marking the block for re-push:
SchedulingService.scheduleTaskupdatesscheduledStart/scheduledEndbut never setsblockDirty.repushDirtyBlocksonly selects tasks that areblockDirty = trueor scheduled-with-blockEventId = null(i.e. brand-new blocks). A task that was moved but already has ablockEventIdmatches neither, so its event is never updated.Manual edits and drag-and-drop go through
schedulePushTaskBlockand update correctly; only the bulk auto-schedule (scheduleAllTasksForUser) is affected.Expected behavior
After an auto-schedule run, a moved task's Google Calendar event should move to the task's new time.
Fix
scheduleAllTasksForUsersnapshots each task's pre-replanscheduledStart/scheduledEnd, and after scheduling flagsblockDirty = truefor tasks that have an existingblockEventIdand actually moved. The existingrepushDirtyBlocks→pushTaskBlock→updateExistingEventpath then moves the event in place. Unchanged slots are left untouched to avoid needless Calendar API churn.Verified on a self-hosted instance: re-planning that shifts already-pushed tasks now updates the corresponding Google events in place (same event id, new time) instead of leaving them stale.