Keep local interactions responsive#6205
Merged
Merged
Conversation
✅ Deploy Preview for old-char canceled.
|
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 08:11
e18bfc4 to
0009412
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 08:34
0009412 to
41f9f9a
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 09:04
41f9f9a to
bb675e4
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 09:11
bb675e4 to
b78cebf
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 09:20
b78cebf to
68bc654
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 09:27
68bc654 to
e9b9e18
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 09:34
e9b9e18 to
aace19a
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 09:41
aace19a to
a478641
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 09:53
a478641 to
9b2f53a
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 10:03
9b2f53a to
fb6fa0c
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 10:12
fb6fa0c to
4d49271
Compare
ComputelessComputer
force-pushed
the
fix/local-first-interactions
branch
from
July 22, 2026 10:19
4d49271 to
5b65d4b
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5b65d4b. Configure here.
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 10:26
5b65d4b to
fd4e5b6
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.

Cancel dismissible sharing work, keep calendar network activity out of the local write queue, and scope persistence flushes.
Supersedes #6204, which GitHub automatically closed when its stacked base #6202 merged and was deleted.
Note
Medium Risk
Touches calendar disconnect invalidation, global write-queue flush semantics, and sharing lifecycle—areas where races could affect data consistency, though behavior is heavily test-covered.
Overview
Improves local responsiveness by narrowing when the app waits on SQLite writes, moving slow calendar work off the write queue, and making session sharing dismissible without stray side effects.
Database write queue — Keyed
flushDatabaseWritesnow loops until targeted keys are idle (including writes enqueued mid-flush) and still surfaces the first failure after draining. AddsflushDatabaseWritesByPrefixandflushDatabaseWritesWithin(timeout without abandoning in-flight writes). Call sites flush only relevant keys (e.g.session:{id},attachment-transfers,shared-note-cache:{viewer}) instead of the whole queue. Exit/relaunch use a 5s bounded flush withPromise.allSettledso settings save can finish even if the DB flush times out.Calendar sync — Full sync runs on a separate
enqueueCalendarSyncchain; only inventory/event commits useenqueueDatabaseWrite("calendar-sync", …). Generation and a disconnected-connection set invalidate in-flight work so disconnect/reconnect cannot restore stale data; tombstone failures roll back the disconnect marker. Deeplink handler triggerssyncCalendarEventsafter disconnect andallowReconnectedCalendarConnectionson reconnect.Session sharing — Share popover can close anytime; preparation uses attempt IDs and abort controllers so dismissed work does not publish or show errors.
ShareOperationAbortedErrorsuppresses toasts on cancel; invitation rollback respects abort. General access scope UI is restrict-only (link/workspace scope flows removed). Sync state loads after scoped flushes includingsessionId.Reviewed by Cursor Bugbot for commit fd4e5b6. Bugbot is set up for automated code reviews on this repo. Configure here.