Skip to content

Suppress delete confirmation when sync removes tasks from deselected lists#26

Merged
desimpson merged 2 commits into
mainfrom
fix/suppress-delete-confirmation-on-list-deselect
Feb 25, 2026
Merged

Suppress delete confirmation when sync removes tasks from deselected lists#26
desimpson merged 2 commits into
mainfrom
fix/suppress-delete-confirmation-on-list-deselect

Conversation

@desimpson
Copy link
Copy Markdown
Owner

@desimpson desimpson commented Feb 24, 2026

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 isSyncInProgress flag 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 SyncGuard so handleFileModification can snapshot syncGuard.isActive and 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 modify events; 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.

@desimpson desimpson self-assigned this Feb 24, 2026
@desimpson desimpson added the bug Something isn't working label Feb 24, 2026
@desimpson desimpson force-pushed the fix/suppress-delete-confirmation-on-list-deselect branch from 23e273f to cd65c6f Compare February 24, 2026 12:32
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/plugin/index.ts
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.
@desimpson desimpson force-pushed the fix/suppress-delete-confirmation-on-list-deselect branch from bc12e34 to 20cb312 Compare February 25, 2026 09:38
@desimpson desimpson merged commit 42c0480 into main Feb 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant