Suppress delete confirmation when sync removes tasks from deselected lists#26
Merged
desimpson merged 2 commits intoFeb 25, 2026
Merged
Conversation
23e273f to
cd65c6f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Replace the boolean `isSyncInProgress` flag with a `SyncGuard` that increments/decrements a counter, so concurrent jobs via `Promise.all` don't prematurely clear the flag when the first job completes.
bc12e34 to
20cb312
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deselecting a Google Tasks list in settings would trigger the delete confirmation modal for every removed task on the next sync. These removals are sync-initiated, not user-initiated, and should not prompt.
This fix wraps sync jobs with an
isSyncInProgressflag and a post-sync cache refresh so the file modification handler skips deletion detection for sync-driven changes.Note
Medium Risk
Touches deletion-detection logic that can lead to missed or extra delete prompts, which affects whether Google Tasks deletions are user-confirmed. Scope is contained and backed by new integration tests, but timing/guarding around vault modify events is inherently concurrency-sensitive.
Overview
Prevents delete-confirmation modals from appearing when the sync itself removes tasks from the Markdown note (e.g., after a Google Tasks list is deselected).
Sync jobs are now wrapped in a new
SyncGuardsohandleFileModificationcan snapshotsyncGuard.isActiveand skip deletion detection during sync-driven note edits, while still updating the file-content cache.After each sync job completes, the plugin refreshes the file-content cache before releasing the guard to avoid false deletion detection from delayed
modifyevents; integration tests were added to cover both in-sync and post-sync event timing.Written by Cursor Bugbot for commit 20cb312. This will update automatically on new commits. Configure here.