Check the CloudKit schema when packaging and show broken iCloud sync

This commit is contained in:
Ian Gulliver
2026-10-20 08:55:37 -07:00
parent e7724977c8
commit 8f3226350e
14 changed files with 502 additions and 288 deletions
+20 -1
View File
@@ -382,7 +382,7 @@ private struct ClientTable: View {
} else {
Grid(alignment: .leading, horizontalSpacing: 12, verticalSpacing: 2) {
GridRow {
ForEach(["Mac", "User", "Build", "Connected", "Last action"], id: \.self) { h in
ForEach(["Mac", "User", "Build", "Connected", "Last action", "iCloud"], id: \.self) { h in
Text(h).font(Fonts.font(11)).foregroundStyle(Palette.muted)
}
}
@@ -394,6 +394,7 @@ private struct ClientTable: View {
Text(c.commit.isEmpty ? "—" : String(c.commit.prefix(8))).help(c.commit)
Text(since(c.connectedAt))
Text(c.lastActionAt.map(since) ?? "—")
SyncCell(sync: c.sync)
}
.textSelection(.enabled)
Divider().overlay(Palette.border)
@@ -403,6 +404,24 @@ private struct ClientTable: View {
}
}
private struct SyncCell: View {
let sync: ClientSync?
var body: some View {
if let sync {
if sync.ok {
Text("ok").help("Last synced \(since(sync.at))")
} else {
Text("failing")
.foregroundStyle(Palette.danger)
.help("Failed \(since(sync.at)): \(sync.error ?? "")")
}
} else {
Text("—")
}
}
}
private struct ServerRows: View {
let status: ServerStatus