From 78c263291b49ca2984ec475b6881477c2f17cc81 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 27 May 2026 11:09:11 +0000 Subject: [PATCH] fix(upload): schedule every background batch with unique Workmanager names Background file uploads used `return` after the first batch when `batchSize` split the selection, so later chunks were never enqueued. Use the per-task id as the one-off unique name instead of a constant so Workmanager does not drop subsequent registrations under the default existing-work policy. Co-authored-by: Sharjeel Yunus --- modules/ensemble/lib/action/upload_files_action.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ensemble/lib/action/upload_files_action.dart b/modules/ensemble/lib/action/upload_files_action.dart index 298bb60c1..6e3be552d 100644 --- a/modules/ensemble/lib/action/upload_files_action.dart +++ b/modules/ensemble/lib/action/upload_files_action.dart @@ -127,7 +127,7 @@ Future uploadFiles({ scopeManager: scopeManager, ); - return; + continue; } final taskId = Utils.generateRandomId(8); fileResponse?.addTask(UploadTask(id: taskId)); @@ -269,7 +269,7 @@ Future _setBackgroundUploadTask({ fileResponse?.addTask(UploadTask(id: taskId, isBackground: true)); await Workmanager().registerOneOffTask( - 'uploadTask', + taskId, backgroundUploadTask, tag: taskId, inputData: {