refactor: modularize portal server and harden session recovery

This commit is contained in:
john
2026-07-24 18:39:24 +08:00
parent 1d291fd528
commit 785731d98d
109 changed files with 29185 additions and 5836 deletions
+16 -2
View File
@@ -63,8 +63,22 @@ assertIncludes(voiceInputButton, 'useVoiceSession({', 'VoiceInputButton.tsx');
assertIncludes(voiceInputButton, 'onTranscript?.(transcript)', 'VoiceInputButton.tsx');
const server = read('server.mjs');
assertIncludes(server, 'canUseSnapshotCache', 'server.mjs');
assertIncludes(server, 'hintMc != null && hintUa != null', 'server.mjs');
assertIncludes(
server,
'attachPortalSessionRoutes(api, {',
'server.mjs session route composition',
);
const portalSessionRoutes = read('server/portal-session-routes.mjs');
assertIncludes(
portalSessionRoutes,
'canUseSnapshotCache',
'portal-session-routes.mjs',
);
assertIncludes(
portalSessionRoutes,
'hintMc != null && hintUa != null',
'portal-session-routes.mjs',
);
const publicFinishSync = read('mindspace-public-finish-sync.mjs');
assertIncludes(publicFinishSync, 'applyPublicHtmlEdit', 'mindspace-public-finish-sync.mjs');