Keep local interactions responsive#6204
Closed
ComputelessComputer wants to merge 1 commit into
Closed
Conversation
ComputelessComputer
force-pushed
the
fix/share-note-loading
branch
from
July 22, 2026 07:31
b104669 to
41b9176
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 07:32
ea55cc5 to
e16a8b0
Compare
ComputelessComputer
force-pushed
the
fix/share-note-loading
branch
from
July 22, 2026 07:35
41b9176 to
82f9e69
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 07:36
e16a8b0 to
92780aa
Compare
ComputelessComputer
force-pushed
the
fix/share-note-loading
branch
from
July 22, 2026 07:41
82f9e69 to
b49b71b
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 07:41
92780aa to
540705e
Compare
Cancel dismissible sharing work, keep calendar network activity out of the local write queue, and scope persistence flushes.
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 07:44
540705e to
79db40e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 79db40e. Configure here.
| discoveredConnections, | ||
| ); | ||
|
|
||
| await syncCalendars(providerConnections, options.signal); |
There was a problem hiding this comment.
Disconnect aborts all calendar syncs
Medium Severity
removeDisconnectedCalendarConnection bumps calendarSyncGeneration, which makes isStopped true for every in-flight sync, including unrelated connections. The disconnect deeplink path only tombstones and does not schedule a follow-up sync, so remaining calendars can stay unsynced until some later unrelated trigger.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 79db40e. Configure here.
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.


Cancel dismissible sharing work, keep calendar network activity out of the local write queue, and scope persistence flushes.
This is part 2 of 2 in a stack made with GitButler:
Note
Medium Risk
Touches calendar sync invalidation on disconnect and sharing abort semantics; incorrect generation or flush scoping could cause stale reads or skipped writes, but changes are well covered by new tests.
Overview
Improves desktop responsiveness by not blocking the local DB write queue on slow network work, flushing only relevant write keys before reads, and letting users dismiss in-flight share preparation.
Database write queue adds
flushDatabaseWritesByPrefixandflushDatabaseWritesWithin(5s timeout on exit/relaunch) so lifecycle and cache maintenance do not wait on unrelated pending writes.Calendar sync serializes runs in an in-memory
enqueueCalendarSynctail instead of holding thecalendar-syncqueue key for the whole fetch; persistence stays oncalendar-syncfor inventory and connection snapshots. Disconnect bumps a generation and filters stale connections so late discovery cannot restore removed accounts.Session sharing tracks active preparation identity, aborts on popover close/account/note switch, and treats
ShareOperationAbortedErroras silent in mutation toasts; the loading popover can close via Escape/Done without blocking on pending work. Sync-state loads passsessionIdand flush only that session plus the viewer’s shared-note cache.Shared-note / attachment cache paths flush targeted keys (e.g.
session:{id},shared-note-cache:{viewer}) instead of draining the full queue.Reviewed by Cursor Bugbot for commit 79db40e. Bugbot is set up for automated code reviews on this repo. Configure here.