Merge branch 'claude/webmail-offline-replica' into 'dev'

feat(electron): real offline mail replica — delta sync, full bodies, retention

See merge request gitlab-instance-b9b5cf2f/vncmail-plus!6
This commit is contained in:
2026-08-05 17:05:29 +00:00
36 changed files with 6744 additions and 11 deletions
+15
View File
@@ -1080,6 +1080,21 @@ export default function Home() {
} catch {
/* the index is optional */
}
// The offline REPLICA's launch catch-up. Same reasoning as the index's,
// plus one of its own: a `/changes` cursor cannot tell us about anything
// that happened while the process was dead, so a cycle at launch is what
// drains the backlog. One cycle is bounded, so a first sync of a large
// mailbox needs several - `chainSync` runs them with a hard cap.
//
// Sequenced AFTER the index rather than in parallel: both write the same
// SQLite file, and although `busy_timeout` makes concurrent writers safe,
// there is no reason to spend the contention during first paint.
try {
const { chainSync } = await import('@/lib/offline-replica-client');
await chainSync({ slot: useAccountStore.getState().getActiveAccount()?.cookieSlot });
} catch {
/* the replica is optional */
}
})();
// Deliberately after the initial mailbox fetch settles: the catch-up is a
// background nicety and must not compete with first paint.