fix: drain first-task completion during Today refresh (Closes #1156)
CI / lint (pull_request) Successful in 3m15s
CI / build-release (pull_request) Successful in 6s
CI / browser-journey (pull_request) Successful in 3m49s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy committed 2026-08-20 00:19:50 +00:00
1 parent 80863182d4
commit 16841f18e1
2 files changed
+51 -1

No files matched your search

+4 -1
View File
@@ -303,7 +303,10 @@ function createTodaySync({ storage, getLogin, fetchJson, onRemoteIds, onRemotePl
let operations = pending();
let plan;
let hadConflict = false;
if (!operations.length) plan = await fetchJson('api/v1/today');
if (!operations.length) {
plan = await fetchJson('api/v1/today');
operations = pending();
}
while (operations.length) {
if (key() !== ownerKey) return false;
const batch = operations.slice(0, 50);