commit 93ebd202cf3df9b55009848c09105092944d063d parent ede281d8b794776b545c43b07ab3d58e4d900561 Author: Michael Camilleri <[email protected]> Date: Fri, 8 May 2026 22:58:01 +0900 Add logging for rosters Diffstat:
| M | Crossmate/CrossmateApp.swift | | | 18 | ++++++++++++++++++ |
1 file changed, 18 insertions(+), 0 deletions(-)
diff --git a/Crossmate/CrossmateApp.swift b/Crossmate/CrossmateApp.swift @@ -345,13 +345,31 @@ private struct PuzzleDisplayView: View { await pollOpenSharedPuzzle() } .task(id: gameID) { + let hadRoster = roster != nil + session = nil + roster = nil + loadError = nil updateActiveNotificationPuzzleID(for: scenePhase) do { let (game, mutator) = try store.loadGame(id: gameID) let newSession = PlayerSession(game: game, mutator: mutator) session = newSession if mutator.isShared && preferences.isICloudSyncEnabled { + services.syncMonitor.note( + "PuzzleDisplay[\(gameID.uuidString.prefix(8))]: activating shared roster" + ) await activateSharing(for: newSession) + } else { + if hadRoster { + services.syncMonitor.note( + "PuzzleDisplay[\(gameID.uuidString.prefix(8))]: cleared stale roster for local game" + ) + } else { + services.syncMonitor.note( + "PuzzleDisplay[\(gameID.uuidString.prefix(8))]: local game loaded without roster" + ) + } + await services.presencePublisher.clear() } } catch { loadError = String(describing: error)