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:
john
2026-09-16 08:53:58 +08:00
parent f9e105acd0
commit 264c213fbe
4 changed files with 26 additions and 10 deletions
+12 -1
View File
@@ -20,7 +20,18 @@ const contractSource = read('mindspace-server-adapter-contract.mjs');
assertIncludes(
'server.mjs syncUserGeneratedPages',
serverSource,
'await mindSpacePageSync.syncUserGeneratedPages(userId);',
'mindSpacePageSync.syncUserGeneratedPages(userId',
);
assertIncludes(
'server.mjs list page sync bypasses full delivery',
serverSource,
'listSync = false',
);
const pageCoreRoutesSource = read('server/portal-mindspace-page-core-routes.mjs');
assertIncludes(
'portal page list background sync',
pageCoreRoutesSource,
'syncUserGeneratedPages(userId, { listSync: true })',
);
if (serverSource.includes("mindSpaceServerRuntime.adapterKind === 'remote'")) {
throw new Error(