diff --git a/apps/ios/Sources/Voice/TalkModeManager.swift b/apps/ios/Sources/Voice/TalkModeManager.swift index 468adc877094..50911e265c7b 100644 --- a/apps/ios/Sources/Voice/TalkModeManager.swift +++ b/apps/ios/Sources/Voice/TalkModeManager.swift @@ -4076,7 +4076,6 @@ private final class AudioTapDiagnostics: @unchecked Sendable { private var lastLoggedAt = Date.distantPast private var lastLevelEmitAt = Date.distantPast private var maxRmsWindow: Float = 0 - private var lastRms: Float = 0 init(label: String, onLevel: (@Sendable (Float) -> Void)? = nil) { self.label = label @@ -4107,7 +4106,6 @@ private final class AudioTapDiagnostics: @unchecked Sendable { let resolvedRms = Float(TalkAudioLevel.rms(buffer: buffer)) self.lock.lock() - self.lastRms = resolvedRms if resolvedRms > self.maxRmsWindow { self.maxRmsWindow = resolvedRms } let maxRms = self.maxRmsWindow if shouldLog { self.maxRmsWindow = 0 } diff --git a/apps/macos/Sources/OpenClaw/CanvasA2UIActionMessageHandler.swift b/apps/macos/Sources/OpenClaw/CanvasA2UIActionMessageHandler.swift index e1e75c51e82c..1cc8ec71729a 100644 --- a/apps/macos/Sources/OpenClaw/CanvasA2UIActionMessageHandler.swift +++ b/apps/macos/Sources/OpenClaw/CanvasA2UIActionMessageHandler.swift @@ -1,6 +1,5 @@ import AppKit import Foundation -import OpenClawIPC import OpenClawKit import WebKit diff --git a/apps/macos/Sources/OpenClaw/Constants.swift b/apps/macos/Sources/OpenClaw/Constants.swift index ee5393323e4a..d4ca66e68ae6 100644 --- a/apps/macos/Sources/OpenClaw/Constants.swift +++ b/apps/macos/Sources/OpenClaw/Constants.swift @@ -36,9 +36,6 @@ let remoteCliPathKey = "openclaw.remoteCliPath" let canvasEnabledKey = "openclaw.canvasEnabled" let cameraEnabledKey = "openclaw.cameraEnabled" let computerControlEnabledKey = "openclaw.computerControlEnabled" -let systemRunPolicyKey = "openclaw.systemRunPolicy" -let systemRunAllowlistKey = "openclaw.systemRunAllowlist" -let systemRunEnabledKey = "openclaw.systemRunEnabled" let locationModeKey = "openclaw.locationMode" let locationPreciseKey = "openclaw.locationPreciseEnabled" let peekabooBridgeEnabledKey = "openclaw.peekabooBridgeEnabled" diff --git a/apps/macos/Sources/OpenClaw/DeepLinks.swift b/apps/macos/Sources/OpenClaw/DeepLinks.swift index 3d5f700b7155..73c1b6a3d494 100644 --- a/apps/macos/Sources/OpenClaw/DeepLinks.swift +++ b/apps/macos/Sources/OpenClaw/DeepLinks.swift @@ -149,10 +149,6 @@ final class DeepLinkHandler { self.expectedKey() } - static func currentCanvasKey() -> String { - self.canvasUnattendedKey - } - private static func expectedKey() -> String { let defaults = UserDefaults.standard if let key = defaults.string(forKey: deepLinkKeyKey), !key.isEmpty { diff --git a/apps/macos/Sources/OpenClaw/LaunchdManager.swift b/apps/macos/Sources/OpenClaw/LaunchdManager.swift index 961246f194b5..59cd63aebc5e 100644 --- a/apps/macos/Sources/OpenClaw/LaunchdManager.swift +++ b/apps/macos/Sources/OpenClaw/LaunchdManager.swift @@ -12,9 +12,4 @@ enum LaunchdManager { let userTarget = "gui/\(getuid())/\(launchdLabel)" self.runLaunchctl(["kickstart", "-k", userTarget]) } - - static func stopOpenClaw() { - let userTarget = "gui/\(getuid())/\(launchdLabel)" - self.runLaunchctl(["stop", userTarget]) - } } diff --git a/apps/macos/Sources/OpenClaw/MenuSessionsInjector.swift b/apps/macos/Sources/OpenClaw/MenuSessionsInjector.swift index 4e15cf7250c1..285d5eaa14a3 100644 --- a/apps/macos/Sources/OpenClaw/MenuSessionsInjector.swift +++ b/apps/macos/Sources/OpenClaw/MenuSessionsInjector.swift @@ -27,7 +27,6 @@ final class MenuSessionsInjector: NSObject, NSMenuDelegate { private var cacheUpdatedAt: Date? private let refreshIntervalSeconds: TimeInterval = 12 private var cachedUsageSummary: GatewayUsageSummary? - private var cachedUsageErrorText: String? private var usageCacheUpdatedAt: Date? private let usageRefreshIntervalSeconds: TimeInterval = 30 private var cachedCostSummary: GatewayCostUsageSummary? @@ -777,7 +776,6 @@ extension MenuSessionsInjector { self.cachedUsageSummary = try await UsageLoader.loadSummary() } catch { self.cachedUsageSummary = nil - self.cachedUsageErrorText = nil } self.usageCacheUpdatedAt = Date() } @@ -1283,9 +1281,8 @@ extension MenuSessionsInjector { self.cacheUpdatedAt = Date() } - func setTestingUsageSummary(_ summary: GatewayUsageSummary?, errorText: String? = nil) { + func setTestingUsageSummary(_ summary: GatewayUsageSummary?) { self.cachedUsageSummary = summary - self.cachedUsageErrorText = errorText self.usageCacheUpdatedAt = Date() } diff --git a/apps/macos/Sources/OpenClaw/RemoteTunnelManager.swift b/apps/macos/Sources/OpenClaw/RemoteTunnelManager.swift index 56bededa4e14..25694e839dea 100644 --- a/apps/macos/Sources/OpenClaw/RemoteTunnelManager.swift +++ b/apps/macos/Sources/OpenClaw/RemoteTunnelManager.swift @@ -27,10 +27,6 @@ actor RemoteTunnelManager { private var lastRestartAt: Date? private let restartBackoffSeconds: TimeInterval = 2.0 - func controlTunnelPortIfRunning() async -> UInt16? { - await self.controlTunnelRouteIfRunning()?.localPort - } - func controlTunnelRouteIfRunning() async -> Route? { guard let configuration = try? RemotePortTunnel.configuration( remotePort: GatewayEnvironment.gatewayPort()) diff --git a/apps/macos/Sources/OpenClaw/TalkOverlay.swift b/apps/macos/Sources/OpenClaw/TalkOverlay.swift index 660a615c7986..be981800b5c3 100644 --- a/apps/macos/Sources/OpenClaw/TalkOverlay.swift +++ b/apps/macos/Sources/OpenClaw/TalkOverlay.swift @@ -10,7 +10,6 @@ final class TalkOverlayController { static let overlaySize: CGFloat = 440 static let orbSize: CGFloat = 96 static let orbPadding: CGFloat = 12 - static let orbHitSlop: CGFloat = 10 private let logger = Logger(subsystem: "ai.openclaw", category: "talk.overlay") @@ -73,15 +72,6 @@ final class TalkOverlayController { self.model.level = max(0, min(1, level)) } - func currentWindowOrigin() -> CGPoint? { - self.window?.frame.origin - } - - func setWindowOrigin(_ origin: CGPoint) { - guard let window else { return } - window.setFrameOrigin(origin) - } - // MARK: - Private private func ensureWindow() { diff --git a/apps/macos/Sources/OpenClaw/UsageCostData.swift b/apps/macos/Sources/OpenClaw/UsageCostData.swift index 503ea167ee1c..c79d17178ae1 100644 --- a/apps/macos/Sources/OpenClaw/UsageCostData.swift +++ b/apps/macos/Sources/OpenClaw/UsageCostData.swift @@ -114,18 +114,6 @@ enum CostUsageFormatting { if value >= 0.01 { return String(format: "$%.2f", value) } return String(format: "$%.4f", value) } - - static func formatTokenCount(_ value: Int?) -> String? { - guard let value else { return nil } - let safe = max(0, value) - if safe >= 1_000_000 { return String(format: "%.1fm", Double(safe) / 1_000_000.0) } - if safe >= 1000 { - return safe >= 10000 - ? String(format: "%.0fk", Double(safe) / 1000.0) - : String(format: "%.1fk", Double(safe) / 1000.0) - } - return String(safe) - } } @MainActor diff --git a/apps/macos/Sources/OpenClaw/UsageData.swift b/apps/macos/Sources/OpenClaw/UsageData.swift index 3886c966edb1..f97d0bd3d49a 100644 --- a/apps/macos/Sources/OpenClaw/UsageData.swift +++ b/apps/macos/Sources/OpenClaw/UsageData.swift @@ -11,7 +11,6 @@ struct GatewayUsageProvider: Codable { let displayName: String let windows: [GatewayUsageWindow] let plan: String? - let error: String? } struct GatewayUsageSummary: Codable { @@ -27,12 +26,6 @@ struct UsageRow: Identifiable { let windowLabel: String? let usedPercent: Double? let resetAt: Date? - let error: String? - - var hasError: Bool { - if let error, !error.isEmpty { return true } - return false - } var titleText: String { if let plan, !plan.isEmpty { return "\(self.displayName) (\(plan))" } @@ -85,8 +78,7 @@ extension GatewayUsageSummary { plan: provider.plan, windowLabel: window.label, usedPercent: window.usedPercent, - resetAt: window.resetAt.map { Date(timeIntervalSince1970: $0 / 1000) }, - error: nil) + resetAt: window.resetAt.map { Date(timeIntervalSince1970: $0 / 1000) }) } } } diff --git a/apps/macos/Sources/OpenClaw/ViewMetrics.swift b/apps/macos/Sources/OpenClaw/ViewMetrics.swift deleted file mode 100644 index dfd7180de0f8..000000000000 --- a/apps/macos/Sources/OpenClaw/ViewMetrics.swift +++ /dev/null @@ -1,29 +0,0 @@ -import SwiftUI - -private struct ViewWidthPreferenceKey: PreferenceKey { - static let defaultValue: CGFloat = 0 - - static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) { - value = max(value, nextValue()) - } -} - -extension View { - func onWidthChange(_ onChange: @escaping (CGFloat) -> Void) -> some View { - self.background( - GeometryReader { proxy in - Color.clear.preference(key: ViewWidthPreferenceKey.self, value: proxy.size.width) - }) - .onPreferenceChange(ViewWidthPreferenceKey.self, perform: onChange) - } -} - -#if DEBUG -enum ViewMetricsTesting { - static func reduceWidth(current: CGFloat, next: CGFloat) -> CGFloat { - var value = current - ViewWidthPreferenceKey.reduce(value: &value, nextValue: { next }) - return value - } -} -#endif diff --git a/apps/macos/Sources/OpenClaw/VoiceWakeForwarder.swift b/apps/macos/Sources/OpenClaw/VoiceWakeForwarder.swift index 62b31304e052..f164e0dad6e9 100644 --- a/apps/macos/Sources/OpenClaw/VoiceWakeForwarder.swift +++ b/apps/macos/Sources/OpenClaw/VoiceWakeForwarder.swift @@ -138,12 +138,6 @@ enum VoiceWakeForwarder { return .failure(.rpcFailed(message)) } - static func checkConnection() async -> Result { - let status = await GatewayConnection.shared.status() - if status.ok { return .success(()) } - return .failure(.rpcFailed(status.error ?? "agent rpc unreachable")) - } - private static func loadSessionRouteEntry(sessionKey: String) async -> SessionRouteEntry? { do { let data = try await GatewayConnection.shared.request( diff --git a/apps/macos/Tests/OpenClawIPCTests/LowCoverageHelperTests.swift b/apps/macos/Tests/OpenClawIPCTests/LowCoverageHelperTests.swift index 811488c21b15..5f3713930af5 100644 --- a/apps/macos/Tests/OpenClawIPCTests/LowCoverageHelperTests.swift +++ b/apps/macos/Tests/OpenClawIPCTests/LowCoverageHelperTests.swift @@ -36,11 +36,6 @@ struct LowCoverageHelperTests { #expect(color == nil) } - @Test func `view metrics reduce width`() { - let value = ViewMetricsTesting.reduceWidth(current: 120, next: 180) - #expect(value == 180) - } - @Test func `shell executor handles empty command`() async { let result = await ShellExecutor.runDetailed(command: [], cwd: nil, env: nil, timeout: nil) #expect(result.success == false) diff --git a/apps/macos/Tests/OpenClawIPCTests/MenuSessionsInjectorTests.swift b/apps/macos/Tests/OpenClawIPCTests/MenuSessionsInjectorTests.swift index 4bca8159ac7a..9739e78b024e 100644 --- a/apps/macos/Tests/OpenClawIPCTests/MenuSessionsInjectorTests.swift +++ b/apps/macos/Tests/OpenClawIPCTests/MenuSessionsInjectorTests.swift @@ -94,16 +94,14 @@ struct MenuSessionsInjectorTests { provider: "anthropic", displayName: "Claude", windows: [GatewayUsageWindow(label: "5h", usedPercent: 12, resetAt: nil)], - plan: "Pro", - error: nil), + plan: "Pro"), GatewayUsageProvider( provider: "openai", displayName: "Codex", windows: [GatewayUsageWindow(label: "day", usedPercent: 3, resetAt: nil)], - plan: nil, - error: nil), + plan: nil), ]) - injector.setTestingUsageSummary(usage, errorText: nil) + injector.setTestingUsageSummary(usage) let menu = NSMenu() menu.addItem(NSMenuItem(title: "Header", action: nil, keyEquivalent: "")) diff --git a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatLinkPreview.swift b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatLinkPreview.swift index b476e020860c..f826d604e7e4 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatLinkPreview.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatLinkPreview.swift @@ -30,14 +30,6 @@ enum ChatLinkPreviewResult: Equatable { struct ChatLinkPreviewThumbnail: @unchecked Sendable { let image: CGImage - - var pixelWidth: Int { - self.image.width - } - - var pixelHeight: Int { - self.image.height - } } enum ChatLinkPreviewImageResult: @unchecked Sendable { @@ -352,7 +344,6 @@ extension [UInt8] { } func chatLinkPreviewRedirectURL( - response: HTTPURLResponse, request: URLRequest, redirectCount: Int, hostPolicy: (URL) -> Bool = chatLinkPreviewAllowsHost) -> URL? @@ -568,13 +559,12 @@ private final class ChatLinkPreviewSessionDelegate: NSObject, URLSessionDataDele func urlSession( _: URLSession, task _: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, + willPerformHTTPRedirection _: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void) { let nextURL = self.lock.withLock { let url = chatLinkPreviewRedirectURL( - response: response, request: request, redirectCount: self.redirectCount, hostPolicy: self.hostPolicy) diff --git a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownBlockViews.swift b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownBlockViews.swift index bbef2082d72f..c4b946901b06 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownBlockViews.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMarkdownBlockViews.swift @@ -141,7 +141,7 @@ struct ChatMarkdownTableView: View { GridRow { ForEach(self.table.header.indices, id: \.self) { column in // One cell per column carries the GFM alignment. - self.cell(self.table.header[column], column: column, isHeader: true) + self.cell(self.table.header[column], isHeader: true) .gridColumnAlignment(self.columnAlignment(column)) } } @@ -149,7 +149,7 @@ struct ChatMarkdownTableView: View { ForEach(self.table.rows.indices, id: \.self) { rowIndex in GridRow { ForEach(self.table.rows[rowIndex].indices, id: \.self) { column in - self.cell(self.table.rows[rowIndex][column], column: column, isHeader: false) + self.cell(self.table.rows[rowIndex][column], isHeader: false) } } } @@ -165,7 +165,7 @@ struct ChatMarkdownTableView: View { .strokeBorder(Color.white.opacity(0.08), lineWidth: 1))) } - private func cell(_ text: String, column: Int, isHeader: Bool) -> some View { + private func cell(_ text: String, isHeader: Bool) -> some View { Text(self.inlineMarkdown(text)) .font(isHeader ? OpenClawChatTypography.footnoteSemiBold : OpenClawChatTypography.footnote) .foregroundStyle(OpenClawChatTheme.assistantText) diff --git a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTheme.swift b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTheme.swift index 54878b09efe2..6e590219f099 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTheme.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTheme.swift @@ -21,7 +21,6 @@ enum OpenClawChatTheme { static let lightCanvasMiddle = UIColor(red: 250 / 255.0, green: 251 / 255.0, blue: 252 / 255.0, alpha: 1) static let lightCanvasBottom = UIColor.white static let lightAccent = UIColor(red: 220 / 255.0, green: 38 / 255.0, blue: 38 / 255.0, alpha: 1) - static let lightAccentHot = UIColor(red: 239 / 255.0, green: 68 / 255.0, blue: 68 / 255.0, alpha: 1) static let darkCanvasTop = UIColor(red: 12 / 255.0, green: 13 / 255.0, blue: 15 / 255.0, alpha: 1) static let darkCanvasMiddle = UIColor(red: 7 / 255.0, green: 8 / 255.0, blue: 10 / 255.0, alpha: 1) static let darkCanvasBottom = UIColor(red: 4 / 255.0, green: 5 / 255.0, blue: 6 / 255.0, alpha: 1) @@ -29,7 +28,6 @@ enum OpenClawChatTheme { static let darkPanelRaised = UIColor(red: 17 / 255.0, green: 18 / 255.0, blue: 21 / 255.0, alpha: 1) static let darkComposer = UIColor(red: 24 / 255.0, green: 25 / 255.0, blue: 28 / 255.0, alpha: 1) static let darkAccent = UIColor(red: 198 / 255.0, green: 49 / 255.0, blue: 42 / 255.0, alpha: 1) - static let darkAccentHot = UIColor(red: 239 / 255.0, green: 62 / 255.0, blue: 82 / 255.0, alpha: 1) } private static func adaptiveColor( @@ -66,14 +64,6 @@ enum OpenClawChatTheme { dynamicProvider: resolvedOnboardingAssistantBubbleColor(for:)) #endif - static var surface: Color { - #if os(macOS) - Color(nsColor: .windowBackgroundColor) - #else - Color(uiColor: .systemBackground) - #endif - } - @ViewBuilder static var background: some View { #if os(macOS) @@ -101,14 +91,6 @@ enum OpenClawChatTheme { #endif } - static var card: Color { - #if os(macOS) - Color(nsColor: .textBackgroundColor) - #else - self.adaptiveColor(light: .secondarySystemBackground, dark: IOSPalette.darkPanel) - #endif - } - static var subtleCard: AnyShapeStyle { #if os(macOS) AnyShapeStyle(.ultraThinMaterial) diff --git a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTypography.swift b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTypography.swift index 8a2a0eff2081..0e463d861fe4 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTypography.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatTypography.swift @@ -7,14 +7,6 @@ import AppKit enum OpenClawChatTypography { static let bodySize: CGFloat = 17 - static var title3: Font { - display(size: 22, weight: .bold, relativeTo: .title2) - } - - static var title3SemiBold: Font { - display(size: 22, weight: .semibold, relativeTo: .title2) - } - static var headline: Font { display(size: 17, weight: .semibold, relativeTo: .headline) } diff --git a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Thinking.swift b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Thinking.swift index e60a8f2b3c31..584581eff607 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Thinking.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Thinking.swift @@ -57,11 +57,6 @@ extension OpenClawChatViewModel { self.sessions[index].thinkingLevel = thinkingLevel } - /// `agent-command.ts` throws for explicit unsupported levels, so hidden controls must send `off`. - var effectiveThinkingLevelForSend: String { - self.effectiveThinkingLevelForSend(self.preferredThinkingLevel) - } - func effectiveThinkingLevelForSend( _ storedLevel: String, sessionKey: String? = nil, diff --git a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/OpenClawMascotView.swift b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/OpenClawMascotView.swift index 903ca13da381..237923fd370d 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawChatUI/OpenClawMascotView.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawChatUI/OpenClawMascotView.swift @@ -181,8 +181,6 @@ struct OpenClawMascotPose: Equatable { var effect: OpenClawMascotEffect = .none var effectPhase: CGFloat = 0 - static let still = OpenClawMascotPose() - /// Motionless expression per mood for Reduce Motion users. static func staticPose(for mood: OpenClawMascotMood) -> OpenClawMascotPose { var pose = OpenClawMascotPose() diff --git a/apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatLinkPreviewTests.swift b/apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatLinkPreviewTests.swift index b45e19977567..1c4ab196fda4 100644 --- a/apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatLinkPreviewTests.swift +++ b/apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatLinkPreviewTests.swift @@ -124,40 +124,24 @@ struct ChatLinkPreviewHostPolicyTests { struct ChatLinkPreviewFetcherDecisionTests { @Test func `redirect decision enforces hop limit and host policy`() throws { - let originalURL = try #require(URL(string: "https://example.com/start")) - let response = try #require(HTTPURLResponse( - url: originalURL, - statusCode: 302, - httpVersion: nil, - headerFields: ["Location": "https://example.org/next"])) let publicRequest = try URLRequest(url: #require(URL(string: "https://example.org/next"))) let privateRequest = try URLRequest(url: #require(URL(string: "http://127.0.0.1/next"))) #expect(chatLinkPreviewRedirectURL( - response: response, request: publicRequest, redirectCount: 2) == publicRequest.url) #expect(chatLinkPreviewRedirectURL( - response: response, request: publicRequest, redirectCount: 3) == nil) #expect(chatLinkPreviewRedirectURL( - response: response, request: privateRequest, redirectCount: 0) == nil) } @Test func `image redirects use the same hop and host rules`() throws { - let originalURL = try #require(URL(string: "https://images.example/start")) - let response = try #require(HTTPURLResponse( - url: originalURL, - statusCode: 302, - httpVersion: nil, - headerFields: ["Location": "http://127.0.0.1/private.png"])) let privateRequest = try URLRequest(url: #require(URL(string: "http://127.0.0.1/private.png"))) #expect(chatLinkPreviewRedirectURL( - response: response, request: privateRequest, redirectCount: 0) == nil) } @@ -253,8 +237,8 @@ struct ChatLinkPreviewNetworkTests { let data = try makeChatLinkPreviewPNG(width: 1200, height: 800) let thumbnail = try #require(chatDecodeLinkPreviewThumbnail(data, mimeType: "image/png")) - #expect(max(thumbnail.pixelWidth, thumbnail.pixelHeight) == chatLinkPreviewImageMaxPixelSize) - #expect(min(thumbnail.pixelWidth, thumbnail.pixelHeight) <= chatLinkPreviewImageMaxPixelSize) + #expect(max(thumbnail.image.width, thumbnail.image.height) == chatLinkPreviewImageMaxPixelSize) + #expect(min(thumbnail.image.width, thumbnail.image.height) <= chatLinkPreviewImageMaxPixelSize) } @Test func `source pixel limit rejects oversized dimensions before decode`() throws { diff --git a/apps/shared/OpenClawKit/Tests/OpenClawKitTests/OpenClawMascotAnimatorTests.swift b/apps/shared/OpenClawKit/Tests/OpenClawKitTests/OpenClawMascotAnimatorTests.swift index 1b4f2cf82ef0..85979f5305ab 100644 --- a/apps/shared/OpenClawKit/Tests/OpenClawKitTests/OpenClawMascotAnimatorTests.swift +++ b/apps/shared/OpenClawKit/Tests/OpenClawKitTests/OpenClawMascotAnimatorTests.swift @@ -157,7 +157,7 @@ struct OpenClawMascotAnimatorTests { #expect(celebrating.leftClawDegrees > 0) #expect(celebrating.mouthCurve > 0) let idle = OpenClawMascotPose.staticPose(for: .idle) - #expect(idle == .still) + #expect(idle == OpenClawMascotPose()) } @Test func `clamp channels bounds every channel`() {