From 44ffe41775fb141f4e9d638581f516d39539358d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 20 Dec 2025 20:02:32 +0100 Subject: [PATCH] fix(macos): allow identity refresh off main actor --- .../Sources/Clawdis/GatewayDiscoveryModel.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/macos/Sources/Clawdis/GatewayDiscoveryModel.swift b/apps/macos/Sources/Clawdis/GatewayDiscoveryModel.swift index 768f7e36f..17d078447 100644 --- a/apps/macos/Sources/Clawdis/GatewayDiscoveryModel.swift +++ b/apps/macos/Sources/Clawdis/GatewayDiscoveryModel.swift @@ -277,14 +277,14 @@ final class GatewayDiscoveryModel { resolver.start() } - nonisolated private static func prettifyInstanceName(_ decodedName: String) -> String { + private nonisolated static func prettifyInstanceName(_ decodedName: String) -> String { let normalized = decodedName.split(whereSeparator: \.isWhitespace).joined(separator: " ") let stripped = normalized.replacingOccurrences(of: " (Clawdis)", with: "") .replacingOccurrences(of: #"\s+\(\d+\)$"#, with: "", options: .regularExpression) return stripped.trimmingCharacters(in: .whitespacesAndNewlines) } - nonisolated private static func prettifyServiceName(_ decodedName: String) -> String { + private nonisolated static func prettifyServiceName(_ decodedName: String) -> String { let normalized = Self.prettifyInstanceName(decodedName) var cleaned = normalized.replacingOccurrences(of: #"\s*-?bridge$"#, with: "", options: .regularExpression) cleaned = cleaned @@ -350,7 +350,7 @@ final class GatewayDiscoveryModel { } } - nonisolated private static func mergeLocalIdentity( + private nonisolated static func mergeLocalIdentity( fast: LocalIdentity, slow: LocalIdentity) -> LocalIdentity { @@ -359,7 +359,7 @@ final class GatewayDiscoveryModel { displayTokens: fast.displayTokens.union(slow.displayTokens)) } - nonisolated private static func buildLocalIdentityFast() -> LocalIdentity { + private nonisolated static func buildLocalIdentityFast() -> LocalIdentity { var hostTokens: Set = [] var displayTokens: Set = [] @@ -375,7 +375,7 @@ final class GatewayDiscoveryModel { return LocalIdentity(hostTokens: hostTokens, displayTokens: displayTokens) } - nonisolated private static func buildLocalIdentitySlow() -> LocalIdentity { + private nonisolated static func buildLocalIdentitySlow() -> LocalIdentity { var hostTokens: Set = [] var displayTokens: Set = [] @@ -392,7 +392,7 @@ final class GatewayDiscoveryModel { return LocalIdentity(hostTokens: hostTokens, displayTokens: displayTokens) } - nonisolated private static func normalizeHostToken(_ raw: String?) -> String? { + private nonisolated static func normalizeHostToken(_ raw: String?) -> String? { guard let raw else { return nil } let trimmed = raw.trimmingCharacters(in: .whitespacesAndNewlines) if trimmed.isEmpty { return nil } @@ -408,7 +408,7 @@ final class GatewayDiscoveryModel { return token.isEmpty ? nil : token } - nonisolated private static func normalizeDisplayToken(_ raw: String?) -> String? { + private nonisolated static func normalizeDisplayToken(_ raw: String?) -> String? { guard let raw else { return nil } let prettified = Self.prettifyInstanceName(raw) let trimmed = prettified.trimmingCharacters(in: .whitespacesAndNewlines) @@ -416,7 +416,7 @@ final class GatewayDiscoveryModel { return trimmed.lowercased() } - nonisolated private static func normalizeServiceToken(_ raw: String?) -> String? { + private nonisolated static func normalizeServiceToken(_ raw: String?) -> String? { guard let raw else { return nil } let trimmed = raw.trimmingCharacters(in: .whitespacesAndNewlines) if trimmed.isEmpty { return nil }