feat(mesh): sync-guild-loading IPC mesh nudge and structural select-guild push (v0.8.747)

Watchdog path re-requests mesh join and peer retry when loading stalls with zero
peers; select-guild uses full structural state push for guild switch parity.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 21:04:38 -04:00
co-authored by Cursor
parent 5f216a616c
commit d86aec0a10
2 changed files with 32 additions and 1 deletions
+4
View File
@@ -2,6 +2,10 @@
Pearcord desktop UI IPC dispatch and automated flow scenarios for Bare smokes. Mirrors `apps/pearcord` pear-pipe message handling. Pearcord desktop UI IPC dispatch and automated flow scenarios for Bare smokes. Mirrors `apps/pearcord` pear-pipe message handling.
**Phase 780 (v0.8.747):** `sync-guild-loading` → structural push + mesh join nudge (`ui-loading-watchdog`) when 0 peers. Bundle: `npm run test:ci-phase780`.
**Phases 766779 (v0.8.746):** Settings IPC — `settings-open`, `settings-close`, `settings-section-change`, `settings-save`, `settings-discard``settings-opened` / `settings-section-changed` / `settings-saved` / `settings-discarded`. Role editor — `role-editor-open`, `role-editor-close`, `role-editor-select`, `role-editor-save`, `role-editor-discard`. Docs: [UI_FLOW.md](../../docs/UI_FLOW.md#settings-and-role-editor-automation), [IPC.md](../../docs/IPC.md#settings--role-editor-766779).
**Phase 692 (v0.8.667):** `relay-json-modal-open`, `sync-digest-relay-handoff-json`, `clear-digest-relay-handoff-json`, `push-archive-peer-export-json` with composer focus. Bundle: `npm run test:ci-phase692`. **Phase 692 (v0.8.667):** `relay-json-modal-open`, `sync-digest-relay-handoff-json`, `clear-digest-relay-handoff-json`, `push-archive-peer-export-json` with composer focus. Bundle: `npm run test:ci-phase692`.
**Phase 691 (v0.8.666):** `digest-json-modal-open`, `sync-hook-failure-digest-json`, `clear-hook-failure-digest-json`, `export-compliance-snapshot` with composer focus. Bundle: `npm run test:ci-phase691`. **Phase 691 (v0.8.666):** `digest-json-modal-open`, `sync-hook-failure-digest-json`, `clear-hook-failure-digest-json`, `export-compliance-snapshot` with composer focus. Bundle: `npm run test:ci-phase691`.
+28 -1
View File
@@ -257,6 +257,15 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
pushState() pushState()
return true return true
} }
if (t === 'refresh-discovery-listings') {
const result = await platform.refreshDiscoveryListingsFromMesh({
waitIngest: msg.waitIngest !== false,
waitMs: msg.waitMs
})
send({ type: 'discovery-listings-refreshed', result })
pushState()
return true
}
if (t === 'mark-onboarding-explore-shown') { if (t === 'mark-onboarding-explore-shown') {
await platform.markOnboardingExploreShown() await platform.markOnboardingExploreShown()
pushState() pushState()
@@ -748,7 +757,7 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
} }
}) })
} }
pushState() pushState({ structural: true, light: false })
if (platform.activeChannelId && platform.mode === 'guild') { if (platform.activeChannelId && platform.mode === 'guild') {
send({ send({
type: 'composer-focus-channel', type: 'composer-focus-channel',
@@ -757,6 +766,24 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
} }
return true return true
} }
if (t === 'sync-guild-loading') {
const gid =
platform.guild?.guild?.id || platform._guildLoadingGuildId || null
if (gid && (platform.guild?.peers?.size ?? 0) === 0) {
void platform
._requestGuildMeshJoin?.({
source: 'ui-loading-watchdog',
bounded: false
})
.catch(() => {})
if (typeof platform._scheduleGuildMeshPeerRetry === 'function') {
platform._scheduleGuildMeshPeerRetry(gid)
}
}
if (platform._guildLoading) platform.emit('guild-loading')
pushState({ structural: true, light: false })
return true
}
if (t === 'join-stage') { if (t === 'join-stage') {
try { try {
await platform.joinStageChannel(msg.channelId) await platform.joinStageChannel(msg.channelId)