Phase 853: sync-guild-mesh-quad-offline-heal IPC

Wire offline recovery + partition heal composite IPC with topology
emit, offline recovery, presence refresh, and guild-sync-ready flags.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-04 05:52:37 -04:00
co-authored by Cursor
parent 4ee1294ab1
commit f58253799f
2 changed files with 48 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
Pearcord desktop UI IPC dispatch and automated flow scenarios for Bare smokes. Mirrors `apps/pearcord` pear-pipe message handling.
**Phase 853 (v0.8.820):** `sync-guild-mesh-quad-offline-heal` composite recovery IPC. Bundle: `npm run test:ci-phase853`.
**Phase 852 (v0.8.819):** `sync-guild-mesh-quad-recovery-heal` composite recovery IPC. Bundle: `npm run test:ci-phase852`.
**Phase 851 (v0.8.818):** `sync-guild-mesh-quad-churn-heal` composite recovery IPC. Bundle: `npm run test:ci-phase851`.
+46
View File
@@ -1450,6 +1450,52 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
})
return true
}
if (t === 'sync-guild-mesh-quad-offline-heal') {
if (platform.mode === 'guild' && platform.guild?.guild?.id) {
const gid = platform.guild.guild.id
const peerN = platform.guild?.peers?.size ?? 0
platform.emit('guild-mesh-topology', {
guildId: gid,
meshPeerCount: peerN,
manualRecovery: true,
quadMesh: true,
offlineHeal: true
})
void platform
.runPartitionHealSync({
force: true,
source: 'sync-guild-mesh-quad-offline-heal'
})
.catch(() => null)
if (typeof platform.runOfflineRecoverySync === 'function') {
await platform.runOfflineRecoverySync().catch(() => null)
}
platform.emit('presence')
platform.emit('guild-mesh-reconnected', {
guildId: gid,
meshPeerCount: peerN,
peerId: null,
manualRecovery: true,
offlineHeal: true
})
platform.emit('guild-sync-ready', {
guildId: gid,
quadOfflineHeal: 1,
quadOfflineRecovery: 1,
partitionHeal: 1,
presence: 1
})
if (typeof platform.requestGuildSyncFanout === 'function') {
platform.requestGuildSyncFanout()
}
}
pushState({
structural: true,
light: false,
source: 'sync-guild-mesh-quad-offline-heal'
})
return true
}
if (t === 'sync-guild-mesh-quad-recovery-heal') {
if (platform.mode === 'guild' && platform.guild?.guild?.id) {
const gid = platform.guild.guild.id