fix(mindspace): use lightweight page sync for background list refresh
Background page list sync was calling syncAndDeliver over the remote adapter, which could exceed the 60s timeout for heavy users and block Portal. Route list sync through pageSyncService only via listSync while keeping full delivery on Finish and agent-run paths. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+5
-3
@@ -1292,7 +1292,7 @@ async function listSessionPublicHtmlRelativePaths(userId, sessionId, { sinceMs =
|
||||
|
||||
async function syncUserGeneratedPages(
|
||||
userId,
|
||||
{ sessionId = null, sinceMs = null, onlyRelativePaths = null } = {},
|
||||
{ sessionId = null, sinceMs = null, onlyRelativePaths = null, listSync = false } = {},
|
||||
) {
|
||||
if (!userId) return;
|
||||
// Agent-run/Finish delivery must stay scoped to the current conversation.
|
||||
@@ -1330,11 +1330,13 @@ async function syncUserGeneratedPages(
|
||||
: sessionId
|
||||
? (discoveredRelativePaths?.length ? discoveredRelativePaths : recentWorkspaceRelativePaths)
|
||||
: null;
|
||||
if (workspacePageDeliver?.syncAndDeliver) {
|
||||
if (!listSync && workspacePageDeliver?.syncAndDeliver) {
|
||||
return await workspacePageDeliver.syncAndDeliver(userId, { pageDataRelativePaths });
|
||||
}
|
||||
if (!mindSpacePageSync) return;
|
||||
return await mindSpacePageSync.syncUserGeneratedPages(userId);
|
||||
return await mindSpacePageSync.syncUserGeneratedPages(userId, {
|
||||
onlyRelativePaths: pageDataRelativePaths,
|
||||
});
|
||||
}
|
||||
|
||||
async function resolveChatSaveBundle(user, h5Root, input = {}) {
|
||||
|
||||
Reference in New Issue
Block a user