Skip to content

Commit 4cc9200

Browse files
authored
feat(mac): unified Liquid Glass pairing approval panel (#102601)
* feat(mac): unified Liquid Glass pairing approval panel Replace the serial node/device pairing NSAlerts with one floating approval panel. Both prompters feed request cards into a shared PairingApprovalCenter; each card shows a hardware icon, platform and model, app/core version, source IP, a copyable short id, request age, a trust line (first connection / already-paired-id caution / repair token rotation), and a friendly access summary with an elevated warning for system.run-class commands. Requests resolved elsewhere disappear live; Not Now snoozes without resolving (gateway TTL applies) and the menu-bar pending line reopens the panel. Liquid Glass surface on macOS 26+, material fallback on macOS 15. Deletes the NSAlert + invisible-host-window machinery, dead node isRepair handling, and text-only describe() body. Closes #102535 * fix(mac): satisfy swiftformat conditionalAssignment and resync native i18n inventory
1 parent 6433b82 commit 4cc9200

12 files changed

Lines changed: 1639 additions & 930 deletions

apps/.i18n/native-source.json

Lines changed: 155 additions & 115 deletions
Large diffs are not rendered by default.

apps/macos/Sources/OpenClaw/DebugActions.swift

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,51 @@ enum DebugActions {
251251
proc.arguments = ["code", path]
252252
try? proc.run()
253253
}
254+
255+
#if DEBUG
256+
@MainActor
257+
static func showPairingPanelDemo() {
258+
let now = Date()
259+
PairingApprovalCenter.shared.injectDemoCards([
260+
PairingApprovalCenter.Card(
261+
kind: .node,
262+
requestId: "demo-node-1",
263+
subjectId: "19cec1c3301a7469d4fd71f5f81339508390dadda91b34aee15faf2849dccdc7",
264+
displayName: "Peter's MacBook Pro",
265+
platform: "macos 26.5",
266+
deviceFamily: "Mac",
267+
modelIdentifier: "MacBookPro18,3",
268+
version: "2026.6.11",
269+
coreVersion: "2026.6.10",
270+
remoteIp: "192.168.1.42",
271+
role: nil,
272+
scopes: [],
273+
caps: ["screen", "camera", "file"],
274+
commands: ["system.run", "system.notify"],
275+
isRepair: false,
276+
previouslyPaired: false,
277+
requestedAt: now.addingTimeInterval(-45)),
278+
PairingApprovalCenter.Card(
279+
kind: .device,
280+
requestId: "demo-device-1",
281+
subjectId: "4a865684dbfa7b7937bd333813476ca88b672c2d02ad08fc52b80d88af4e82bd",
282+
displayName: "OpenClaw iPhone",
283+
platform: "ios 26.4",
284+
deviceFamily: nil,
285+
modelIdentifier: nil,
286+
version: nil,
287+
coreVersion: nil,
288+
remoteIp: "192.168.1.87",
289+
role: "operator",
290+
scopes: ["operator.read", "operator.write", "operator.approvals"],
291+
caps: [],
292+
commands: [],
293+
isRepair: true,
294+
previouslyPaired: true,
295+
requestedAt: now.addingTimeInterval(-190)),
296+
])
297+
}
298+
#endif
254299
}
255300

256301
enum DebugActionError: LocalizedError {

0 commit comments

Comments
 (0)