Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix(spaces-macos): access indicators, teleport progress steps, layout nits (#4424)
dduponted0a57d50e02
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swiftindex 11b5332b4a..e212d65ef3 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift@@ -148,7 +148,14 @@ public final class AppModel {self.storage.telemetry = telemetryself.devices.telemetry = telemetry// Live Keyvault sign-ins show left of the notch (and in the menu).- keyvault.onSharing = { [weak notch = self.notch] label in notch?.setKeyvault(label: label) }+ // Dismissed ones stay hidden across launches (Settings file).+ keyvault.dismissed = settings.dismissedAccess+ keyvault.onSharing = { [weak self] _ in self?.syncNotchKeyvault() }+ keyvault.onDismissed = { [weak self] ids in+ guard let self else { return }+ self.settings.dismissedAccess = ids+ self.saveSettings()+ }self.host.onChange = { [weak self] in self?.recompose() }// The first run's "Where should Cua Spaces show up?" is this setting.onboarding.onPresentation = { [weak self] menuBar in@@ -236,6 +243,27 @@ public final class AppModel {public func send(_ action: AppRosterAction) {roster = appRosterReduce(state: roster, action: action)notch.spaces = roster.spaces+ syncNotchKeyvault()+ }++ // MARK: - Keyvault sign-ins in Spaces++ /// The Spaces a Keyvault sign-in is live in ("Signed in" in the list;+ /// dismissing hides only the notch's indicator).+ public var signedInSpaceIds: Set<String> { Set(keyvault.signedIn(spaces)) }++ /// The notch's key indicator, its line and the tiles' key, without the+ /// dismissed copies.+ func syncNotchKeyvault() {+ notch.setKeyvault(label: keyvault.notchLabel, signedIn: keyvault.signedIn(spaces, notch: true))+ }++ /// A Space's "Signed in" badge: the Keyvault's Access page, with that+ /// Space's row brought forward.+ public func showAccess(spaceId: String) {+ keyvault.focusKey = spaces.first { $0.id == spaceId }.flatMap { keyvault.accessKey(for: $0) }+ keyvault.selection = .category(category: .access)+ selection = .keyvault(.category(category: .access))}/// The roster: This machine first (when this app manages a host), then@@ -592,7 +620,7 @@ public final class AppModel {menuBar: settings.menuBar, defaultLocation: settings.defaultLocation, locationLockedBy: nil,telemetry: telemetryInput, agents: agentRows, agentsBusy: agentsBusy, agentsPending: agentsPending,billing: identity == nil ? nil : billingStatus, loginItem: loginItemInput,- experiments: settings.experiments))+ experiments: settings.experiments, keyvaultAutoWipe: keyvault.autoWipe))}/// Settings, General with Settings, Storage after General while the Cua@@ -689,6 +717,7 @@ public final class AppModel {await storage.load()await reloadBilling()await reloadAgents()+ await keyvault.refresh()}func reloadBilling() async {@@ -731,6 +760,9 @@ public final class AppModel {saveSettings()case "launch-at-login":setLaunchAtLogin(option == "on")+ case "keyvault-auto-wipe":+ await keyvault.setAutoWipe(option == "on")+ if let error = keyvault.error { show(error: error) }case "telemetry":do {telemetryInput = try telemetry?.setEnabled(option == "on")diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/KeyvaultModel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/KeyvaultModel.swiftindex 0482be879b..3f31c43feb 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/KeyvaultModel.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/KeyvaultModel.swift@@ -47,8 +47,47 @@ public final class KeyvaultModel {/// when nothing is): the notch indicator and the menu bar line.public var sharingLabel: String? { kvSharingLabel(overview: overview, nowMs: nowMs) }- /// Told the sharing label after every refresh.+ /// Told the sharing label after every refresh (and after a dismissal).public var onSharing: (@MainActor (String?) -> Void)?++ /// Copies (import ids) the user dismissed from the notch. Dismiss hides+ /// the indicator and the tiles' key; it revokes and wipes nothing.+ public var dismissed: [String] = []+ /// Told the dismissed copies when they change (the app saves them).+ public var onDismissed: (@MainActor ([String]) -> Void)?+ /// The Access row to bring forward (a Space's "Signed in" badge).+ public var focusKey: String?++ /// The notch's indicator: the sharing label without dismissed copies.+ public var notchLabel: String? {+ kvVisibleSharingLabel(overview: overview, nowMs: nowMs, dismissed: dismissed)+ }++ /// The ids of `spaces` signed in through the Keyvault: all of them+ /// (`notch: false`, the Spaces list), or less the dismissed copies.+ public func signedIn(_ spaces: [AppSpace], notch: Bool = false) -> [String] {+ kvSignedInSpaces(overview: overview, nowMs: nowMs, dismissed: notch ? dismissed : [], spaces: spaces)+ }++ /// The Access row of `space`'s copies.+ public func accessKey(for space: AppSpace) -> String? {+ kvSpaceAccessKey(overview: overview, nowMs: nowMs, space: space)+ }++ /// Hides `imports` (or every live copy) from the notch.+ public func dismiss(_ imports: [String]? = nil) {+ let ids = imports ?? overview.deliveries.map(\.importId)+ let next = dismissed + ids.filter { !dismissed.contains($0) }+ guard next != dismissed else { return }+ dismissed = next+ onDismissed?(dismissed)+ onSharing?(sharingLabel)+ }++ /// Whether every copy of an Access row is dismissed.+ public func isDismissed(_ row: KvAccessRow) -> Bool {+ !row.imports.isEmpty && row.imports.allSatisfy(dismissed.contains)+ }public var sidebar: KvSidebar { kvSidebar(overview: overview, nowMs: nowMs) }public var list: KvListView { kvList(overview: overview, selection: selection, nowMs: nowMs, query: query) }@@ -64,6 +103,15 @@ public final class KeyvaultModel {public func refresh() async {guard let client else { return }overview = await client.overview()+ // Forget dismissals of copies that were wiped or expired (only+ // when the broker answered: an unavailable page lists none).+ if overview.availability == "ready" {+ let live = kvPruneDismissed(overview: overview, nowMs: nowMs, dismissed: dismissed)+ if live != dismissed {+ dismissed = live+ onDismissed?(live)+ }+ }onSharing?(sharingLabel)// The recovery key is shown once: never again after the vault locks.if overview.availability == "locked" { recoveryKey = nil }@@ -148,6 +196,12 @@ public final class KeyvaultModel {public func setDisabled(_ disabled: Bool) async { await run(.setDisabled(disabled: disabled)) }+ /// Auto-wipe of access given to Spaces (off by default; turning it off+ /// makes the daemon ask for Touch ID).+ public var autoWipe: Bool? { overview.status?.autoWipe }++ public func setAutoWipe(_ on: Bool) async { await run(.setAutoWipe(on: on)) }+public func setUnattended(itemIds: [String], on: Bool) async {await run(.setUnattended(itemIds: itemIds, unattended: on))}diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/NotchModel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/NotchModel.swiftindex e93c804bec..bbf65acb1e 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/NotchModel.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/NotchModel.swift@@ -72,10 +72,11 @@ public final class NotchModel {}/// Keyvault sign-ins went live in a Space, changed, or stopped (the- /// core's sharing label; nil when nothing is live).- public func setKeyvault(label: String?) {- guard label != state.keyvault else { return }- send(.keyvault(label: label))+ /// core's sharing label less dismissed copies, nil when nothing shows;+ /// the Space ids whose tiles carry the key).+ public func setKeyvault(label: String?, signedIn: [String] = []) {+ guard label != state.keyvault || signedIn != state.signedIn else { return }+ send(.keyvault(label: label, signedIn: signedIn))}/// The header's search text.diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/TeleportModel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/TeleportModel.swiftindex db554d37f9..12d7b5089f 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/TeleportModel.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/TeleportModel.swift@@ -314,6 +314,10 @@ public final class TeleportModel {public var review: AppReviewView? { appPickerReview(state: state) }public var canPlan: Bool { appPickerCanPlan(state: state) }public var progress: Double { appPickerProgress(state: state) }+ /// What the run is doing, in words, under the bar (the core's reading+ /// of the SDK's step events): "Reading Chrome cookies (macOS will ask+ /// for Keychain access)…", "Uploading 12 / 80 MB".+ public var status: String? { appPickerStatus(state: state) }public func send(_ event: AppPickerEvent) {state = appPickerReduce(state: state, event: event)@@ -366,7 +370,9 @@ public final class TeleportModel {let report = try await teleport.run(plan: plan, space: space,consent: sdkConsent(consent),- listener: nil)+ listener: RunEvents { [weak self] event in+ Task { @MainActor in self?.send(.progress(event: appTeleportRunEvent(event: event))) }+ })send(.finished(report: AppTeleportRunReport(appId: report.appId, installed: report.installed, sent: report.sent,imported: report.imported, skipped: report.skipped, launched: report.launched)))@@ -381,6 +387,13 @@ public final class TeleportModel {}}+/// The SDK's run events, on its worker thread, handed to `handler`.+final class RunEvents: TeleportRunListener, @unchecked Sendable {+ let handler: @Sendable (TeleportRunEvent) -> Void+ init(_ handler: @escaping @Sendable (TeleportRunEvent) -> Void) { self.handler = handler }+ func onEvent(event: TeleportRunEvent) { handler(event) }+}+extension AppTeleportMove {var sdk: TeleportMove {switch self {diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Notch/NotchContentView.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Notch/NotchContentView.swiftindex 82c380dd92..38dfa10168 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Notch/NotchContentView.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Notch/NotchContentView.swift@@ -182,7 +182,17 @@ struct NotchContentView: View {// The cue grows the notch and its tab as one, about the notch's// top centre..frame(width: g.stage.width, alignment: .top)- .scaleEffect(x: shape == .cue ? motion.hoverScale : 1, y: 1, anchor: .top)+ .scaleEffect(x: shape == .cue && !reduceMotion ? motion.hoverScale : 1,+ y: shape == .cue && !reduceMotion ? motion.hoverScaleY : 1, anchor: .top)+ // Reduce Motion: the cue is a faint rim instead of a spring.+ .overlay(alignment: .top) {+ if shape == .cue, reduceMotion, g.notchStyle {+ NotchShape(top: radii.closed.top, bottom: radii.closed.bottom)+ .stroke(.white.opacity(0.28), lineWidth: 1)+ .frame(width: size.width, height: size.height)+ .transition(.opacity)+ }+ }.animation(.spring(response: motion.openResponse, dampingFraction: motion.closeDamping), value: g)// Always present, so its frame (and the clip) springs with the// shape; the content inside is laid out at its final size.@@ -365,6 +375,8 @@ struct NotchContentView: View {}if let p = v.permission {permissionRow(p).frame(height: 36, alignment: .top)+ } else if let a = v.access {+ accessRow(a).frame(height: 36, alignment: .top)} else if let prompt = v.prompt {Text(prompt).font(.system(size: 12, weight: .medium))@@ -461,6 +473,32 @@ struct NotchContentView: View {}}+ /// Live Keyvault sign-ins: the key, what is live (opens the Access+ /// page) and Dismiss, which only hides this.+ private func accessRow(_ a: AppNotchAccess) -> some View {+ HStack(spacing: 8) {+ Button { model.send(.dismiss); controller.onOpenAccess?() } label: {+ HStack(spacing: 6) {+ Image(systemName: "key.fill")+ .font(.system(size: 10, weight: .semibold))+ .foregroundStyle(Color(red: 0x34 / 255, green: 0xc7 / 255, blue: 0x59 / 255))+ Text(a.text)+ .font(.system(size: 12))+ .foregroundStyle(.white.opacity(0.8))+ .lineLimit(1)+ }+ }+ .buttonStyle(.plain)+ .help("Show in Keyvault")+ Spacer(minLength: 8)+ Button(a.dismiss) { controller.onDismissAccess?() }+ .buttonStyle(.bordered)+ .controlSize(.small)+ .help("Hide this until something new is shared. Access stays.")+ .accessibilityIdentifier("notch-dismiss-access")+ }+ }+@ViewBuilder private func tiles(_ v: AppNotchView) -> some View {let row = HStack(alignment: .top, spacing: 12) {ForEach(v.tiles, id: \.id) { tile in@@ -531,6 +569,11 @@ struct TileView: View {.font(.system(size: 10, weight: .medium)).foregroundStyle(.white.opacity(0.6))}+ if tile.signedIn {+ SignedInKey()+ .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing)+ .padding(5)+ }if let ghost {Image(nsImage: ghost).resizable()@@ -581,6 +624,20 @@ struct TileView: View {}}+/// A Space signed in through the Keyvault: a small key on its thumbnail.+struct SignedInKey: View {+ var body: some View {+ Image(systemName: "key.fill")+ .font(.system(size: 8, weight: .bold))+ .foregroundStyle(.white)+ .frame(width: 16, height: 16)+ .background(Circle().fill(.black.opacity(0.65)))+ .overlay(Circle().strokeBorder(.white.opacity(0.18), lineWidth: 0.5))+ .accessibilityLabel("Signed in")+ .help("Signed in through the Keyvault")+ }+}+/// The tab's two rows (the Tauri tab's type): the count at 11 pt bold with/// tabular digits over the word at 8 pt semibold, uppercase, 70% white.struct NotchTabLabel: View {diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Notch/NotchPanel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Notch/NotchPanel.swiftindex cb267b5bf5..2828641b30 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Notch/NotchPanel.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Notch/NotchPanel.swift@@ -87,6 +87,11 @@ public final class NotchController {@ObservationIgnored public var onTeleport: ((String, TeleportCatalogEntry?) -> Void)?/// A tile was clicked.@ObservationIgnored public var onOpenSpace: ((String) -> Void)?+ /// The live-access line was clicked: the Keyvault's Access page.+ @ObservationIgnored public var onOpenAccess: (() -> Void)?+ /// Its Dismiss: hide the indicator and the tiles' key (nothing is+ /// revoked or wiped).+ @ObservationIgnored public var onDismissAccess: (() -> Void)?/// Opens (or brings forward) the main window, which may have been/// closed while the notch stayed up. Set by the notch view.@ObservationIgnored public var showMain: (() -> Void)?@@ -199,7 +204,7 @@ public final class NotchController {/// The layout needs the prompt row when the open panel shows a line/// above the tiles (a drop hint or the permission line).- static func needsRow(_ v: AppNotchView) -> Bool { v.prompt != nil || v.permission != nil }+ static func needsRow(_ v: AppNotchView) -> Bool { v.prompt != nil || v.permission != nil || v.access != nil }/// Re-reads the layout and sizes the panel to its stage frame. The panel/// only changes size here (screen change, the row appearing), neverdiff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/CuaSpacesMacApp.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/CuaSpacesMacApp.swiftindex baa86eccb5..6e9f20726d 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/CuaSpacesMacApp.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/CuaSpacesMacApp.swift@@ -204,6 +204,12 @@ final class AppDelegate: NSObject, NSApplicationDelegate {NSApp.activate()controller?.showMain?()}+ controller.onOpenAccess = { [weak controller] in+ model.selection = .keyvault(.category(category: .access))+ NSApp.activate()+ controller?.showMain?()+ }+ controller.onDismissAccess = { model.keyvault.dismiss() }controller.onTeleport = { [weak controller] spaceId, entry inmodel.select(spaceId)model.pendingTeleport = PendingTeleport(spaceId: spaceId, entry: entry, files: [])diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/KeyvaultViews.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/KeyvaultViews.swiftindex a6914aadaf..0f5b4d7454 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/KeyvaultViews.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/KeyvaultViews.swift@@ -114,6 +114,7 @@ struct CategoryList: View {var body: some View {let list = keyvault.list+ ScrollViewReader { proxy inForm {if !list.sites.isEmpty {ForEach(list.sites, id: \.key) { group in@@ -151,9 +152,16 @@ struct CategoryList: View {HStack {Text(a.detail.isEmpty ? a.text : "\(a.text) \u{b7} \(a.detail)").lineLimit(1).help(a.detail)Spacer()+ // Hides the notch's indicator only; Wipe removes it.+ if !a.imports.isEmpty, !keyvault.isDismissed(a) {+ Button("Dismiss") { keyvault.dismiss(a.imports) }+ .help("Hide from the notch. Access stays until you wipe it.")+ }Button(a.actionLabel) { Task { await keyvault.run(a.command) } }.disabled(keyvault.busy)}+ .id(a.key)+ .listRowBackground(keyvault.focusKey == a.key ? Color.accentColor.opacity(0.12) : nil)}}}@@ -181,6 +189,15 @@ struct CategoryList: View {}.formStyle(.grouped).searchable(text: $keyvault.query)+ .task(id: keyvault.focusKey) {+ // A Space's "Signed in" badge: bring its row forward, then let+ // the highlight go.+ guard let key = keyvault.focusKey else { return }+ withAnimation { proxy.scrollTo(key, anchor: .center) }+ try? await Task.sleep(for: .seconds(2))+ if keyvault.focusKey == key { withAnimation { keyvault.focusKey = nil } }+ }+ }}}diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/MainWindow.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/MainWindow.swiftindex 536a938b4d..c0fb8d54cb 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/MainWindow.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/MainWindow.swift@@ -117,6 +117,9 @@ extension KvApprovalState: @retroactive Identifiable {struct Sidebar: View {@Bindable var model: AppModel+ /// The Spaces a Keyvault sign-in is live in (read once per draw).+ private var signedIn: Set<String> { model.signedInSpaceIds }+var body: some View {let sidebar = model.sidebarlet kv = model.keyvault@@ -166,7 +169,9 @@ struct Sidebar: View {/// A Space row; also a drop target for a dragged real window.private func spaceRow(_ row: AppSidebarRow) -> some View {- SpaceRowView(row: row, targeted: model.dropTargets.targetedId == row.id) { on in+ SpaceRowView(row: row, targeted: model.dropTargets.targetedId == row.id,+ signedIn: signedIn.contains(row.id),+ onSignedIn: { model.showAccess(spaceId: row.id) }) { on inif let space = model.spaces.first(where: { $0.id == row.id }) {model.setPower(space, on: on)}@@ -218,6 +223,10 @@ struct SidebarFooter: View {struct SpaceRowView: View {let row: AppSidebarRowvar targeted = false+ /// A Keyvault sign-in is live in it: "Signed in", which opens the+ /// Keyvault's Access page.+ var signedIn = false+ var onSignedIn: (() -> Void)?/// The power button was pressed: turn it on (`true`) or off.var onPower: ((Bool) -> Void)?@State private var hovering = false@@ -254,6 +263,9 @@ struct SpaceRowView: View {.truncationMode(.tail).help(trailing)}+ if signedIn {+ SignedInBadge { onSignedIn?() }+ }if let power = row.power, let onPower,hovering || row.selected || power.busy {PowerButton(button: power) { onPower(power.turnOn) }@@ -286,6 +298,29 @@ struct SpaceRowView: View {}}+/// "Signed in": a Keyvault sign-in is live in this Space. Opens the+/// Keyvault's Access page on it.+struct SignedInBadge: View {+ let action: () -> Void++ var body: some View {+ Button(action: action) {+ Label("Signed in", systemImage: "key.fill")+ .labelStyle(.titleAndIcon)+ .font(.caption2.weight(.medium))+ .foregroundStyle(.secondary)+ .padding(.horizontal, 5)+ .padding(.vertical, 1)+ .background(Capsule().fill(.quaternary))+ }+ .buttonStyle(.plain)+ .fixedSize()+ .help("Keyvault access is live in this Space. Show it in Keyvault.")+ .accessibilityLabel("Signed in. Show in Keyvault")+ .accessibilityIdentifier("space-signed-in")+ }+}+/// The power button (the core's `AppPowerButton`): the `power` symbol, a/// small spinner while it runs, the core's words as its tooltip.struct PowerButton: View {diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/TeleportPickerSheet.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/TeleportPickerSheet.swiftindex 5e4f7e8c53..dd3af7fc81 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/TeleportPickerSheet.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/TeleportPickerSheet.swift@@ -27,7 +27,7 @@ struct TeleportPickerSheet: View {case .consent:reviewcase .running:- ProgressView(value: teleport.progress).padding(20)+ TeleportRunning(progress: teleport.progress, status: teleport.status)case .done:Text("Done").padding(20)case .error:@@ -266,3 +266,25 @@ struct TeleportTileView: View {.accessibilityAddTraits(tile.selected ? [.isButton, .isSelected] : .isButton)}}++/// The run: the bar, and under it the step it is on in words, so the+/// Keychain prompts that come with reading a browser's cookies are expected.+struct TeleportRunning: View {+ let progress: Double+ let status: String?++ var body: some View {+ VStack(alignment: .leading, spacing: 8) {+ ProgressView(value: progress)+ Text(status ?? " ")+ .font(.callout)+ .foregroundStyle(.secondary)+ .lineLimit(2)+ .fixedSize(horizontal: false, vertical: true)+ .contentTransition(.opacity)+ .animation(.easeInOut(duration: 0.15), value: status)+ .accessibilityIdentifier("teleport-run-status")+ }+ .padding(20)+ }+}diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/NotchTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/NotchTests.swiftindex d13ddcdaf5..9d4d767136 100644--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/NotchTests.swift+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/NotchTests.swift@@ -164,6 +164,34 @@ struct NotchTests {#expect(s.content == nil)}+ /// Entering the dwell zone answers at once: the cue starts on the+ /// first hover event (not when the dwell ends), with a springy curve a+ /// few points wider and taller; leaving early springs it back. Reduce+ /// Motion swaps the spring for a fade (the view draws a faint rim).+ @Test func theCueRespondsAtOnceWithASpringAndFadesUnderReduceMotion() {+ let clock = ManualScheduler()+ let notch = NotchModel(scheduler: clock)+ var s = NotchStage(settledOn: notch.view.phase, cue: notch.view.hoverCue)+ notch.send(.hoverEnter)+ #expect(notch.view.hoverCue, "the cue shows before any time passes")+ #expect(s.update(phase: notch.view.phase, cue: notch.view.hoverCue, motion: motion,+ reduceMotion: false) == [.shape(.cue, .cue)])+ clock.advance(motion.hoverDwellMs / 2)+ notch.send(.hoverExit)+ #expect(!notch.view.hoverCue && notch.view.phase == .closed, "left early: back, never opened")+ #expect(s.update(phase: notch.view.phase, cue: notch.view.hoverCue, motion: motion,+ reduceMotion: false) == [.shape(.closed, .cue)])+ // The spring: quick, a little bounce, wider and taller.+ #expect(motion.hoverResponse <= 0.3)+ #expect(motion.hoverDamping >= 0.6 && motion.hoverDamping <= 0.7)+ #expect(motion.hoverScale > 1 && motion.hoverScaleY > 1)+ #expect(NotchStage.animation(.cue, motion)+ == .spring(response: motion.hoverResponse, dampingFraction: motion.hoverDamping))+ var r = NotchStage(settledOn: .closed)+ #expect(r.update(phase: .closed, cue: true, motion: motion, reduceMotion: true) == [.shape(.cue, .fade)])+ #expect(r.update(phase: .closed, cue: false, motion: motion, reduceMotion: true) == [.shape(.closed, .fade)])+ }+@Test func aDragMorphsPromptToTilesAndBack() {var s = NotchStage(settledOn: .closed)let open = s.update(phase: .prompt, cue: false, motion: motion, reduceMotion: false)diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ParityTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ParityTests.swiftindex 67e0827155..5f6f0111b8 100644--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ParityTests.swift+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ParityTests.swift@@ -632,7 +632,7 @@ struct ParityTests {"openResponse": m.openResponse, "openDamping": m.openDamping,"closeResponse": m.closeResponse, "closeDamping": m.closeDamping,"reducedDuration": m.reducedDuration, "hoverResponse": m.hoverResponse,- "hoverDamping": m.hoverDamping, "hoverScale": m.hoverScale,+ "hoverDamping": m.hoverDamping, "hoverScale": m.hoverScale, "hoverScaleY": m.hoverScaleY,"contentDelayMs": m.contentDelayMs, "contentIn": m.contentIn,"contentOut": m.contentOut, "contentScale": m.contentScale,] as [String: Any]])diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/SnapshotTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/SnapshotTests.swiftindex 21139b5296..300df10a50 100644--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/SnapshotTests.swift+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/SnapshotTests.swift@@ -26,8 +26,10 @@ struct SnapshotTests {init() { _ = NSApplication.shared }- func model(kv: Bool = true, loginItem: FixtureLoginItem = FixtureLoginItem()) async throws -> AppModel {- let m = ViewModelTests().makeModel(FixtureSpacesBackend(), kv: kv ? FakeKeyvault(try fixtureOverview()) : nil,+ func model(kv: Bool = true, loginItem: FixtureLoginItem = FixtureLoginItem(),+ overview: KeyvaultOverview? = nil) async throws -> AppModel {+ let m = ViewModelTests().makeModel(FixtureSpacesBackend(),+ kv: kv ? FakeKeyvault(try overview ?? fixtureOverview()) : nil,host: FixtureHost(), account: FixtureAccount(),agents: FixtureAgentSetup(), loginItem: loginItem)m.onboarding.finish()@@ -199,6 +201,71 @@ struct SnapshotTests {size: CGSize(width: 640, height: 540))}+ /// A Keyvault sign-in live in Aurora (auto-wipe off: no expiry).+ func signedInOverview() throws -> KeyvaultOverview {+ var o = try fixtureOverview()+ o.status?.autoWipe = false+ o.deliveries = [KvDelivery(importId: "imp-aurora", target: "local:aurora", providerId: "chrome",+ items: ["gh-ada"], callerFp: "fp-koala", deliveredMs: 1_799_999_000_000,+ expiresMs: 0, wiped: false)]+ return o+ }++ /// "Signed in" beside the Space a Keyvault sign-in is live in.+ @Test func mainWindowSidebarSignedIn() async throws {+ let m = try await model(overview: try signedInOverview())+ m.select("cloud:builder")+ try assertSnapshot(Sidebar(model: m).frame(width: 260), "sidebar-signed-in", size: CGSize(width: 260, height: 520))+ }++ /// Access from that badge: the Space's copy brought forward, kept until+ /// wiped (auto-wipe off), with Dismiss beside Wipe.+ @Test func keyvaultAccessFocused() async throws {+ let m = try await model(overview: try signedInOverview())+ m.showAccess(spaceId: "local:aurora")+ m.keyvault.selection = .category(category: .access)+ #expect(m.keyvault.focusKey == "d:local:aurora")+ try assertSnapshot(CategoryList(keyvault: m.keyvault, page: m.keyvault.page), "keyvault-access",+ size: CGSize(width: 640, height: 360))+ }++ /// Settings, Keyvault: the auto-wipe switch, off by default.+ @Test func settingsKeyvault() async throws {+ let m = try await model(overview: try signedInOverview())+ await m.loadSettings()+ #expect(m.settingsPage.sections.contains { $0.id == "keyvault" })+ try assertSnapshot(SettingsView(model: m), "settings-keyvault", size: CGSize(width: 520, height: 1000))+ }++ /// The teleport run says which step it is on: reading the browser's+ /// cookies (naming the Keychain prompt), then the upload's bytes.+ @Test func teleportRunning() async throws {+ let m = TeleportModel(spaceName: "Aurora", teleport: nil, space: nil, sources: PickerFixture.sources())+ let flow = try PickerFixture.json("teleport-review")+ func json(_ v: Any?) throws -> String {+ String(decoding: try JSONSerialization.data(withJSONObject: v!), as: UTF8.self)+ }+ m.send(.loaded(entries: try appCatalogEntriesFromJson(json: json(flow["entries"]))))+ m.send(.select(id: "slack"))+ m.send(.choose(id: nil))+ m.send(.move(moves: .appWithState))+ m.send(.plan)+ m.send(.planned(plan: try appTeleportPlanFromJson(json: json(flow["plan"]))))+ m.send(.acknowledge(value: true))+ m.send(.acknowledgeRelayPlaintext(value: true))+ m.send(.confirm)+ func ev(_ detail: String, _ done: UInt64 = 0, _ total: UInt64 = 0) -> AppPickerEvent {+ .progress(event: AppTeleportRunEvent(step: 1, steps: 3, kind: "state", phase: .progress, detail: detail,+ doneBytes: done, totalBytes: total))+ }+ #expect(m.state.step == .running)+ let size = CGSize(width: 640, height: 540)+ m.send(ev("Reading Slack cookies (macOS will ask for Keychain access)\u{2026}"))+ try assertSnapshot(TeleportPickerSheet(teleport: m, onClose: {}), "teleport-running-reading", size: size)+ m.send(ev("Uploading", 12 << 20, 80 << 20))+ try assertSnapshot(TeleportPickerSheet(teleport: m, onClose: {}), "teleport-running-upload", size: size)+ }+@Test func mainWindowSidebar() async throws {let m = try await model()m.select("local:aurora")@@ -379,6 +446,18 @@ struct SnapshotTests {}}+ /// Live Keyvault access: the key left of the notch; open, the line with+ /// Dismiss and the key on the Space's tile.+ @Test func notchAccess() async throws {+ try await assertNotch("notch-activity-keyvault") {+ $0.setKeyvault(label: "Keyvault sign-ins live in local:aurora", signedIn: ["local:aurora"])+ }+ try await assertNotch("notch-access") {+ $0.setKeyvault(label: "Keyvault sign-ins live in local:aurora", signedIn: ["local:aurora"])+ $0.send(.click)+ }+ }+@Test func notchActivityTransfer() async throws {try await assertNotch("notch-activity-transfer") {$0.setActivity(hotspot: false, transfer: AppNotchTransfer(sent: 600, total: 1000))@@ -481,6 +560,12 @@ struct SnapshotTests {let rep = render(view, size: size)let png = rep.representation(using: .png, properties: [:])!let url = Self.snapshots.appendingPathComponent("\(name).png")+ // A copy of every render for review (outside the repo).+ if let dir = ProcessInfo.processInfo.environment["SNAPSHOT_EXPORT_DIR"], !dir.isEmpty {+ let out = URL(fileURLWithPath: dir)+ try? FileManager.default.createDirectory(at: out, withIntermediateDirectories: true)+ try? png.write(to: out.appendingPathComponent("\(name).png"))+ }let record = ProcessInfo.processInfo.environment["SNAPSHOT_RECORD"] == "1"guard !record, let reference = NSBitmapImageRep(data: (try? Data(contentsOf: url)) ?? Data()) else {try png.write(to: url)diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/keyvault-access.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/keyvault-access.pngnew file mode 100644index 0000000000..a501dc1172Binary files /dev/null and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/keyvault-access.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-access.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-access.pngnew file mode 100644index 0000000000..083dddefccBinary files /dev/null and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-access.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-activity-keyvault.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-activity-keyvault.pngnew file mode 100644index 0000000000..1ffdfbccdaBinary files /dev/null and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-activity-keyvault.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-button-hover.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-button-hover.pngindex 72cc29f460..272549b399 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-button-hover.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-button-hover.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-button-pressed.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-button-pressed.pngindex 1ed0644dd4..5a0d4ac7ad 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-button-pressed.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-button-pressed.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-hover.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-hover.pngindex e24b6ddb85..9ae2942838 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-hover.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-hover.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-search-hover.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-search-hover.pngindex 133b068661..a56126edf2 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-search-hover.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-search-hover.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-search.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-search.pngindex c987d5d312..eef3a7a5f4 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-search.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-search.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tile-hover.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tile-hover.pngindex 52b124f1d8..60bfe5f750 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tile-hover.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tile-hover.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tile-pressed.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tile-pressed.pngindex fabeaa387d..d9126acfb0 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tile-pressed.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tile-pressed.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tiles.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tiles.pngindex c7c2759737..df86f72e7f 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tiles.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/notch-tiles.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/settings-keyvault.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/settings-keyvault.pngnew file mode 100644index 0000000000..b143a9da56Binary files /dev/null and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/settings-keyvault.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/sidebar-signed-in.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/sidebar-signed-in.pngnew file mode 100644index 0000000000..bf5c2295c1Binary files /dev/null and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/sidebar-signed-in.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-facts-copied.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-facts-copied.pngindex 03d840900c..f2b6f6a246 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-facts-copied.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-facts-copied.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-facts.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-facts.pngindex e600ef8cc6..f287d367f0 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-facts.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-facts.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-preview.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-preview.pngindex 709815b17e..eb3ceb962b 100644Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-preview.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/space-preview.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/teleport-running-reading.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/teleport-running-reading.pngnew file mode 100644index 0000000000..216fd66e47Binary files /dev/null and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/teleport-running-reading.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/teleport-running-upload.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/teleport-running-upload.pngnew file mode 100644index 0000000000..48096483d9Binary files /dev/null and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/teleport-running-upload.png differdiff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swiftindex 3cf7044061..2d2037c63a 100644--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift@@ -21,6 +21,7 @@ final class FakeKeyvault: KeyvaultClientProtocol, @unchecked Sendable {commands.append(command)switch command {case .setDisabled(let disabled): current.status?.disabled = disabled+ case .setAutoWipe(let on): current.status?.autoWipe = oncase .approve(let id, _), .deny(let id): current.pending.removeAll { $0.id == id }default: break}@@ -93,6 +94,117 @@ struct ViewModelTests {#expect(!model.menuBar.contains { $0.label.hasPrefix("Keyvault") })}+ /// A Keyvault sign-in in a Space: "Signed in" in the list (the badge+ /// opens Access on its row), the key on its notch tile. Dismiss hides+ /// the notch's indicator, line and key, never the access itself; it is+ /// remembered, and a new copy shows again.+ @Test func signedInSpacesAndDismissingFromTheNotch() async throws {+ var o = try fixtureOverview()+ o.deliveries = [KvDelivery(importId: "imp-1", target: "local:aurora", providerId: "chrome", items: ["i1"],+ callerFp: "fp-agent", deliveredMs: 1_799_999_000_000,+ expiresMs: 0, wiped: false)]+ let fake = FakeKeyvault(o)+ let model = makeModel(kv: fake)+ await model.refresh()+ await model.keyvault.refresh()+ #expect(model.signedInSpaceIds == ["local:aurora"])+ #expect(model.notch.state.signedIn == ["local:aurora"])+ #expect(model.notch.state.keyvault == "Keyvault sign-ins live in local:aurora")+ model.notch.send(.click)+ #expect(model.notch.view.tiles.first { $0.id == "local:aurora" }?.signedIn == true)+ #expect(model.notch.view.access?.dismiss == "Dismiss")+ // The badge: Access, its row brought forward.+ model.showAccess(spaceId: "local:aurora")+ #expect(model.selection == .keyvault(.category(category: .access)))+ #expect(model.keyvault.focusKey == "d:local:aurora")+ let row = try #require(model.keyvault.list.access.first { $0.kind == .delivery })+ #expect(row.detail == "until you wipe it", "auto-wipe off: no expiry")+ #expect(!model.keyvault.isDismissed(row))+ // Dismiss: the notch forgets it; the list and Access keep it.+ model.keyvault.dismiss(row.imports)+ #expect(model.notch.state.keyvault == nil)+ #expect(model.notch.state.signedIn.isEmpty)+ #expect(model.notch.view.access == nil)+ #expect(model.signedInSpaceIds == ["local:aurora"])+ #expect(model.keyvault.isDismissed(row))+ #expect(model.settings.dismissedAccess == ["imp-1"])+ #expect(!fake.commands.contains { if case .release = $0 { return true } else { return false } },+ "dismissing wipes nothing")+ // Saved: a relaunch keeps it dismissed.+ let again = AppModel(backend: FixtureSpacesBackend(), keyvault: KeyvaultModel(client: fake, clock: { fixtureNow }),+ onboarding: OnboardingModel(statePath: nil), settingsPath: model.settingsPath)+ await again.refresh()+ await again.keyvault.refresh()+ #expect(again.notch.state.keyvault == nil)+ // A new copy (another import) shows again; the gone one is forgotten.+ fake.current.deliveries = [KvDelivery(importId: "imp-2", target: "local:aurora", providerId: "chrome",+ items: ["i1"], callerFp: "fp-agent",+ deliveredMs: 1_799_999_500_000, expiresMs: 0, wiped: false)]+ await model.keyvault.refresh()+ #expect(model.notch.state.keyvault == "Keyvault sign-ins live in local:aurora")+ #expect(model.settings.dismissedAccess.isEmpty)+ }++ /// Settings, Keyvault: auto-wipe is off by default; the switch sends the+ /// broker's setting and follows it.+ @Test func autoWipeIsASettingOffByDefault() async throws {+ var o = try fixtureOverview()+ o.status?.autoWipe = false+ let fake = FakeKeyvault(o)+ let model = makeModel(kv: fake)+ await model.loadSettings()+ let section = try #require(model.settingsPage.sections.first { $0.id == "keyvault" })+ let toggle = try #require(section.rows.first { $0.id == "keyvault-auto-wipe" })+ #expect(toggle.kind == .toggle)+ #expect(toggle.options.first { $0.id == "on" }?.active == false)+ await model.choose(row: "keyvault-auto-wipe", option: "on")+ #expect(fake.commands.last == .setAutoWipe(on: true))+ #expect(model.keyvault.autoWipe == true)+ #expect(model.settingsPage.sections.first { $0.id == "keyvault" }?.rows.first?+ .options.first { $0.id == "on" }?.active == true)+ // No broker answer: no section.+ let bare = makeModel()+ await bare.loadSettings()+ #expect(!bare.settingsPage.sections.contains { $0.id == "keyvault" })+ }++ /// The teleport's run says what it is doing, from the SDK's step events+ /// (the Keychain prompts are named before they appear).+ @Test func teleportRunStatusFollowsTheSteps() throws {+ let m = TeleportModel(spaceName: "Aurora", teleport: nil, space: nil, sources: PickerFixture.sources())+ #expect(m.status == nil)+ // To the run, as the teleport-review flow gets there.+ let flow = try PickerFixture.json("teleport-review")+ func json(_ v: Any?) throws -> String {+ String(decoding: try JSONSerialization.data(withJSONObject: v!), as: UTF8.self)+ }+ m.send(.loaded(entries: try appCatalogEntriesFromJson(json: json(flow["entries"]))))+ m.send(.select(id: "slack"))+ m.send(.choose(id: nil))+ m.send(.move(moves: .appWithState))+ m.send(.plan)+ m.send(.planned(plan: try appTeleportPlanFromJson(json: json(flow["plan"]))))+ m.send(.acknowledge(value: true))+ m.send(.acknowledgeRelayPlaintext(value: true))+ m.send(.confirm)+ #expect(m.state.step == .running)+ #expect(m.status == nil, "no step yet")+ func ev(_ phase: AppTeleportRunPhase, _ detail: String, _ done: UInt64 = 0, _ total: UInt64 = 0) -> AppPickerEvent {+ .progress(event: AppTeleportRunEvent(step: 0, steps: 1, kind: "state", phase: phase, detail: detail,+ doneBytes: done, totalBytes: total))+ }+ let reading = "Reading Chrome cookies (macOS will ask for Keychain access)\u{2026}"+ m.send(ev(.progress, reading))+ #expect(m.status == reading)+ m.send(ev(.progress, "Uploading", 12 << 20, 80 << 20))+ #expect(m.status == "Uploading 12 / 80 MB")+ // The SDK's string phases map onto the picker's.+ let sdk = TeleportRunEvent(step: 0, steps: 1, kind: "state", phase: "progress",+ detail: "Importing into the Space", doneBytes: 0, totalBytes: 0)+ m.send(.progress(event: appTeleportRunEvent(event: sdk)))+ #expect(m.status == "Importing into the Space")+ }+@Test func thisMachineComesFirstAndFollowsTheHost() async {let host = FixtureHost()let model = makeModel(host: host)diff --git a/libs/cua-spacesd/crates/cua-spacesd-teleport/src/ledger.rs b/libs/cua-spacesd/crates/cua-spacesd-teleport/src/ledger.rsindex 5e4b0a02da..c14348a56a 100644--- a/libs/cua-spacesd/crates/cua-spacesd-teleport/src/ledger.rs+++ b/libs/cua-spacesd/crates/cua-spacesd-teleport/src/ledger.rs@@ -985,6 +985,18 @@ mod tests {assert!(h.join("link").symlink_metadata().is_ok());}+ /// The Keyvault broker sends `expires_at_ms: 0` while auto-wipe is off:+ /// such an import never expires on its own, however late it is.+ #[test]+ fn a_zero_expiry_never_expires() {+ let forever = ledger("kv", &[], &[], 0);+ assert!(!forever.expired(0));+ assert!(!forever.expired(u64::MAX));+ let timed = ledger("kv", &[], &[], 5_000);+ assert!(!timed.expired(4_999));+ assert!(timed.expired(5_000));+ }+#[test]fn sweep_wipes_expired_but_not_live_and_keeps_unreadable() {let home = tempfile::tempdir().unwrap();diff --git a/libs/cua/crates/cua-cli/src/teleport_session.rs b/libs/cua/crates/cua-cli/src/teleport_session.rsindex 3bbe622db1..9d79ff940b 100644--- a/libs/cua/crates/cua-cli/src/teleport_session.rs+++ b/libs/cua/crates/cua-cli/src/teleport_session.rs@@ -348,7 +348,7 @@ pub async fn complete("browser": app,"target": sandbox,"delivered": delivered,- "next": "The sandbox's browser now has these sites' sessions. Delete the sandbox when done; delivered sessions are also wiped when the grant expires.",+ "next": "The sandbox's browser now has these sites' sessions. Delete the sandbox when done; Wipe in Cua's Keyvault also removes them.",}))}}diff --git a/libs/cua/crates/cua-keyvault/src/broker.rs b/libs/cua/crates/cua-keyvault/src/broker.rsindex 16e51190ed..7b94bb0d92 100644--- a/libs/cua/crates/cua-keyvault/src/broker.rs+++ b/libs/cua/crates/cua-keyvault/src/broker.rs@@ -289,6 +289,34 @@ pub struct DeliveryOutcome {pub launched: bool,}+/// Where a direct teleport ([`Broker::import_and_teleport_with_progress`])+/// is, so the UI can say what is happening (and why macOS asks for the+/// Keychain) instead of showing a bare progress bar. Never carries a value.+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]+#[serde(tag = "stage", rename_all = "snake_case")]+pub enum TeleportStage {+ /// Reading the app's sign-in on this machine (the OS may ask for+ /// Keychain access).+ Reading,+ /// Sealing what was read into the vault (the review's "Save to+ /// Keyvault").+ Saving,+ /// Packing the bundle for the Space.+ Packing,+ /// Uploading it: bytes the Space has of the total.+ Uploading {+ /// Bytes sent.+ done: u64,+ /// Bytes in all.+ total: u64,+ },+ /// The Space is importing it.+ Importing,+}++/// Receives [`TeleportStage`]s (from any task).+pub type StageSink = Arc<dyn Fn(TeleportStage) + Send + Sync>;+/// Capture and delivery, supplied by the daemon (and by fakes in tests).#[async_trait::async_trait]pub trait Backend: Send + Sync {@@ -319,6 +347,20 @@ pub trait Backend: Send + Sync {payloads: Vec<ItemPayload>,expires_ms: u64,) -> Result<DeliveryOutcome>;+ /// [`Self::deliver`], telling `stage` when it packs, uploads (with+ /// bytes) and the Space imports. The default reports nothing.+ async fn deliver_with_progress(+ &self,+ target: &str,+ provider_id: &str,+ payloads: Vec<ItemPayload>,+ expires_ms: u64,+ stage: StageSink,+ ) -> Result<DeliveryOutcome> {+ let _ = stage;+ self.deliver(target, provider_id, payloads, expires_ms)+ .await+ }/// Wipes an earlier import from `target`.async fn wipe(&self, target: &str, import_id: &str) -> Result<Vec<String>>;/// Tells the UI a consent request is waiting (open the Keyvault page).@@ -641,7 +683,7 @@ pub struct TeleportOutcome {pub items: Vec<String>,/// How it was authorized.pub authority: String,- /// When the target wipes the copy.+ /// When the target wipes the copy (`0`: only when wiped).pub expires_ms: u64,}@@ -667,6 +709,10 @@ pub struct Status {/// Unlock policy (first party only).#[serde(default)]pub unlock_policy: Option<UnlockPolicy>,+ /// Delivered copies wipe themselves after their TTL (first party only;+ /// off by default).+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub auto_wipe: Option<bool>,/// This daemon can create the OS key store protector (the macOS Keychain/// or Windows Credential Manager): the platform has one, this daemon may/// use it, and (macOS) it is the signed Cua daemon. False for a debug@@ -1059,6 +1105,11 @@ impl Broker {} else {None},+ auto_wipe: if fp {+ meta.map(|m| m.settings.auto_wipe)+ } else {+ None+ },os_protector_available: self.os_enroll_block().is_none(),passphrase_available: true,unlock_protectors: match (&st.vault, fp) {@@ -1333,6 +1384,35 @@ impl Broker {Ok(())}+ /// Auto-wipe (first party): on, copies delivered from now on wipe+ /// themselves after their item's TTL; off, they stay until wiped.+ /// Turning it off keeps copies longer, so it needs presence. Copies+ /// already delivered keep the expiry they were delivered with.+ pub async fn set_auto_wipe(&self, caller: &CallerIdentity, on: bool) -> Result<()> {+ policy::require_first_party(caller, "changing Keyvault settings")?;+ let current = {+ let st = self.state.lock().await;+ Self::settings(&st)?.auto_wipe+ };+ if current == on {+ return Ok(());+ }+ if !on {+ self.confirm("Keep Keyvault access in Spaces until you wipe it".into())+ .await?;+ }+ let mut st = self.state.lock().await;+ let v = Self::vault_mut(&mut st)?;+ v.update_meta(|m| {+ m.settings.auto_wipe = on;+ Ok(())+ })?;+ let mut e = ev("settings.update", caller, "ok");+ e.detail = format!("auto_wipe={on}");+ Self::audit(&mut st, e);+ Ok(())+ }+// ------------------------------------------------------------------// Items// ------------------------------------------------------------------@@ -1430,6 +1510,13 @@ impl Broker {caller: &CallerIdentity,spec: ImportSpec,) -> Result<Vec<ItemMeta>> {+ let captured = self.capture_confirmed(spec).await?;+ self.store_captured(caller, captured).await+ }++ /// The capture half of [`Self::import_confirmed`] (after presence):+ /// checks the selection, then reads it on a blocking thread.+ async fn capture_confirmed(&self, spec: ImportSpec) -> Result<Vec<Captured>> {if spec.sites.iter().any(|s| s.include_passwords) && !spec.confirm_passwords {return Err(Error::Invalid("saved passwords need the explicit second confirmation (confirm_passwords)".into(),@@ -1441,11 +1528,9 @@ impl Broker {));}let b = self.backend.clone();- let spec2 = spec.clone();- let captured = tokio::task::spawn_blocking(move || b.capture(&spec2))+ tokio::task::spawn_blocking(move || b.capture(&spec)).await- .map_err(|e| Error::Backend(e.to_string()))??;- self.store_captured(caller, captured).await+ .map_err(|e| Error::Backend(e.to_string()))?}/// Captures `spec` and immediately delivers every resulting item to@@ -1455,7 +1540,8 @@ impl Broker {/// SwiftUI apps -- uses instead of exporting and uploading a bundle on/// its own: the capture, the audited authorization and the delivery all/// happen inside the Keyvault, so a direct teleport gets the same audit- /// trail, kill switch and auto-wipe a Keyvault-saved session already has.+ /// trail, kill switch and auto-wipe setting a Keyvault-saved session+ /// already has.////// `save`: when `false` (the common case -- "teleport this app", not/// "save this session"), every item this call captured is forgotten@@ -1477,6 +1563,26 @@ impl Broker {target: String,save: bool,) -> Result<TeleportOutcome> {+ self.import_and_teleport_with_progress(caller, spec, target, save, None)+ .await+ }++ /// [`Self::import_and_teleport`], telling `stage` where it is: reading+ /// (when the OS may ask for Keychain access), saving (`save` only),+ /// packing, uploading and importing.+ pub async fn import_and_teleport_with_progress(+ &self,+ caller: &CallerIdentity,+ spec: ImportSpec,+ target: String,+ save: bool,+ stage: Option<StageSink>,+ ) -> Result<TeleportOutcome> {+ let tell = |s: TeleportStage| {+ if let Some(f) = &stage {+ f(s);+ }+ };policy::require_first_party(caller, "teleporting from this machine")?;{let st = self.state.lock().await;@@ -1492,7 +1598,12 @@ impl Broker {caller.display());self.confirm(reason).await?;- let items = self.import_confirmed(caller, spec).await?;+ tell(TeleportStage::Reading);+ let captured = self.capture_confirmed(spec).await?;+ if save {+ tell(TeleportStage::Saving);+ }+ let items = self.store_captured(caller, captured).await?;let item_ids: Vec<String> = items.iter().map(|m| m.id.clone()).collect();if item_ids.is_empty() {return Err(Error::Invalid(@@ -1511,7 +1622,7 @@ impl Broker {target: target.clone(),};let result = self- .teleport_inner(caller, req, PresenceAlready::Confirmed)+ .teleport_inner(caller, req, PresenceAlready::Confirmed, stage.clone()).await;crate::telemetry::teleport(&self.telemetry, caller, &app, started, &result, n);if !save {@@ -2347,7 +2458,7 @@ impl Broker {.unwrap_or_default()};let r = self- .teleport_inner(caller, req, PresenceAlready::NotConfirmed)+ .teleport_inner(caller, req, PresenceAlready::NotConfirmed, None).await;crate::telemetry::teleport(&self.telemetry, caller, &app, started, &r, items);r@@ -2358,6 +2469,7 @@ impl Broker {caller: &CallerIdentity,req: TeleportRequest,presence: PresenceAlready,+ stage: Option<StageSink>,) -> Result<TeleportOutcome> {validate_target(&req.target)?;if req.items.is_empty() {@@ -2376,7 +2488,7 @@ impl Broker {)));}// Phase 1 (locked): authorize and read payloads.- let (authority, groups, labels, ttl) = {+ let (authority, groups, labels, ttl, auto_wipe) = {let mut st = self.state.lock().await;let disabled = Self::settings(&st)?.disabled;if disabled {@@ -2501,7 +2613,7 @@ impl Broker {for d in meta.deliveries.iter()- .filter(|d| !d.wiped && d.target == req.target && d.expires_ms > now)+ .filter(|d| d.live(now) && d.target == req.target){if let Some(g) = groups.get_mut(&d.provider_id) {for i in &d.items {@@ -2518,6 +2630,7 @@ impl Broker {.map(|i| meta.items[i].policy.ttl_secs).min().unwrap_or(crate::model::DEFAULT_TTL_SECS);+ let auto_wipe = meta.settings.auto_wipe;let mut out = Vec::new();for (provider, (ids, superseded)) in groups {let mut payloads = Vec::new();@@ -2545,7 +2658,7 @@ impl Broker {.iter().map(|i| meta.items[i].label.clone()).collect();- (authority, out, labels, ttl)+ (authority, out, labels, ttl, auto_wipe)};if authority == Authority::Interactive && presence == PresenceAlready::NotConfirmed {self.confirm(format!(@@ -2568,7 +2681,8 @@ impl Broker {Self::audit_required(&mut st, e)?;}// Phase 2 (unlocked): supersede, deliver.- let expires_ms = now + ttl * 1000;+ // Auto-wipe off (the default): the copy stays until it is wiped.+ let expires_ms = crate::model::delivery_expiry(auto_wipe, now, ttl);let mut outcome = TeleportOutcome {authority: authority.describe(),expires_ms,@@ -2582,10 +2696,24 @@ impl Broker {// leaves its own TTL to clean up.let _ = self.backend.wipe(&req.target, &d.import_id).await;}- let res = self- .backend- .deliver(&req.target, &provider, payloads, expires_ms)- .await;+ let res = match &stage {+ Some(sink) => {+ self.backend+ .deliver_with_progress(+ &req.target,+ &provider,+ payloads,+ expires_ms,+ sink.clone(),+ )+ .await+ }+ None => {+ self.backend+ .deliver(&req.target, &provider, payloads, expires_ms)+ .await+ }+ };match res {Ok(o) => {delivered.push((provider, ids, o.clone(), superseded));diff --git a/libs/cua/crates/cua-keyvault/src/ipc.rs b/libs/cua/crates/cua-keyvault/src/ipc.rsindex 796fbb82da..d1d2d87328 100644--- a/libs/cua/crates/cua-keyvault/src/ipc.rs+++ b/libs/cua/crates/cua-keyvault/src/ipc.rs@@ -27,8 +27,8 @@ use zeroize::Zeroize;use crate::audit::{AuditEntry, Verification};use crate::broker::{AccessRequest, ApproveOptions, Broker, Decision, ImportSpec, InitRequest, Inventory,- LoginOutcome, LoginRequest, PasswordImportSpec, PendingView, RuleSpec, Status, TeleportOutcome,- TeleportRequest, UnlockRequest,+ LoginOutcome, LoginRequest, PasswordImportSpec, PendingView, RuleSpec, StageSink, Status,+ TeleportOutcome, TeleportRequest, TeleportStage, UnlockRequest,};use crate::caller::{CallerIdentity, TrustPolicy};use crate::model::{Delivery, Grant, ItemMeta, ItemPolicy, UnattendedRule, UnlockPolicy};@@ -58,6 +58,11 @@ pub enum Request {/// On (true) or off.disabled: bool,},+ /// Auto-wipe of delivered copies (off: they stay until wiped).+ SetAutoWipe {+ /// On (true) or off.+ on: bool,+ },/// Unlock policy.SetUnlockPolicy {/// Policy.@@ -154,6 +159,10 @@ pub enum Request {/// Keep the captured item(s) in the vault afterward.#[serde(default)]save: bool,+ /// Stream [`TeleportStage`] frames (`Response::stage`) before the+ /// reply. Off for older clients, which read one reply per request.+ #[serde(default)]+ progress: bool,},/// Wipe deliveries on a target.Release {@@ -218,6 +227,10 @@ pub struct Response {/// Error (when not `ok`).#[serde(default, skip_serializing_if = "Option::is_none")]pub error: Option<WireError>,+ /// A progress frame before the reply (only to a request that asked+ /// for them); the reply itself never has one.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub stage: Option<TeleportStage>,}impl Response {@@ -226,6 +239,7 @@ impl Response {ok: true,result: Some(serde_json::to_value(v).unwrap_or(Value::Null)),error: None,+ stage: None,}}@@ -237,10 +251,23 @@ impl Response {code: error_code(e).into(),message: e.to_string(),}),+ stage: None,+ }+ }++ fn stage(s: TeleportStage) -> Self {+ Self {+ ok: true,+ result: None,+ error: None,+ stage: Some(s),}}}+/// Most stage frames one request streams (each upload chunk is one).+pub const MAX_STAGE_FRAMES: usize = 100_000;+async fn read_frame<R: AsyncReadExt + Unpin>(r: &mut R) -> std::io::Result<Option<Vec<u8>>> {let mut len = [0u8; 4];match r.read_exact(&mut len).await {@@ -293,6 +320,7 @@ pub async fn dispatch(broker: &Broker, caller: &CallerIdentity, req: Request) ->Request::Unlock(r) => reply!(broker.unlock(caller, r).await),Request::Lock => reply!(broker.lock(caller).await),Request::SetDisabled { disabled } => reply!(broker.set_disabled(caller, disabled).await),+ Request::SetAutoWipe { on } => reply!(broker.set_auto_wipe(caller, on).await),Request::SetUnlockPolicy {policy,auto_lock_minutes,@@ -338,7 +366,9 @@ pub async fn dispatch(broker: &Broker, caller: &CallerIdentity, req: Request) ->Request::AddRule(spec) => reply!(broker.add_rule(caller, spec).await),Request::RemoveRule { id } => reply!(broker.remove_rule(caller, &id).await),Request::Teleport(r) => reply!(broker.teleport(caller, r).await),- Request::ImportAndTeleport { spec, target, save } => {+ Request::ImportAndTeleport {+ spec, target, save, ..+ } => {reply!(broker.import_and_teleport(caller, spec, target, save).await)}Request::Release { target } => reply!(broker.release(caller, &target).await),@@ -469,6 +499,17 @@ async fn handle(mut stream: tokio::net::UnixStream, broker: Arc<Broker>, policy:// bytes as soon as they are parsed.frame.zeroize();let resp = match parsed {+ Ok(Request::ImportAndTeleport {+ spec,+ target,+ save,+ progress: true,+ }) => {+ match teleport_streaming(&mut stream, &broker, &caller, spec, target, save).await {+ Some(r) => r,+ None => return,+ }+ }Ok(req) => dispatch(&broker, &caller, req).await,Err(e) => Response::err(&Error::Invalid(format!("bad request: {e}"))),};@@ -485,6 +526,56 @@ async fn handle(mut stream: tokio::net::UnixStream, broker: Arc<Broker>, policy:}}+/// `import_and_teleport` with its stages written as frames while it runs;+/// the reply is returned for the caller to write. None when the client went+/// away (the teleport still finishes).+#[cfg(unix)]+async fn teleport_streaming(+ stream: &mut tokio::net::UnixStream,+ broker: &Broker,+ caller: &CallerIdentity,+ spec: ImportSpec,+ target: String,+ save: bool,+) -> Option<Response> {+ let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel::<TeleportStage>();+ let sink: StageSink = Arc::new(move |s| {+ let _ = tx.send(s);+ });+ let work = broker.import_and_teleport_with_progress(caller, spec, target, save, Some(sink));+ tokio::pin!(work);+ let mut connected = true;+ let mut sent = 0usize;+ // Bounded: the teleport future ends, and at most MAX_STAGE_FRAMES go out.+ let result = loop {+ tokio::select! {+ r = &mut work => break r,+ Some(s) = rx.recv() => {+ if connected && sent < MAX_STAGE_FRAMES {+ sent += 1;+ let frame = serde_json::to_vec(&Response::stage(s)).unwrap_or_default();+ connected = write_frame(stream, &frame).await.is_ok();+ }+ }+ }+ };+ if !connected {+ return None;+ }+ while let Ok(s) = rx.try_recv() {+ if sent >= MAX_STAGE_FRAMES {+ break;+ }+ sent += 1;+ let frame = serde_json::to_vec(&Response::stage(s)).unwrap_or_default();+ write_frame(stream, &frame).await.ok()?;+ }+ Some(match result {+ Ok(v) => Response::ok(v),+ Err(e) => Response::err(&e),+ })+}+// ---------------------------------------------------------------------------// Client// ---------------------------------------------------------------------------@@ -654,17 +745,38 @@ impl KeyvaultClient {/// Sends one request and returns the raw result.pub async fn call(&mut self, req: &Request) -> Result<Value> {+ self.call_with_stages(req, &mut |_| {}).await+ }++ /// [`Self::call`], handing each stage frame before the reply to `on`.+ async fn call_with_stages(+ &mut self,+ req: &Request,+ on: &mut (dyn FnMut(TeleportStage) + Send),+ ) -> Result<Value> {let mut bytes = serde_json::to_vec(req)?;let written = write_frame(&mut self.stream, &bytes).await;// `init` and `unlock` frames carry a passphrase.bytes.zeroize();written?;- let mut frame = read_frame(&mut self.stream)- .await?- .ok_or_else(|| Error::Backend("the Keyvault closed the connection".into()))?;- let parsed = serde_json::from_slice::<Response>(&frame);- frame.zeroize();- let resp = parsed?;+ // Bounded: the server sends at most MAX_STAGE_FRAMES before the reply.+ let mut resp = None;+ for _ in 0..=MAX_STAGE_FRAMES {+ let mut frame = read_frame(&mut self.stream)+ .await?+ .ok_or_else(|| Error::Backend("the Keyvault closed the connection".into()))?;+ let parsed = serde_json::from_slice::<Response>(&frame);+ frame.zeroize();+ let r = parsed?;+ match r.stage {+ Some(s) => on(s),+ None => {+ resp = Some(r);+ break;+ }+ }+ }+ let resp = resp.ok_or_else(|| Error::Backend("too many progress frames".into()))?;if resp.ok {Ok(resp.result.unwrap_or(Value::Null))} else {@@ -777,8 +889,35 @@ impl KeyvaultClient {target: String,save: bool,) -> Result<TeleportOutcome> {- self.typed(&Request::ImportAndTeleport { spec, target, save })- .await+ self.typed(&Request::ImportAndTeleport {+ spec,+ target,+ save,+ progress: false,+ })+ .await+ }+ /// [`Self::import_and_teleport`], telling `on` each [`TeleportStage`]+ /// as the daemon reaches it.+ pub async fn import_and_teleport_with_progress(+ &mut self,+ spec: ImportSpec,+ target: String,+ save: bool,+ mut on: impl FnMut(TeleportStage) + Send,+ ) -> Result<TeleportOutcome> {+ let v = self+ .call_with_stages(+ &Request::ImportAndTeleport {+ spec,+ target,+ save,+ progress: true,+ },+ &mut on,+ )+ .await?;+ Ok(serde_json::from_value(v)?)}/// Release.pub async fn release(&mut self, target: &str) -> Result<Vec<String>> {@@ -811,6 +950,10 @@ impl KeyvaultClient {pub async fn set_disabled(&mut self, disabled: bool) -> Result<()> {self.typed(&Request::SetDisabled { disabled }).await}+ /// Auto-wipe of delivered copies.+ pub async fn set_auto_wipe(&mut self, on: bool) -> Result<()> {+ self.typed(&Request::SetAutoWipe { on }).await+ }}/// Maps a wire error back to [`Error`].@@ -913,6 +1056,86 @@ mod tests {std::fs::set_permissions(d.path(), std::fs::Permissions::from_mode(0o700)).unwrap();}+ /// A streaming `import_and_teleport`: stage frames, then the reply; the+ /// client hands each stage over in order and returns the outcome. The+ /// request opts in, so an older daemon that ignores the flag (one reply,+ /// no stages) still works.+ #[tokio::test]+ async fn teleport_stages_stream_before_the_reply() {+ let (client_end, mut server_end) = tokio::net::UnixStream::pair().unwrap();+ let server = tokio::spawn(async move {+ let req = read_frame(&mut server_end).await.unwrap().unwrap();+ let req: Request = serde_json::from_slice(&req).unwrap();+ assert!(matches!(+ req,+ Request::ImportAndTeleport { progress: true, .. }+ ));+ for st in [+ TeleportStage::Reading,+ TeleportStage::Packing,+ TeleportStage::Uploading { done: 5, total: 10 },+ TeleportStage::Importing,+ ] {+ let f = serde_json::to_vec(&Response::stage(st)).unwrap();+ write_frame(&mut server_end, &f).await.unwrap();+ }+ let done = Response::ok(TeleportOutcome {+ authority: "interactive".into(),+ ..Default::default()+ });+ write_frame(&mut server_end, &serde_json::to_vec(&done).unwrap())+ .await+ .unwrap();+ });+ let mut client = KeyvaultClient {+ stream: client_end,+ server: None,+ };+ let mut seen = Vec::new();+ let out = client+ .import_and_teleport_with_progress(ImportSpec::default(), "dev-1".into(), false, |st| {+ seen.push(st)+ })+ .await+ .unwrap();+ server.await.unwrap();+ assert_eq!(out.authority, "interactive");+ assert_eq!(+ seen,+ [+ TeleportStage::Reading,+ TeleportStage::Packing,+ TeleportStage::Uploading { done: 5, total: 10 },+ TeleportStage::Importing,+ ]+ );+ // On the wire a stage is tagged and the reply carries none.+ let wire = serde_json::to_value(Response::stage(TeleportStage::Uploading {+ done: 1,+ total: 2,+ }))+ .unwrap();+ assert_eq!(wire["stage"]["stage"], "uploading");+ assert!(+ serde_json::to_value(Response::ok(1))+ .unwrap()+ .get("stage")+ .is_none()+ );+ // An older client's request (no flag) asks for no stages.+ let old: Request = serde_json::from_str(+ r#"{"op":"import_and_teleport","spec":{"app":"chrome"},"target":"t"}"#,+ )+ .unwrap();+ assert!(matches!(+ old,+ Request::ImportAndTeleport {+ progress: false,+ ..+ }+ ));+ }+#[test]fn cua_home_override_outside_the_real_home_is_untrusted() {// No override -> trusted (~/.cua).diff --git a/libs/cua/crates/cua-keyvault/src/model.rs b/libs/cua/crates/cua-keyvault/src/model.rsindex 85dc9a663f..ee0ce3d715 100644--- a/libs/cua/crates/cua-keyvault/src/model.rs+++ b/libs/cua/crates/cua-keyvault/src/model.rs@@ -102,6 +102,10 @@ pub const DEFAULT_TTL_SECS: u64 = 3600;pub const IDP_TTL_SECS: u64 = 15 * 60;/// Upper bound on a delivered copy's lifetime (30 days).pub const MAX_TTL_SECS: u64 = 30 * 24 * 3600;+/// A delivery's `expires_ms` when it never expires on its own: the copy+/// stays until it is wiped (Wipe, deleting the item, the kill switch). The+/// receiver reads `0` the same way (`ImportOptions.expires_at_ms`).+pub const NO_EXPIRY: u64 = 0;impl Default for ItemPolicy {fn default() -> Self {@@ -433,13 +437,30 @@ pub struct Delivery {pub caller_fp: String,/// Delivered, Unix ms.pub delivered_ms: u64,- /// When the receiver wipes it on its own.+ /// When the receiver wipes it on its own ([`NO_EXPIRY`]: never).pub expires_ms: u64,/// Wiped (or superseded) already.#[serde(default)]pub wiped: bool,}+impl Delivery {+ /// Not wiped and not past its expiry (one without expiry stays live).+ pub fn live(&self, now_ms: u64) -> bool {+ !self.wiped && (self.expires_ms == NO_EXPIRY || self.expires_ms > now_ms)+ }+}++/// When a copy delivered at `now_ms` expires: `ttl_secs` later while+/// auto-wipe is on, else never ([`NO_EXPIRY`]).+pub fn delivery_expiry(auto_wipe: bool, now_ms: u64, ttl_secs: u64) -> u64 {+ if auto_wipe {+ now_ms + ttl_secs * 1000+ } else {+ NO_EXPIRY+ }+}+/// How the vault unlocks.#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]#[serde(rename_all = "snake_case")]@@ -461,6 +482,10 @@ pub struct Settings {pub unlock_policy: UnlockPolicy,/// Idle minutes before auto-lock (`presence` policy).pub auto_lock_minutes: u32,+ /// Delivered copies wipe themselves after their item's `ttl_secs`. Off+ /// (the default) they stay until wiped ([`NO_EXPIRY`]).+ #[serde(default)]+ pub auto_wipe: bool,}impl Default for Settings {@@ -469,6 +494,7 @@ impl Default for Settings {disabled: false,unlock_policy: UnlockPolicy::Auto,auto_lock_minutes: 15,+ auto_wipe: false,}}}diff --git a/libs/cua/crates/cua-keyvault/tests/broker.rs b/libs/cua/crates/cua-keyvault/tests/broker.rsindex 5ab9ebbf22..b52f4a9512 100644--- a/libs/cua/crates/cua-keyvault/tests/broker.rs+++ b/libs/cua/crates/cua-keyvault/tests/broker.rs@@ -11,10 +11,11 @@ use std::time::Duration;use cua_keyvault::broker::{AccessRequest, ApproveOptions, Backend, Broker, BrokerConfig, Candidate, Captured, Decision,DeliveryOutcome, FakePresence, ImportSpec, InitRequest, Inventory, RuleSpec, Selector,- SiteChoice, TeleportRequest, UnlockRequest,+ SiteChoice, TeleportRequest, TeleportStage, UnlockRequest,};use cua_keyvault::model::{- CookieInfo, ItemKind, ItemMeta, ItemPayload, ItemPolicy, ItemSummary, PayloadEntry, RuleCaller,+ CookieInfo, ItemKind, ItemMeta, ItemPayload, ItemPolicy, ItemSummary, NO_EXPIRY, PayloadEntry,+ RuleCaller,};use cua_keyvault::protector::ProtectorKind;use cua_keyvault::{CallerIdentity, Error, Signing};@@ -155,6 +156,22 @@ impl Backend for FakeBackend {})}+ async fn deliver_with_progress(+ &self,+ target: &str,+ provider_id: &str,+ payloads: Vec<ItemPayload>,+ expires_ms: u64,+ stage: cua_keyvault::broker::StageSink,+ ) -> cua_keyvault::Result<DeliveryOutcome> {+ stage(TeleportStage::Packing);+ stage(TeleportStage::Uploading { done: 0, total: 8 });+ stage(TeleportStage::Uploading { done: 8, total: 8 });+ stage(TeleportStage::Importing);+ self.deliver(target, provider_id, payloads, expires_ms)+ .await+ }+async fn wipe(&self, target: &str, import_id: &str) -> cua_keyvault::Result<Vec<String>> {self.wiped.lock()@@ -852,9 +869,117 @@ async fn deliveries_supersede_and_release_wipes() {assert_eq!(live.len(), 1);let wiped = r.broker.release(&r.cua, "dev-1").await.unwrap();assert_eq!(wiped, vec!["imp-2".to_string()]);- // TTL: the delivery expires at the item's TTL (default 1 h).- let ttl_ms = delivered[0].3.saturating_sub(cua_keyvault::now_ms());- assert!(ttl_ms > 3500 * 1000 && ttl_ms <= 3600 * 1000, "{ttl_ms}");+ // Auto-wipe is off by default: the copies carry no expiry and stay+ // until wiped (the receiver reads 0 as never).+ assert!(delivered.iter().all(|d| d.3 == NO_EXPIRY), "{delivered:?}");+}++async fn teleport_to(r: &Rig, id: &str, target: &str) {+ r.broker+ .teleport(+ &r.cua,+ TeleportRequest {+ token: None,+ items: vec![id.to_string()],+ target: target.into(),+ },+ )+ .await+ .unwrap();+}++#[tokio::test]+async fn auto_wipe_is_off_by_default_and_the_setting_picks_the_expiry() {+ let r = rig().await;+ let status = r.broker.status(&r.cua).await;+ assert_eq!(status.auto_wipe, Some(false), "off by default");+ // Third parties never learn the setting, nor change it.+ assert_eq!(r.broker.status(&r.koala).await.auto_wipe, None);+ assert!(r.broker.set_auto_wipe(&r.koala, true).await.is_err());+ let items = import_sites(&r, &["github.com", "gitlab.com"]).await;+ // Off: no expiry, and the copy stays live (it is superseded, not+ // dropped, by the next delivery to the same Space).+ teleport_to(&r, &items[0].id, "dev-1").await;+ let live = r+ .broker+ .list_deliveries(&r.cua)+ .await+ .unwrap()+ .into_iter()+ .filter(|d| d.live(cua_keyvault::now_ms()))+ .count();+ assert_eq!(live, 1);+ // On: turning it on needs no presence; the item's TTL applies again.+ let asked = r.presence.asked.lock().unwrap().len();+ r.broker.set_auto_wipe(&r.cua, true).await.unwrap();+ assert_eq!(r.presence.asked.lock().unwrap().len(), asked);+ assert_eq!(r.broker.status(&r.cua).await.auto_wipe, Some(true));+ teleport_to(&r, &items[0].id, "dev-2").await;+ // A shorter per-item TTL is respected.+ let mut short = items[1].policy.clone();+ short.ttl_secs = 600;+ r.broker+ .set_item_policy(&r.cua, &items[1].id, short)+ .await+ .unwrap();+ teleport_to(&r, &items[1].id, "dev-3").await;+ let delivered = r.backend.delivered.lock().unwrap().clone();+ let now = cua_keyvault::now_ms();+ assert_eq!(delivered[0].3, NO_EXPIRY);+ let hour = delivered[1].3.saturating_sub(now);+ assert!(hour > 3500 * 1000 && hour <= 3600 * 1000, "{hour}");+ let ten = delivered[2].3.saturating_sub(now);+ assert!(ten > 500 * 1000 && ten <= 600 * 1000, "{ten}");+ // Turning it off keeps copies longer: it asks for presence, and a+ // declined prompt changes nothing.+ r.presence.set(false);+ assert!(r.broker.set_auto_wipe(&r.cua, false).await.is_err());+ assert_eq!(r.broker.status(&r.cua).await.auto_wipe, Some(true));+ r.presence.set(true);+ r.broker.set_auto_wipe(&r.cua, false).await.unwrap();+ assert_eq!(r.broker.status(&r.cua).await.auto_wipe, Some(false));+ let tail = r.broker.audit_tail(&r.cua, 100).await.unwrap();+ assert!(+ tail.iter()+ .any(|e| e.event.kind == "settings.update" && e.event.detail == "auto_wipe=false")+ );+}++#[tokio::test]+async fn a_copy_without_expiry_still_goes_on_wipe_delete_and_the_kill_switch() {+ let r = rig().await;+ let items = import_sites(&r, &["github.com", "gitlab.com"]).await;+ teleport_to(&r, &items[0].id, "dev-1").await;+ teleport_to(&r, &items[1].id, "dev-2").await;+ teleport_to(&r, &items[1].id, "dev-3").await;+ let live = |ds: Vec<cua_keyvault::model::Delivery>| -> Vec<String> {+ let now = cua_keyvault::now_ms() + 365 * 24 * 3600 * 1000;+ let mut t: Vec<String> = ds+ .into_iter()+ .filter(|d| d.live(now))+ .map(|d| d.target)+ .collect();+ t.sort();+ t+ };+ // A year on, nothing expired by itself.+ assert_eq!(+ live(r.broker.list_deliveries(&r.cua).await.unwrap()),+ ["dev-1", "dev-2", "dev-3"]+ );+ // Wipe.+ r.broker.release(&r.cua, "dev-1").await.unwrap();+ assert_eq!(+ live(r.broker.list_deliveries(&r.cua).await.unwrap()),+ ["dev-2", "dev-3"]+ );+ // Deleting the item wipes its copies.+ r.broker.delete_item(&r.cua, &items[1].id).await.unwrap();+ assert!(live(r.broker.list_deliveries(&r.cua).await.unwrap()).is_empty());+ // The kill switch wipes the rest.+ teleport_to(&r, &items[0].id, "dev-4").await;+ r.broker.set_disabled(&r.cua, true).await.unwrap();+ assert!(live(r.broker.list_deliveries(&r.cua).await.unwrap()).is_empty());}#[tokio::test]@@ -1578,6 +1703,45 @@ async fn deliveries_are_authorized_in_the_log_and_the_kill_switch_wipes_them() {assert!(r.broker.verify_audit(&r.cua).await.unwrap().ok());}+/// A direct teleport says where it is: reading (when macOS asks for the+/// Keychain), saving only when asked, then the backend's packing, upload+/// and import. Without a sink nothing changes.+#[tokio::test]+async fn import_and_teleport_reports_its_stages_in_order() {+ let r = rig().await;+ let spec = || ImportSpec {+ app: "chrome".into(),+ sites: vec![SiteChoice {+ site: "github.com".into(),+ include_storage: false,+ include_passwords: false,+ }],+ ..Default::default()+ };+ for save in [true, false] {+ let seen = Arc::new(Mutex::new(Vec::new()));+ let sink = {+ let seen = seen.clone();+ Arc::new(move |s: TeleportStage| seen.lock().unwrap().push(s))+ };+ r.broker+ .import_and_teleport_with_progress(&r.cua, spec(), "dev-1".into(), save, Some(sink))+ .await+ .unwrap();+ let mut want = vec![TeleportStage::Reading];+ if save {+ want.push(TeleportStage::Saving);+ }+ want.extend([+ TeleportStage::Packing,+ TeleportStage::Uploading { done: 0, total: 8 },+ TeleportStage::Uploading { done: 8, total: 8 },+ TeleportStage::Importing,+ ]);+ assert_eq!(*seen.lock().unwrap(), want, "save={save}");+ }+}+/// `import_and_teleport` is what a direct (non-MCP) teleport uses instead of/// exporting and uploading on its own: one first-party call, one presence/// prompt, capture AND delivery both happen, and (save: true) the item staysdiff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/create-progress.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/create-progress.jsonindex 16dcbb65a1..2634120a77 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/create-progress.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/create-progress.json@@ -1297,10 +1297,10 @@"facts": ["Status: Running","Image: ghcr.io/trycua/omarchy:edge [copy ghcr.io/trycua/omarchy:edge doc.on.doc Copy / checkmark Copied 1500ms]",+ "Identifier: local:omarchy [copy local:omarchy doc.on.doc Copy / checkmark Copied 1500ms]","System: Omarchy","Kind: Virtual machine",- "Architecture: x64",- "Identifier: local:omarchy [copy local:omarchy doc.on.doc Copy / checkmark Copied 1500ms]"+ "Architecture: x64"],"id": "local:omarchy","previewText": "Loading the desktop…",diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/create-space.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/create-space.jsonindex a6b8f7d356..6e59d3b0d4 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/create-space.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/create-space.json@@ -2297,8 +2297,8 @@"deleteLabel": "Delete Space","facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"previewText": "Loading the desktop…","showSections": true,@@ -2312,8 +2312,8 @@"deleteLabel": "Remove","facts": ["Status: timed out",- "System: Linux",- "Identifier: direct:10.0.0.5:3211 [copy direct:10.0.0.5:3211 doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: direct:10.0.0.5:3211 [copy direct:10.0.0.5:3211 doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"previewText": "Not reachable","showSections": false,diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/delete-space.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/delete-space.jsonindex 9d3038f7c8..c8d59c83b8 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/delete-space.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/delete-space.json@@ -25,8 +25,8 @@"creditNotice": null,"facts": ["Status: Deleting…",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Deleting…",@@ -45,8 +45,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Loading the desktop…",@@ -95,8 +95,8 @@"creditNotice": null,"facts": ["Status: Deleting…",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Deleting…",@@ -115,8 +115,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Loading the desktop…",@@ -165,8 +165,8 @@"creditNotice": null,"facts": ["Status: Deleting…",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Deleting…",@@ -185,8 +185,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Loading the desktop…",@@ -235,8 +235,8 @@"creditNotice": null,"facts": ["Status: Deleting…",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Deleting…",@@ -255,8 +255,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Loading the desktop…",@@ -305,8 +305,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Loading the desktop…",@@ -352,8 +352,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Loading the desktop…",@@ -397,8 +397,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Loading the desktop…",@@ -444,8 +444,8 @@"creditNotice": null,"facts": ["Status: Deleting…",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Deleting…",@@ -489,8 +489,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:keep [copy local:keep doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:keep","previewText": "Loading the desktop…",diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.jsonindex 5cd840d991..e4e05a5cfd 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json@@ -162,8 +162,8 @@"confirm": "Remove 10.0.0.5:3211? | It is only removed from the list. | Remove / Keep","facts": ["Status: Running",- "System: Windows",- "Identifier: direct:10.0.0.5:3211 [copy direct:10.0.0.5:3211 doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: direct:10.0.0.5:3211 [copy direct:10.0.0.5:3211 doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Windows"],"isHost": false,"previewText": "Loading the desktop…",@@ -183,8 +183,8 @@"confirm": "Delete This machine? | Its sandbox is deleted. | Delete Space / Keep","facts": ["Status: This Mac",- "System: macOS",- "Identifier: this-mac [copy this-mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: this-mac [copy this-mac doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: macOS"],"isHost": true,"previewText": "Not reachable",@@ -207,8 +207,8 @@"facts": ["Status: Running","Location: AWS · us-west-2",- "System: Linux",- "Identifier: relay:cloud-0000000000000a01 [copy relay:cloud-0000000000000a01 doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:cloud-0000000000000a01 [copy relay:cloud-0000000000000a01 doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"isHost": false,"previewText": "Loading the desktop…",@@ -235,8 +235,8 @@"facts": ["Status: offline","Location: Google Cloud · us-central1",- "System: Linux",- "Identifier: relay:cloud-0000000000000e01 [copy relay:cloud-0000000000000e01 doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:cloud-0000000000000e01 [copy relay:cloud-0000000000000e01 doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"isHost": false,"previewText": "Not reachable",@@ -258,8 +258,8 @@"confirm": "Delete Aurora? | Its sandbox is deleted. | Delete Space / Keep","facts": ["Status: Running",- "System: Linux",- "Identifier: local:aurora [copy local:aurora doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:aurora [copy local:aurora doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"isHost": false,"previewText": "Loading the desktop…",@@ -285,8 +285,8 @@"confirm": "Delete Builder? | Its sandbox is deleted. | Delete Space / Keep","facts": ["Status: timed out",- "System: Linux",- "Identifier: cloud:builder [copy cloud:builder doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:builder [copy cloud:builder doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"isHost": false,"previewText": "Not reachable",@@ -1170,9 +1170,9 @@"notch: tiles macos-qa,ubuntu-ci,windows-11; tab 3 Spaces; 232x82 loop 4000","0: pointer 1717,656 open 0 content 0 tab 1000 hover 0 pressed false active false highlighted -","850: pointer 1458,368 open 0 content 0 tab 1000 hover 0 pressed false active false highlighted -",- "1350: pointer 1200,79 open 0 content 0 tab 1000 hover 219 pressed false active false highlighted -",- "1550: pointer 1200,79 open 0 content 0 tab 1000 hover 999 pressed false active false highlighted -",- "1700: pointer 1200,79 open 497 content 0 tab 503 hover 508 pressed false active false highlighted -",+ "1350: pointer 1200,79 open 0 content 0 tab 1000 hover 336 pressed false active false highlighted -",+ "1550: pointer 1200,79 open 0 content 0 tab 1000 hover 1043 pressed false active false highlighted -",+ "1700: pointer 1200,79 open 497 content 0 tab 503 hover 501 pressed false active false highlighted -","2400: pointer 1200,79 open 1000 content 1000 tab 0 hover 0 pressed false active false highlighted -","2750: pointer 1201,80 open 1000 content 1000 tab 0 hover 0 pressed false active false highlighted -","3150: pointer 1544,463 open 1000 content 500 tab 0 hover 0 pressed false active false highlighted -",diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/notch.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/notch.jsonindex f516035871..f533432012 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/notch.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/notch.json@@ -182,10 +182,11 @@"contentIn": 0.22,"contentOut": 0.1,"contentScale": 0.92,- "hoverDamping": 0.8,+ "hoverDamping": 0.65,"hoverDwellMs": 300,- "hoverResponse": 0.38,+ "hoverResponse": 0.3,"hoverScale": 1.08,+ "hoverScaleY": 1.12,"openDamping": 0.8,"openResponse": 0.42,"reducedDuration": 0.15diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/provisioning.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/provisioning.jsonindex 39bdf52b2c..7c525c040d 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/provisioning.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/provisioning.json@@ -22,8 +22,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -83,8 +83,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -147,8 +147,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -211,8 +211,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -295,8 +295,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -382,8 +382,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -469,8 +469,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -556,8 +556,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -643,8 +643,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -730,8 +730,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -797,8 +797,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -880,8 +880,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -966,8 +966,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -1033,8 +1033,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -1116,8 +1116,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -1202,8 +1202,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -1269,8 +1269,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",@@ -1314,8 +1314,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:fresh [copy local:fresh doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:fresh [copy local:fresh doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:fresh","previewText": "Loading the desktop…",@@ -1334,8 +1334,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:demo [copy local:demo doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "local:demo","previewText": "Loading the desktop…",diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/space-facts.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/space-facts.jsonindex 283ce60ecc..09b3ee7f1c 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/space-facts.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/space-facts.json@@ -6,11 +6,11 @@"facts": ["Status: Running","Image: ghcr.io/trycua/linux:24.04-slim ?ghcr.io/trycua/linux:24.04-slim | sha256:4f1c2a9d8e7b6c5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b1a [copy ghcr.io/trycua/linux:24.04-slim doc.on.doc Copy / checkmark Copied 1500ms]",+ "Identifier: local:aurora [copy local:aurora doc.on.doc Copy / checkmark Copied 1500ms]","System: Ubuntu 24.04.3 LTS","Kind: Container","Architecture: ARM",- "Memory: 2.1 GB / 4 GB",- "Identifier: local:aurora [copy local:aurora doc.on.doc Copy / checkmark Copied 1500ms]"+ "Memory: 2.1 GB / 4 GB"]},{@@ -18,10 +18,10 @@"facts": ["Status: Running","Image: ghcr.io/trycua/omarchy:edge [copy ghcr.io/trycua/omarchy:edge doc.on.doc Copy / checkmark Copied 1500ms]",+ "Identifier: local:omarchy [copy local:omarchy doc.on.doc Copy / checkmark Copied 1500ms]","System: Omarchy","Kind: Virtual machine",- "Architecture: x64 [warn exclamationmark.triangle Emulated on this Mac’s ARM processor. Performance may be degraded.]",- "Identifier: local:omarchy [copy local:omarchy doc.on.doc Copy / checkmark Copied 1500ms]"+ "Architecture: x64 [warn exclamationmark.triangle Emulated on this Mac’s ARM processor. Performance may be degraded.]"]},{@@ -29,20 +29,20 @@"facts": ["Status: Running","Image: ghcr.io/trycua/macos:26 [copy ghcr.io/trycua/macos:26 doc.on.doc Copy / checkmark Copied 1500ms]",+ "Identifier: local:studio [copy local:studio doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS 26.5.2 (25F84)","Kind: Virtual machine","Architecture: ARM","Memory: 6.4 GB / 8 GB",- "Storage: 39 GB / 80 GB",- "Identifier: local:studio [copy local:studio doc.on.doc Copy / checkmark Copied 1500ms]"+ "Storage: 39 GB / 80 GB"]},{"case": "Windows by address, no usage yet","facts": ["Status: Running",- "System: Windows Server 2022 Datacenter 10.0.20348",- "Identifier: direct:10.0.0.5:3211 [copy direct:10.0.0.5:3211 doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: direct:10.0.0.5:3211 [copy direct:10.0.0.5:3211 doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Windows Server 2022 Datacenter 10.0.20348"]},{@@ -50,16 +50,16 @@"facts": ["Status: Running","Image: ghcr.io/example/arch:latest [copy ghcr.io/example/arch:latest doc.on.doc Copy / checkmark Copied 1500ms]",- "System: Arch Linux",- "Identifier: local:old [copy local:old doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: local:old [copy local:old doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Arch Linux"]},{"case": "no OS name at all","facts": ["Status: timed out",- "System: Linux",- "Identifier: cloud:builder [copy cloud:builder doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:builder [copy cloud:builder doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"]},{@@ -67,9 +67,9 @@"facts": ["Status: Running","Image: ghcr.io/trycua/linux:24.04-disk [copy ghcr.io/trycua/linux:24.04-disk doc.on.doc Copy / checkmark Copied 1500ms]",+ "Identifier: cloud:review-bot [copy cloud:review-bot doc.on.doc Copy / checkmark Copied 1500ms]","System: Ubuntu 24.04.3 LTS",- "Kind: Virtual machine",- "Identifier: cloud:review-bot [copy cloud:review-bot doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"]},{@@ -77,8 +77,8 @@"facts": ["Status: Running","Image: ghcr.io/example/windows@sha256:9b0e6c1d2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d ?ghcr.io/example/windows@sha256:9b0e6c1d2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d | sha256:9b0e6c1d2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d [copy ghcr.io/example/windows@sha256:9b0e6c1d2a3f4e5d6c7b8a9f0e1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d doc.on.doc Copy / checkmark Copied 1500ms]",- "System: Windows",- "Identifier: cloud:ci-7 [copy cloud:ci-7 doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:ci-7 [copy cloud:ci-7 doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Windows"]},{@@ -86,10 +86,10 @@"facts": ["Status: Running","Image: ghcr.io/trycua/linux:24.04-disk [copy ghcr.io/trycua/linux:24.04-disk doc.on.doc Copy / checkmark Copied 1500ms]",+ "Identifier: cloud:x64 [copy cloud:x64 doc.on.doc Copy / checkmark Copied 1500ms]","System: Ubuntu 24.04.3 LTS","Kind: Virtual machine",- "Architecture: x64",- "Identifier: cloud:x64 [copy cloud:x64 doc.on.doc Copy / checkmark Copied 1500ms]"+ "Architecture: x64"]}]diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/space-power.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/space-power.jsonindex 89adc8823e..e2e41c7f07 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/space-power.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/space-power.json@@ -22,9 +22,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","previewText": "Loading the desktop…",@@ -44,9 +44,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Loading the desktop…",@@ -66,8 +66,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -86,8 +86,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -139,9 +139,9 @@"creditNotice": null,"facts": ["Status: Suspending…",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","previewText": "Suspending…",@@ -161,9 +161,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Loading the desktop…",@@ -183,8 +183,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -203,8 +203,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -258,9 +258,9 @@"creditNotice": null,"facts": ["Status: Suspending…",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","previewText": "Suspending…",@@ -280,9 +280,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Loading the desktop…",@@ -302,8 +302,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -322,8 +322,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -377,9 +377,9 @@"creditNotice": null,"facts": ["Status: Suspending…",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","previewText": "Suspending…",@@ -399,9 +399,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Loading the desktop…",@@ -421,8 +421,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -441,8 +441,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -496,9 +496,9 @@"creditNotice": null,"facts": ["Status: Suspending…",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","previewText": "Suspending…",@@ -518,9 +518,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Loading the desktop…",@@ -540,8 +540,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -560,8 +560,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -615,9 +615,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","previewText": "Suspended",@@ -637,9 +637,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Loading the desktop…",@@ -659,8 +659,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -679,8 +679,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -732,9 +732,9 @@"creditNotice": null,"facts": ["Status: Resuming…",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","previewText": "Resuming…",@@ -754,9 +754,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Loading the desktop…",@@ -776,8 +776,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -796,8 +796,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -851,9 +851,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -874,9 +874,9 @@"creditNotice": null,"facts": ["Status: Running",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Loading the desktop…",@@ -896,8 +896,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -916,8 +916,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -971,9 +971,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -994,9 +994,9 @@"creditNotice": null,"facts": ["Status: Turning off…",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Turning off…",@@ -1016,8 +1016,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -1036,8 +1036,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -1092,9 +1092,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -1115,9 +1115,9 @@"creditNotice": null,"facts": ["Status: Turning off…",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Turning off…",@@ -1137,8 +1137,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -1157,8 +1157,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -1213,9 +1213,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -1236,9 +1236,9 @@"creditNotice": null,"facts": ["Status: Off",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Off",@@ -1258,8 +1258,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Loading the desktop…",@@ -1278,8 +1278,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -1333,9 +1333,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -1356,9 +1356,9 @@"creditNotice": null,"facts": ["Status: Off",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Off",@@ -1378,8 +1378,8 @@"creditNotice": null,"facts": ["Status: Turning off…",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Turning off…",@@ -1398,8 +1398,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -1454,9 +1454,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -1477,9 +1477,9 @@"creditNotice": null,"facts": ["Status: Off",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Off",@@ -1499,8 +1499,8 @@"creditNotice": null,"facts": ["Status: Turning off…",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Turning off…",@@ -1519,8 +1519,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -1575,9 +1575,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -1598,9 +1598,9 @@"creditNotice": null,"facts": ["Status: Off",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Off",@@ -1620,8 +1620,8 @@"creditNotice": null,"facts": ["Status: Off",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Off",@@ -1640,8 +1640,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -1695,9 +1695,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -1718,9 +1718,9 @@"creditNotice": null,"facts": ["Status: Turning on…",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Turning on…",@@ -1740,8 +1740,8 @@"creditNotice": null,"facts": ["Status: Off",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Off",@@ -1760,8 +1760,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -1816,9 +1816,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -1838,9 +1838,9 @@"creditNotice": null,"facts": ["Status: Deleting…",+ "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]","System: macOS",- "Kind: Virtual machine",- "Identifier: local:mac [copy local:mac doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Virtual machine"],"id": "local:mac","previewText": "Deleting…",@@ -1860,8 +1860,8 @@"creditNotice": null,"facts": ["Status: Off",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Off",@@ -1880,8 +1880,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",@@ -1936,9 +1936,9 @@"creditNotice": null,"facts": ["Status: Suspended",+ "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]","System: Linux",- "Kind: Container",- "Identifier: local:box [copy local:box doc.on.doc Copy / checkmark Copied 1500ms]"+ "Kind: Container"],"id": "local:box","powerError": "Could not turn it on: Docker is not running",@@ -1959,8 +1959,8 @@"creditNotice": null,"facts": ["Status: Off",- "System: Linux",- "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: relay:space-0123456789abcdef [copy relay:space-0123456789abcdef doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "relay:space-0123456789abcdef","previewText": "Off",@@ -1979,8 +1979,8 @@"creditNotice": null,"facts": ["Status: Running",- "System: Linux",- "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]"+ "Identifier: cloud:pool-c [copy cloud:pool-c doc.on.doc Copy / checkmark Copied 1500ms]",+ "System: Linux"],"id": "cloud:pool-c","previewText": "Loading the desktop…",diff --git a/libs/cua/crates/cua-spaces-app-core/src/keyvault/client.rs b/libs/cua/crates/cua-spaces-app-core/src/keyvault/client.rsindex bb593a8767..6827dbfe65 100644--- a/libs/cua/crates/cua-spaces-app-core/src/keyvault/client.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/keyvault/client.rs@@ -424,6 +424,15 @@ impl KeyvaultCommands {.map(|_| ())}+ /// Auto-wipe of delivered copies. On only shortens what new copies+ /// keep; off keeps them until wiped, so the daemon asks for presence.+ pub async fn set_auto_wipe(&self, on: bool) -> Result<(), KvFailure> {+ self.transport+ .call(Request::SetAutoWipe { on })+ .await+ .map(|_| ())+ }+/// Whether `item_ids` may be used by unattended rules. Off only narrows;/// on widens, so the daemon asks for presence. Identity providers never/// go unattended.@@ -557,6 +566,10 @@ impl KeyvaultCommands {self.set_disabled(*disabled).await?;KvOutcome::Done}+ KvCommand::SetAutoWipe { on } => {+ self.set_auto_wipe(*on).await?;+ KvOutcome::Done+ }KvCommand::SetUnattended {item_ids,unattended,diff --git a/libs/cua/crates/cua-spaces-app-core/src/keyvault/credential.rs b/libs/cua/crates/cua-spaces-app-core/src/keyvault/credential.rsindex e3fd18be57..5957d7b98d 100644--- a/libs/cua/crates/cua-spaces-app-core/src/keyvault/credential.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/keyvault/credential.rs@@ -253,6 +253,7 @@ mod tests {items: 0,pending: 0,unlock_policy: None,+ auto_wipe: None,os_protector_available: os,passphrase_available: true,unlock_protectors: unlock.iter().map(|s| s.to_string()).collect(),diff --git a/libs/cua/crates/cua-spaces-app-core/src/keyvault/view.rs b/libs/cua/crates/cua-spaces-app-core/src/keyvault/view.rsindex daed08bf0d..dad3ebde22 100644--- a/libs/cua/crates/cua-spaces-app-core/src/keyvault/view.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/keyvault/view.rs@@ -20,9 +20,19 @@ pub fn live_rule(r: &KvRule, now: i64) -> bool {r.enabled && now < r.not_after_ms as i64}-/// A delivery not yet wiped.+/// A delivery not yet wiped (one without expiry stays until wiped).pub fn live_delivery(d: &KvDelivery, now: i64) -> bool {- !d.wiped && now < d.expires_ms as i64+ !d.wiped && (d.expires_ms == KV_NO_EXPIRY || now < d.expires_ms as i64)+}++/// How long a delivered copy stays: "wiped in 5 min", or "until you wipe+/// it" (auto-wipe off).+pub fn delivery_lifetime(expires_ms: u64, now: i64) -> String {+ if expires_ms == KV_NO_EXPIRY {+ "until you wipe it".into()+ } else {+ format!("wiped in {}", duration(expires_ms as i64 - now))+ }}/// The always-visible signal (notch indicator, menu bar line) while any@@ -30,19 +40,90 @@ pub fn live_delivery(d: &KvDelivery, now: i64) -> bool {/// an unattended rule or the user): "Keyvault sign-ins live in dev-1", or/// "... in 2 Spaces". None when nothing is live.pub fn sharing_label(o: &KeyvaultOverview, now: i64) -> Option<String> {+ visible_sharing_label(o, now, &[])+}++/// [`sharing_label`] without the copies the user dismissed (their import+/// ids): Dismiss hides the notch indicator, it never revokes or wipes.+pub fn visible_sharing_label(+ o: &KeyvaultOverview,+ now: i64,+ dismissed: &[String],+) -> Option<String> {+ let targets = live_targets(o, now, dismissed);+ match targets.as_slice() {+ [] => None,+ [one] => Some(format!("Keyvault sign-ins live in {one}")),+ many => Some(format!("Keyvault sign-ins live in {} Spaces", many.len())),+ }+}++/// The targets with a live copy not in `dismissed`, sorted, once each.+fn live_targets<'a>(o: &'a KeyvaultOverview, now: i64, dismissed: &[String]) -> Vec<&'a str> {let mut targets: Vec<&str> = o.deliveries.iter()- .filter(|d| live_delivery(d, now))+ .filter(|d| live_delivery(d, now) && !dismissed.contains(&d.import_id)).map(|d| d.target.as_str()).collect();targets.sort_unstable();targets.dedup();- match targets.as_slice() {- [] => None,- [one] => Some(format!("Keyvault sign-ins live in {one}")),- many => Some(format!("Keyvault sign-ins live in {} Spaces", many.len())),- }+ targets+}++/// A delivery's target names this Space: its id (`local:dev-1`), the name+/// in it (`dev-1`, what an agent asks for), or its display name.+fn names_space(target: &str, space: &crate::model::Space) -> bool {+ target == space.id+ || target == space.name+ || space+ .id+ .split_once(':')+ .is_some_and(|(_, name)| name == target)+}++/// The ids of `spaces` signed in through the Keyvault: a live copy is in+/// them. The Spaces list marks every one ("Signed in"); the notch passes+/// the user's `dismissed` copies, which it no longer shows.+pub fn signed_in_spaces(+ o: &KeyvaultOverview,+ now: i64,+ dismissed: &[String],+ spaces: &[crate::model::Space],+) -> Vec<String> {+ let targets = live_targets(o, now, dismissed);+ spaces+ .iter()+ .filter(|s| targets.iter().any(|t| names_space(t, s)))+ .map(|s| s.id.clone())+ .collect()+}++/// The dismissed copies still live (a wiped or expired copy no longer+/// needs remembering).+pub fn prune_dismissed(o: &KeyvaultOverview, now: i64, dismissed: &[String]) -> Vec<String> {+ dismissed+ .iter()+ .filter(|id| {+ o.deliveries+ .iter()+ .any(|d| &d.import_id == *id && live_delivery(d, now))+ })+ .cloned()+ .collect()+}++/// The Access row of `space`'s copies (its [`AccessRow::key`]), to focus+/// when its "Signed in" badge is clicked.+pub fn space_access_key(+ o: &KeyvaultOverview,+ now: i64,+ space: &crate::model::Space,+) -> Option<String> {+ live_targets(o, now, &[])+ .into_iter()+ .find(|t| names_space(t, space))+ .map(|t| format!("d:{t}"))}fn js_round(x: f64) -> i64 {@@ -229,11 +310,7 @@ fn consent_for(item: &KvItem, o: &KeyvaultOverview, now: i64) -> Vec<ConsentChip{chips.push(ConsentChip {kind: ConsentChipKind::Delivered,- text: format!(- "In {}, wiped in {}",- d.target,- duration(d.expires_ms as i64 - now)- ),+ text: format!("In {}, {}", d.target, delivery_lifetime(d.expires_ms, now)),});}for g in o@@ -609,6 +686,10 @@ pub struct AccessRow {pub action_label: String,/// What the button sends.pub command: KvCommand,+ /// A Space's copies: their import ids, which Dismiss hides from the+ /// notch (empty for grants and rules).+ #[serde(default)]+ pub imports: Vec<String>,}/// Live grants, rules and delivery targets, with their undo.@@ -642,6 +723,7 @@ pub fn access_rows(o: &KeyvaultOverview, now: i64) -> Vec<AccessRow> {),action_label: "Revoke".into(),command: KvCommand::RevokeGrant { id: g.id.clone() },+ imports: vec![],});}for r in o.rules.iter().filter(|r| live_rule(r, now)) {@@ -660,6 +742,7 @@ pub fn access_rows(o: &KeyvaultOverview, now: i64) -> Vec<AccessRow> {detail: names(&r.items),action_label: "Remove".into(),command: KvCommand::RemoveRule { id: r.id.clone() },+ imports: vec![],});}let mut targets: Vec<&str> = Vec::new();@@ -669,20 +752,28 @@ pub fn access_rows(o: &KeyvaultOverview, now: i64) -> Vec<AccessRow> {}}for t in targets {+ // The soonest expiry; none (until wiped) only when no copy expires.let first = o.deliveries.iter().filter(|d| live_delivery(d, now) && d.target == t)- .map(|d| d.expires_ms as i64)+ .map(|d| d.expires_ms)+ .filter(|&e| e != KV_NO_EXPIRY).min()- .unwrap_or(now);+ .unwrap_or(KV_NO_EXPIRY);rows.push(AccessRow {kind: AccessKind::Delivery,key: format!("d:{t}"),text: format!("Copy in {t}"),- detail: format!("wiped in {}", duration(first - now)),+ detail: delivery_lifetime(first, now),action_label: "Wipe".into(),command: KvCommand::Release { target: t.into() },+ imports: o+ .deliveries+ .iter()+ .filter(|d| live_delivery(d, now) && d.target == t)+ .map(|d| d.import_id.clone())+ .collect(),});}rows@@ -931,6 +1022,112 @@ mod sharing_tests {assert_eq!(sharing_label(&o, 2_000), None);}+ #[test]+ fn a_copy_without_expiry_stays_live_until_wiped() {+ let o = KeyvaultOverview {+ deliveries: vec![delivery("dev-1", KV_NO_EXPIRY, false)],+ ..KeyvaultOverview::default()+ };+ let far = i64::MAX / 2;+ assert!(live_delivery(&o.deliveries[0], far));+ assert_eq!(+ sharing_label(&o, far).as_deref(),+ Some("Keyvault sign-ins live in dev-1")+ );+ let rows = access_rows(&o, far);+ assert_eq!(rows[0].text, "Copy in dev-1");+ assert_eq!(rows[0].detail, "until you wipe it");+ assert_eq!(rows[0].imports, ["imp-dev-1"]);+ // A wiped one is gone.+ let wiped = KeyvaultOverview {+ deliveries: vec![delivery("dev-1", KV_NO_EXPIRY, true)],+ ..KeyvaultOverview::default()+ };+ assert_eq!(sharing_label(&wiped, 0), None);+ // With auto-wipe on, the soonest expiry is shown.+ let timed = KeyvaultOverview {+ deliveries: vec![+ delivery("dev-1", KV_NO_EXPIRY, false),+ delivery("dev-1", 2_000 + 5 * 60_000, false),+ ],+ ..KeyvaultOverview::default()+ };+ assert_eq!(access_rows(&timed, 2_000)[0].detail, "wiped in 5 min");+ assert_eq!(delivery_lifetime(KV_NO_EXPIRY, 0), "until you wipe it");+ }++ fn space(id: &str, name: &str) -> crate::model::Space {+ let row = crate::model::SpaceRow {+ id: id.into(),+ name: name.into(),+ provider: "local".into(),+ spacesd_version: "0.4.0".into(),+ features: vec![],+ added_at: None,+ os: None,+ os_name: None,+ reachable: true,+ error: None,+ os_pretty_name: None,+ image: None,+ image_digest: None,+ kind: None,+ arch: None,+ host: None,+ host_name: None,+ power: None,+ power_state: None,+ cloud: None,+ cloud_place: None,+ cloud_delete: None,+ };+ crate::spaces::row_to_space(&row, 0)+ }++ #[test]+ fn signed_in_spaces_follow_live_copies_and_dismissal_hides_only_the_notch() {+ let mut o = KeyvaultOverview::default();+ let mut by_id = delivery("local:ci", KV_NO_EXPIRY, false);+ by_id.import_id = "imp-a".into();+ let mut by_name = delivery("dev-1", 10_000, false);+ by_name.import_id = "imp-b".into();+ o.deliveries = vec![by_id, by_name, delivery("gone", 10_000, true)];+ let spaces = [+ space("local:ci", "ci"),+ space("local:dev-1", "dev-1"),+ space("local:gone", "gone"),+ ];+ // Matched by id or by name; a wiped copy signs nothing in.+ assert_eq!(+ signed_in_spaces(&o, 2_000, &[], &spaces),+ ["local:ci", "local:dev-1"]+ );+ // Dismissing one copy hides it from the notch only.+ let dismissed = vec!["imp-b".to_string()];+ assert_eq!(+ signed_in_spaces(&o, 2_000, &dismissed, &spaces),+ ["local:ci"]+ );+ assert_eq!(+ visible_sharing_label(&o, 2_000, &dismissed).as_deref(),+ Some("Keyvault sign-ins live in local:ci")+ );+ let all = vec!["imp-a".to_string(), "imp-b".to_string()];+ assert_eq!(visible_sharing_label(&o, 2_000, &all), None);+ // The Access page still lists (and wipes) both.+ assert_eq!(access_rows(&o, 2_000).len(), 2);+ // A new copy (a new import id) shows again; dismissed ids of copies+ // no longer live are forgotten.+ assert_eq!(prune_dismissed(&o, 2_000, &all), all);+ assert_eq!(prune_dismissed(&o, 20_000, &all), ["imp-a"]);+ // The badge focuses the Space's Access row.+ assert_eq!(+ space_access_key(&o, 2_000, &spaces[1]).as_deref(),+ Some("d:dev-1")+ );+ assert_eq!(space_access_key(&o, 2_000, &spaces[2]), None);+ }+#[test]fn an_unsigned_daemon_is_named_as_such() {let o = KeyvaultOverview {diff --git a/libs/cua/crates/cua-spaces-app-core/src/keyvault/wire.rs b/libs/cua/crates/cua-spaces-app-core/src/keyvault/wire.rsindex 208fc08d7e..a3a80116b1 100644--- a/libs/cua/crates/cua-spaces-app-core/src/keyvault/wire.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/keyvault/wire.rs@@ -313,13 +313,17 @@ pub struct KvDelivery {pub caller_fp: String,/// Delivered.pub delivered_ms: u64,- /// Wiped at.+ /// Wiped at ([`KV_NO_EXPIRY`]: only when wiped).pub expires_ms: u64,/// Already wiped.#[serde(default)]pub wiped: bool,}+/// A delivery's `expires_ms` when it never expires on its own (auto-wipe+/// off): it stays until wiped.+pub const KV_NO_EXPIRY: u64 = 0;+/// One audit log entry.#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]pub struct KvAuditEntry {@@ -372,6 +376,10 @@ pub struct KvStatus {/// `auto` or `presence`.#[serde(default, skip_serializing_if = "Option::is_none")]pub unlock_policy: Option<String>,+ /// Delivered copies wipe themselves after their TTL (off by default;+ /// none: not told, a broker before the setting or a third party).+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub auto_wipe: Option<bool>,/// The daemon can create the OS key store protector (setup offers Touch/// ID); false for a development daemon, which is passphrase-only.#[serde(default)]@@ -478,6 +486,12 @@ pub enum KvCommand {/// Id.id: String,},+ /// Auto-wipe of delivered copies (turning it off asks for Touch ID).+ #[serde(rename_all = "camelCase")]+ SetAutoWipe {+ /// On.+ on: bool,+ },/// Wipe a Space's copies.Release {/// Target.diff --git a/libs/cua/crates/cua-spaces-app-core/src/notch/mod.rs b/libs/cua/crates/cua-spaces-app-core/src/notch/mod.rsindex 1559f38a36..76fff66330 100644--- a/libs/cua/crates/cua-spaces-app-core/src/notch/mod.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/notch/mod.rs@@ -60,6 +60,9 @@ pub struct NotchMotion {pub hover_damping: f64,/// Horizontal scale of the closed notch (and its tab) under the pointer.pub hover_scale: f64,+ /// Vertical scale of the closed notch under the pointer (a few points+ /// taller, anchored at the top).+ pub hover_scale_y: f64,/// The content starts fading in this long after the shape starts/// opening (ms).pub content_delay_ms: u32,@@ -80,9 +83,10 @@ pub const MOTION: NotchMotion = NotchMotion {close_response: 0.4,close_damping: 1.0,reduced_duration: 0.15,- hover_response: 0.38,- hover_damping: 0.8,+ hover_response: 0.3,+ hover_damping: 0.65,hover_scale: 1.08,+ hover_scale_y: 1.12,content_delay_ms: 90,content_in: 0.22,content_out: 0.1,@@ -301,6 +305,9 @@ pub struct NotchTile {/// While it is being created: the phase in words ("Starting…"), or/// "Failed"; while it is being deleted, "Deleting…".pub progress_label: Option<String>,+ /// Signed in through the Keyvault (and not dismissed): the key badge.+ #[serde(default)]+ pub signed_in: bool,}/// Linux distributions with their own icon: a word in the reported OS@@ -450,6 +457,7 @@ pub fn tiles_matching(spaces: &[Space], targeted: Option<&str>, query: &str) ->} else {s.progress.as_ref().map(|p| p.label.clone())},+ signed_in: false,id: s.id,name: s.name,os: s.os,@@ -498,6 +506,11 @@ pub struct NotchState {/// [`crate::keyvault::view::sharing_label`]), so access is never silent.#[serde(default, skip_serializing_if = "Option::is_none")]pub keyvault: Option<String>,+ /// The Spaces signed in through the Keyvault, less the copies the user+ /// dismissed ([`crate::keyvault::view::signed_in_spaces`]): their tiles+ /// carry the key.+ #[serde(default, skip_serializing_if = "Vec::is_empty")]+ pub signed_in: Vec<String>,/// "Spaces tab in the notch: Hide" (menu bar only): nothing shows in/// the notch, and hover, clicks and window drags do nothing.#[serde(default)]@@ -528,6 +541,7 @@ impl Default for NotchState {hotspot: false,transfer: None,keyvault: None,+ signed_in: vec![],hidden: false,}}@@ -589,6 +603,9 @@ pub enum NotchEvent {/// The sharing label, if any.#[serde(default)]label: Option<String>,+ /// The Space ids signed in (their tiles carry the key).+ #[serde(default, rename = "signedIn")]+ signed_in: Vec<String>,},}@@ -734,8 +751,9 @@ pub fn reduce(state: &NotchState, event: &NotchEvent) -> NotchTransition {s.hotspot = *hotspot;s.transfer = transfer.clone();}- NotchEvent::Keyvault { label } => {+ NotchEvent::Keyvault { label, signed_in } => {s.keyvault = label.clone();+ s.signed_in = signed_in.clone();}}// A closed panel forgets its search.@@ -779,6 +797,22 @@ pub struct NotchView {pub hover_cue: bool,/// One line in the open panel when window drags cannot be detected.pub permission: Option<NotchPermission>,+ /// One line in the open panel while Keyvault sign-ins are live in a+ /// Space (and not dismissed): what is live, and Dismiss.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub access: Option<NotchAccess>,+}++/// The live-access line and its button. Dismiss hides the indicator and+/// the tiles' key; it revokes and wipes nothing (the Keyvault's Access page+/// does that).+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct NotchAccess {+ /// "Keyvault sign-ins live in dev-1" (opens the Access page).+ pub text: String,+ /// "Dismiss".+ pub dismiss: String,}/// The missing-permission line and its button.@@ -1103,11 +1137,14 @@ pub fn view(state: &NotchState, spaces: &[Space]) -> NotchView {};// A drag drops on any Space: the search only narrows browsing.let query = if drop_mode { "" } else { state.query.trim() };- let visible = if phase == NotchPhase::Tiles {+ let mut visible = if phase == NotchPhase::Tiles {tiles_matching(spaces, state.drag.target_space_id.as_deref(), query)} else {Vec::new()};+ for t in &mut visible {+ t.signed_in = state.signed_in.contains(&t.id);+ }let n = visible.len();let remote = remote_count(spaces);let searching = !query.is_empty();@@ -1131,6 +1168,13 @@ pub fn view(state: &NotchState, spaces: &[Space]) -> NotchView {action: "Open Settings".into(),pane: "accessibility".into(),});+ let access = (phase == NotchPhase::Tiles && !drop_mode && permission.is_none())+ .then(|| state.keyvault.clone())+ .flatten()+ .map(|text| NotchAccess {+ text,+ dismiss: "Dismiss".into(),+ });let (show_tab, hover_cue, activity) = if state.hidden {(false, false, None)} else {@@ -1150,6 +1194,7 @@ pub fn view(state: &NotchState, spaces: &[Space]) -> NotchView {show_tab,hover_cue,permission,+ access,phase,label: match phase {NotchPhase::Closed => "Cua Spaces".into(),@@ -1503,6 +1548,7 @@ mod tests {&NotchState::default(),&NotchEvent::Keyvault {label: Some(label.into()),+ signed_in: vec![],},).state;@@ -1510,10 +1556,75 @@ mod tests {view(&on, &[]).activity.unwrap().kind,NotchActivityKind::Keyvault);- let off = reduce(&on, &NotchEvent::Keyvault { label: None }).state;+ let off = reduce(+ &on,+ &NotchEvent::Keyvault {+ label: None,+ signed_in: vec![],+ },+ )+ .state;assert!(view(&off, &[]).activity.is_none());}+ #[test]+ fn signed_in_spaces_carry_the_key_on_their_tiles() {+ let mut a = space("a", "a", SpaceOs::Linux, SpaceStatus::Running);+ a.last_used_at = 10;+ let mut b = space("b", "b", SpaceOs::Linux, SpaceStatus::Running);+ b.last_used_at = 5;+ let spaces = vec![a, b];+ let mut s = reduce(+ &NotchState::default(),+ &NotchEvent::Keyvault {+ label: Some("Keyvault sign-ins live in a".into()),+ signed_in: vec!["a".into()],+ },+ )+ .state;+ s.open = true;+ let v = view(&s, &spaces);+ let keyed: Vec<(&str, bool)> = v+ .tiles+ .iter()+ .map(|t| (t.id.as_str(), t.signed_in))+ .collect();+ assert_eq!(keyed, [("a", true), ("b", false)]);+ // Dismissed (the shell sends the rest): no key, no indicator.+ let s = reduce(+ &s,+ &NotchEvent::Keyvault {+ label: None,+ signed_in: vec![],+ },+ )+ .state;+ let v = view(&s, &spaces);+ assert!(v.tiles.iter().all(|t| !t.signed_in));+ assert!(v.activity.is_none());+ assert!(v.access.is_none(), "dismissed: no line either");+ }++ #[test]+ fn the_open_panel_names_live_access_with_a_dismiss() {+ let label = "Keyvault sign-ins live in dev-1";+ let mut s = reduce(+ &NotchState::default(),+ &NotchEvent::Keyvault {+ label: Some(label.into()),+ signed_in: vec![],+ },+ )+ .state;+ assert!(view(&s, &[]).access.is_none(), "closed: the indicator only");+ s.open = true;+ let a = view(&s, &[]).access.unwrap();+ assert_eq!((a.text.as_str(), a.dismiss.as_str()), (label, "Dismiss"));+ // A drop hint takes the line.+ s.drop_targeted = true;+ assert!(view(&s, &[]).access.is_none());+ }+#[test]fn someone_connected_to_this_machine_shows_until_they_leave() {use crate::host::{HostSummaryInput, this_machine_space};@@ -1711,6 +1822,11 @@ mod tests {assert!(m.content_delay_ms > 0, "content follows the shape");assert!(m.content_out < m.close_response, "content leaves first");assert!(m.hover_scale > 1.0 && m.hover_scale < 1.15);+ // The cue answers the pointer at once with a little bounce, a few+ // points wider and taller, well before the dwell opens it.+ assert!(m.hover_scale_y > 1.0 && m.hover_scale_y < 1.2);+ assert!(m.hover_response <= 0.3 && m.hover_damping >= 0.6 && m.hover_damping <= 0.7);+ assert!(m.hover_response * 1000.0 <= f64::from(m.hover_dwell_ms));}#[test]diff --git a/libs/cua/crates/cua-spaces-app-core/src/settings.rs b/libs/cua/crates/cua-spaces-app-core/src/settings.rsindex ef6b7fc469..e98ec6b808 100644--- a/libs/cua/crates/cua-spaces-app-core/src/settings.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/settings.rs@@ -57,6 +57,10 @@ pub struct AppSettings {/// Settings, Experiments: every switch off unless turned on/// ([`crate::experiments`]).pub experiments: Experiments,+ /// Keyvault copies (import ids) the user dismissed from the notch: it no+ /// longer shows them, nothing is revoked or wiped+ /// ([`crate::keyvault::view::prune_dismissed`] forgets the gone ones).+ pub dismissed_access: Vec<String>,}impl Default for AppSettings {@@ -72,6 +76,7 @@ impl Default for AppSettings {update_channel: UpdateChannel::Stable,launch_at_login: None,experiments: Experiments::default(),+ dismissed_access: vec![],}}}@@ -235,6 +240,9 @@ pub struct SettingsInput {pub login_item: Option<crate::login_item::LoginItemInput>,/// Settings, Experiments (what the page mentions follows them).pub experiments: Experiments,+ /// The Keyvault's auto-wipe, once the broker told it (none: no+ /// Keyvault section).+ pub keyvault_auto_wipe: Option<bool>,}impl Default for SettingsInput {@@ -254,10 +262,48 @@ impl Default for SettingsInput {billing: None,login_item: None,experiments: Experiments::default(),+ keyvault_auto_wipe: None,}}}+/// The Keyvault auto-wipe switch's label.+pub const AUTO_WIPE_LABEL: &str = "Wipe access from Spaces automatically";++/// The line under it.+pub const AUTO_WIPE_NOTE: &str = "When off, sign-ins stay in a Space until you wipe them.";++/// The Keyvault section: the auto-wipe switch (off by default) and its+/// line. Row id `keyvault-auto-wipe`; its options are `on` and `off`.+pub fn keyvault_section(auto_wipe: bool) -> SettingsSection {+ let mut toggle = row(+ "keyvault-auto-wipe",+ SettingsRowKind::Toggle,+ AUTO_WIPE_LABEL,+ );+ toggle.options = vec![opt("on", "On", auto_wipe), opt("off", "Off", !auto_wipe)];+ toggle.help = Some(if auto_wipe {+ "Turning it off asks for Touch ID".into()+ } else {+ "Wipes sign-ins after an hour (15 minutes for identity providers)".into()+ });+ SettingsSection {+ id: "keyvault".into(),+ title: "Keyvault".into(),+ button: None,+ button_enabled: false,+ button_help: None,+ rows: vec![+ toggle,+ row(+ "keyvault-auto-wipe-note",+ SettingsRowKind::Note,+ AUTO_WIPE_NOTE,+ ),+ ],+ }+}+/// How a Settings row draws.#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]#[serde(rename_all = "lowercase")]@@ -521,6 +567,10 @@ pub fn page(input: &SettingsInput) -> SettingsPage {});}+ if let Some(on) = input.keyvault_auto_wipe {+ sections.push(keyvault_section(on));+ }+let agents = input.agents.clone().unwrap_or_default();let any_installed = agents.iter().any(|a| a.installed);let rows = agents@@ -666,6 +716,42 @@ mod tests {);}+ #[test]+ fn the_keyvault_section_offers_auto_wipe_off_by_default() {+ let ids =+ |p: &SettingsPage| -> Vec<String> { p.sections.iter().map(|s| s.id.clone()).collect() };+ // Not told yet (no broker): no section.+ assert!(!ids(&page(&SettingsInput::default())).contains(&"keyvault".to_string()));+ let p = page(&SettingsInput {+ telemetry: Some(TelemetryInput::default()),+ keyvault_auto_wipe: Some(false),+ ..Default::default()+ });+ assert_eq!(+ ids(&p),+ ["account", "general", "privacy", "keyvault", "agents"]+ );+ let kv = &p.sections[3];+ assert_eq!(kv.title, "Keyvault");+ let toggle = &kv.rows[0];+ assert_eq!(+ (toggle.id.as_str(), toggle.kind, toggle.label.as_str()),+ (+ "keyvault-auto-wipe",+ SettingsRowKind::Toggle,+ AUTO_WIPE_LABEL+ )+ );+ let on = |r: &SettingsRow| r.options.iter().find(|o| o.id == "on").unwrap().active;+ assert!(!on(toggle), "off by default");+ assert!(on(&keyvault_section(true).rows[0]));+ assert_eq!(kv.rows[1].kind, SettingsRowKind::Note);+ assert!(!AUTO_WIPE_NOTE.contains('\u{2014}'), "no em dashes in copy");+ // A settings file from before dismissals: none dismissed.+ let old: AppSettings = serde_json::from_str(r#"{"menuBar":true}"#).unwrap();+ assert!(old.dismissed_access.is_empty());+ }+#[test]fn launch_at_login_leads_general_once_read() {use crate::login_item::{LABEL, LoginItemInput, LoginItemStatus};diff --git a/libs/cua/crates/cua-spaces-app-core/src/spaces/sidebar.rs b/libs/cua/crates/cua-spaces-app-core/src/spaces/sidebar.rsindex 57094a7616..9e20f530b6 100644--- a/libs/cua/crates/cua-spaces-app-core/src/spaces/sidebar.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/spaces/sidebar.rs@@ -725,8 +725,8 @@ pub fn arch_fact(space: &Space, host_arch: Option<&str>) -> Option<Fact> {})}-/// Status, Image, System (the full OS string), Kind, Architecture, Memory,-/// Storage, Identifier: each only when known.+/// Status, Image, Identifier, System (the full OS string), Kind,+/// Architecture, Memory, Storage: each only when known.fn detail_facts(space: &Space,status: String,@@ -753,6 +753,13 @@ fn detail_facts(..fact("Image", image.to_string())});}+ // Directly below the Image. A Space being created has no identifier yet.+ if space.progress.is_none() {+ facts.push(Fact {+ copy: Some(fact_copy(&space.id)),+ ..fact("Identifier", space.id.clone())+ });+ }let system = system_text(space);facts.push(Fact {help: Some(system.clone()),@@ -770,13 +777,6 @@ fn detail_facts(facts.push(fact("Storage", usage_text(u.disk_used, u.disk_total)));}}- // A Space being created has no identifier yet.- if space.progress.is_none() {- facts.push(Fact {- copy: Some(fact_copy(&space.id)),- ..fact("Identifier", space.id.clone())- });- }facts}@@ -1061,10 +1061,10 @@ mod tests {["Status","Image",+ "Identifier","System","Kind",- "Architecture",- "Identifier"+ "Architecture"]);// The same platform as this Mac: no warning.diff --git a/libs/cua/crates/cua-spaces-app-core/src/teleport/flow.rs b/libs/cua/crates/cua-spaces-app-core/src/teleport/flow.rsindex 8dabf17ce5..03c0ab4ce2 100644--- a/libs/cua/crates/cua-spaces-app-core/src/teleport/flow.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/teleport/flow.rs@@ -723,6 +723,63 @@ pub fn progress(s: &PickerState) -> f64 {((last.step as f64 + within) / (last.steps.max(1) as f64)).min(1.0)}+/// What the run is doing, in words, for the line under its progress bar:+/// the latest step or stage the pipeline reported ("Reading Chrome cookies+/// (macOS will ask for Keychain access)…", "Packing profile"), with the+/// bytes while they move ("Uploading 12 / 80 MB"). None before the first+/// event and once the run is done or failed.+pub fn run_status(events: &[RunEvent]) -> Option<String> {+ let last = events.last()?;+ if matches!(last.phase, RunPhase::Done | RunPhase::Failed) {+ return None;+ }+ // The newest event with words: a stage, else the step as it started.+ let worded = events+ .iter()+ .rev()+ .take_while(|e| e.step == last.step)+ .find(|e| {+ matches!(e.phase, RunPhase::Started | RunPhase::Progress) && !e.detail.trim().is_empty()+ })?;+ let mut text = worded.detail.trim().to_string();+ // A file path or an installer line reads as the step it belongs to.+ if worded.phase == RunPhase::Progress && worded.kind != "state" {+ text = events+ .iter()+ .rev()+ .find(|e| e.step == last.step && e.phase == RunPhase::Started)+ .map(|e| e.detail.trim().to_string())+ .filter(|t| !t.is_empty())+ .unwrap_or(text);+ }+ if last.phase == RunPhase::Progress+ && last.total_bytes > 0+ && last.done_bytes < last.total_bytes+ {+ text = format!(+ "{text} {}",+ format_bytes_pair(last.done_bytes, last.total_bytes)+ );+ }+ Some(text)+}++/// [`run_status`] of the picker's run (none unless it is running).+pub fn status(s: &PickerState) -> Option<String> {+ (s.step == Step::Running)+ .then(|| run_status(&s.events))+ .flatten()+}++/// "12 / 80 MB" (one unit when both read in it), else "512 KB / 80 MB".+pub fn format_bytes_pair(done: u64, total: u64) -> String {+ let (d, t) = (format_bytes(done.min(total)), format_bytes(total));+ match (d.rsplit_once(' '), t.rsplit_once(' ')) {+ (Some((dn, du)), Some((_, tu))) if du == tu => format!("{dn} / {t}"),+ _ => format!("{d} / {t}"),+ }+}+/// "512 B", "1.5 KB", "12 MB".pub fn format_bytes(n: u64) -> String {if n < 1024 {@@ -1005,6 +1062,68 @@ pub fn review(s: &PickerState) -> Option<ReviewView> {#[cfg(test)]mod tests {++ fn ev(step: u32, kind: &str, phase: RunPhase, detail: &str, done: u64, total: u64) -> RunEvent {+ RunEvent {+ step,+ steps: 2,+ kind: kind.into(),+ phase,+ detail: detail.into(),+ done_bytes: done,+ total_bytes: total,+ }+ }++ #[test]+ fn the_run_says_what_it_is_doing_step_by_step() {+ use RunPhase::*;+ const MB: u64 = 1024 * 1024;+ let reading = "Reading Chrome cookies (macOS will ask for Keychain access)\u{2026}";+ let mut events = vec![];+ assert_eq!(run_status(&events), None, "nothing yet");+ events.push(ev(0, "state", Started, "Preparing the sign-in", 0, 0));+ assert_eq!(+ run_status(&events).as_deref(),+ Some("Preparing the sign-in")+ );+ events.push(ev(0, "state", Progress, reading, 0, 0));+ assert_eq!(run_status(&events).as_deref(), Some(reading));+ events.push(ev(0, "state", Progress, "Packing profile", 0, 0));+ assert_eq!(run_status(&events).as_deref(), Some("Packing profile"));+ events.push(ev(0, "state", Progress, "Uploading", 12 * MB, 80 * MB));+ assert_eq!(run_status(&events).as_deref(), Some("Uploading 12 / 80 MB"));+ events.push(ev(0, "state", Progress, "Importing into the Space", 0, 0));+ assert_eq!(+ run_status(&events).as_deref(),+ Some("Importing into the Space")+ );+ // Between steps the finished step's words stay.+ events.push(ev(0, "state", Finished, "", 0, 0));+ assert_eq!(+ run_status(&events).as_deref(),+ Some("Importing into the Space")+ );+ // A file path reads as its step, with the bytes.+ events.push(ev(1, "files", Started, "Sending 2 items", 0, 0));+ events.push(ev(+ 1,+ "files",+ Progress,+ "/Users/me/a.txt",+ 512 * 1024,+ 2 * MB,+ ));+ assert_eq!(+ run_status(&events).as_deref(),+ Some("Sending 2 items 512 KB / 2.0 MB")+ );+ events.push(ev(2, "done", Done, "Chrome", 0, 0));+ assert_eq!(run_status(&events), None, "the done step says the rest");+ assert_eq!(format_bytes_pair(5 * MB, 80 * MB), "5.0 / 80 MB");+ assert_eq!(format_bytes_pair(90 * MB, 80 * MB), "80 / 80 MB");+ }+use super::*;#[test]diff --git a/libs/cua/crates/cua-spaces-app-core/tests/wire_drift.rs b/libs/cua/crates/cua-spaces-app-core/tests/wire_drift.rsindex 7536fd4325..082156184e 100644--- a/libs/cua/crates/cua-spaces-app-core/tests/wire_drift.rs+++ b/libs/cua/crates/cua-spaces-app-core/tests/wire_drift.rs@@ -136,6 +136,7 @@ fn items_callers_grants_rules_deliveries_status() {items: 1,pending: 0,unlock_policy: None,+ auto_wipe: Some(true),os_protector_available: false,passphrase_available: true,unlock_protectors: vec![@@ -145,6 +146,7 @@ fn items_callers_grants_rules_deliveries_status() {};let kv: KvStatus = round(&st);assert_eq!(kv.unlock_protectors, ["passphrase", "recovery"]);+ assert_eq!(kv.auto_wipe, Some(true));let ev = AuditEvent {kind: "consent.allow".into(),actor: "Cua".into(),diff --git a/libs/cua/crates/cua-spaces-ext/src/daemon/keyvault.rs b/libs/cua/crates/cua-spaces-ext/src/daemon/keyvault.rsindex da47462506..93cf0ebf15 100644--- a/libs/cua/crates/cua-spaces-ext/src/daemon/keyvault.rs+++ b/libs/cua/crates/cua-spaces-ext/src/daemon/keyvault.rs@@ -30,7 +30,7 @@ use base64::Engine as _;use cua_keyvault::broker::{AccessRequest, Backend, Broker, BrokerConfig, Captured, CookieFilter, DeliveryOutcome,ImportSpec, Inventory, LoginFill, LoginFilled, PasswordImportSpec, Selector, TeleportRequest,- UserPresence,+ TeleportStage, UserPresence,};use cua_keyvault::caller::{CallerIdentity, Signing};use cua_keyvault::model::{@@ -522,8 +522,22 @@ impl Backend for DaemonBackend {provider_id: &str,payloads: Vec<ItemPayload>,expires_ms: u64,+ ) -> KvResult<DeliveryOutcome> {+ self.deliver_with_progress(target, provider_id, payloads, expires_ms, Arc::new(|_| {}))+ .await+ }++ /// Packs, uploads (with bytes) and imports, telling `stage` each step.+ async fn deliver_with_progress(+ &self,+ target: &str,+ provider_id: &str,+ payloads: Vec<ItemPayload>,+ expires_ms: u64,+ stage: cua_keyvault::broker::StageSink,) -> KvResult<DeliveryOutcome> {let space = self.open_target(target).await?;+ stage(TeleportStage::Packing);let spacesd = space.spacesd().map_err(|e| backend_err("spacesd channel", e))?;@@ -548,6 +562,17 @@ impl Backend for DaemonBackend {.map_err(|e| backend_err("finish bundle", e))?;let sha = hex::encode(Sha256::digest(&bytes));let import_id = format!("cua-kv-{:016x}", rand::random::<u64>());+ // `sent == total` once the last chunk (the import) is on its way.+ let progress: cua_teleport::Progress = {+ let stage = stage.clone();+ Arc::new(move |done, total| {+ stage(if total > 0 && done >= total {+ TeleportStage::Importing+ } else {+ TeleportStage::Uploading { done, total }+ })+ })+ };// The env token / Fleet bearer authenticate this channel and are never// exposed to the MCP caller; the guest wipes on its own at expiry.let result = cua_teleport::upload_bundle(@@ -562,6 +587,7 @@ impl Backend for DaemonBackend {expires_at_ms: expires_ms,// Every delivery through here was authorized by the broker.broker_grant: Some("keyvault".into()),+ progress: Some(progress),..Default::default()},)diff --git a/libs/cua/crates/cua-spaces-ext/src/teleport.rs b/libs/cua/crates/cua-spaces-ext/src/teleport.rsindex 36f6bf935f..d814cce320 100644--- a/libs/cua/crates/cua-spaces-ext/src/teleport.rs+++ b/libs/cua/crates/cua-spaces-ext/src/teleport.rs@@ -558,6 +558,17 @@ pub trait SpaceTeleport {approval: &Approval,options: ImportOptions,) -> Result<TeleportReceipt>;++ /// [`Self::teleport`], telling `stage` where the Keyvault is: reading+ /// (when macOS asks for the Keychain), saving, packing, uploading and+ /// importing.+ async fn teleport_with_progress(+ &self,+ sessions: Arc<AppSessions>,+ approval: &Approval,+ options: ImportOptions,+ stage: &mut (dyn FnMut(cua_keyvault::broker::TeleportStage) + Send),+ ) -> Result<TeleportReceipt>;}impl SpaceTeleport for Space {@@ -604,6 +615,16 @@ impl SpaceTeleport for Space {/// signed as first party): a plain teleport never falls back to/// exporting and uploading a bundle on its own.async fn teleport(+ &self,+ sessions: Arc<AppSessions>,+ approval: &Approval,+ options: ImportOptions,+ ) -> Result<TeleportReceipt> {+ self.teleport_with_progress(sessions, approval, options, &mut |_| {})+ .await+ }++ async fn teleport_with_progress(&self,sessions: Arc<AppSessions>,approval: &Approval,@@ -624,6 +645,7 @@ impl SpaceTeleport for Space {// three are tracked as follow-up work, not specific to this path.// `save_to_keyvault` is honored below.options: ImportOptions,+ stage: &mut (dyn FnMut(cua_keyvault::broker::TeleportStage) + Send),) -> Result<TeleportReceipt> {if approval.space != self.id().to_string() {return Err(Error::TeleportRefused(format!(@@ -667,7 +689,12 @@ impl SpaceTeleport for Space {),})?;let outcome = client- .import_and_teleport(spec, self.id().to_string(), options.save_to_keyvault)+ .import_and_teleport_with_progress(+ spec,+ self.id().to_string(),+ options.save_to_keyvault,+ stage,+ ).await.map_err(|e| Error::TeleportRefused(format!("{}: {e}", approval.app)))?;let delivery = outcome.deliveries.first();@@ -896,7 +923,11 @@ async fn teleport_app_broker("transferred_paths": imported,"import_ids": import_ids,"expires_ms": expires_ms,- "next": "The Space now has this app's session. Delete the Space when done; the delivered session is also wiped when the grant expires.",+ "next": if expires_ms == 0 {+ "The Space now has this app's session. It stays until you wipe it in Cua's Keyvault or delete the Space."+ } else {+ "The Space now has this app's session. Delete the Space when done; the delivered session is also wiped when it expires."+ },}))),Err(e) => Ok(broker_error(e)),},diff --git a/libs/cua/crates/cua-spaces-ext/src/teleport_app.rs b/libs/cua/crates/cua-spaces-ext/src/teleport_app.rsindex 0a3b205081..f8dd5a16fd 100644--- a/libs/cua/crates/cua-spaces-ext/src/teleport_app.rs+++ b/libs/cua/crates/cua-spaces-ext/src/teleport_app.rs@@ -17,6 +17,7 @@use std::sync::Arc;use std::time::Duration;+use cua_keyvault::broker::TeleportStage;use cua_spacesd_client::{Command, pb};pub use cua_teleport::ux::{ApprovedPlan, CatalogEntry, Consent, PlanOptions, PlanStep, RunEvent, RunPhase, RunReport,@@ -308,8 +309,10 @@ impl SpaceAppTeleport for Space {// The plan's consent already listed and acknowledged these// exact items.let approval = manifest.approving(&self.id().to_string(), items, plan.sensitive)?;+ let cookies = items.iter().any(|i| i.to_lowercase().contains("cookies"));+ let app = plan.app.name.clone();let receipt = self- .teleport(+ .teleport_with_progress(sessions.clone(),&approval,ImportOptions {@@ -322,14 +325,20 @@ impl SpaceAppTeleport for Space {// user's acknowledgement (S1).relay_plaintext_ack: plan.relay_unsealed,},+ &mut |st| {+ let (done, total) = match &st {+ TeleportStage::Uploading { done, total } => (*done, *total),+ _ => (0, 0),+ };+ progress(+ RunPhase::Progress,+ stage_text(&st, &app, cookies, cfg!(target_os = "macos")),+ done,+ total,+ );+ },).await?;- progress(- RunPhase::Progress,- format!("{} bytes verified", receipt.bundle_bytes),- receipt.bundle_bytes,- receipt.bundle_bytes,- );report.imported = receipt.imported;report.skipped = receipt.skipped;report.launched |= receipt.launched;@@ -546,16 +555,43 @@ impl SpaceAppTeleportFacts for Space {}}+/// A step as it starts, in words the app shows under its progress bar.fn describe(step: &PlanStep) -> String {match step {- PlanStep::Install { ids } => format!("installing {}", ids.join(", ")),- PlanStep::SendFiles { paths, .. } => format!("sending {} item(s)", paths.len()),- PlanStep::ImportState {- provider_id, items, ..- } => {- format!("importing {} {provider_id} item(s)", items.len())+ PlanStep::Install { ids } => format!("Installing {}", ids.join(", ")),+ PlanStep::SendFiles { paths, .. } => match paths.len() {+ 1 => "Sending 1 item".into(),+ n => format!("Sending {n} items"),+ },+ PlanStep::ImportState { .. } => "Preparing the sign-in".into(),+ PlanStep::Launch { bin, .. } => format!(+ "Opening {}",+ std::path::Path::new(bin)+ .file_name()+ .and_then(|n| n.to_str())+ .unwrap_or(bin)+ ),+ }+}++/// The Keyvault's stage of a signed-in state move, in words. Reading says+/// why macOS is about to ask for the Keychain (the app's cookies are+/// encrypted with a key kept there). Uploading leaves the bytes to the+/// event (the app appends "12 / 80 MB").+fn stage_text(stage: &TeleportStage, app: &str, cookies: bool, macos: bool) -> String {+ match stage {+ TeleportStage::Reading => {+ let what = if cookies { "cookies" } else { "sign-in" };+ if macos && cookies {+ format!("Reading {app} {what} (macOS will ask for Keychain access)\u{2026}")+ } else {+ format!("Reading {app} {what}\u{2026}")+ }}- PlanStep::Launch { bin, .. } => format!("starting {bin}"),+ TeleportStage::Saving => "Saving to Keyvault".into(),+ TeleportStage::Packing => "Packing profile".into(),+ TeleportStage::Uploading { .. } => "Uploading".into(),+ TeleportStage::Importing => "Importing into the Space".into(),}}@@ -596,6 +632,42 @@ impl AppSessions {#[cfg(test)]mod tests {+ #[test]+ fn stages_read_as_steps_and_name_the_keychain_prompt() {+ use cua_keyvault::broker::TeleportStage as S;+ assert_eq!(+ super::stage_text(&S::Reading, "Chrome", true, true),+ "Reading Chrome cookies (macOS will ask for Keychain access)\u{2026}"+ );+ assert_eq!(+ super::stage_text(&S::Reading, "Chrome", true, false),+ "Reading Chrome cookies\u{2026}"+ );+ assert_eq!(+ super::stage_text(&S::Reading, "Slack", false, true),+ "Reading Slack sign-in\u{2026}"+ );+ assert_eq!(+ super::stage_text(&S::Packing, "Chrome", true, true),+ "Packing profile"+ );+ assert_eq!(+ super::stage_text(&S::Uploading { done: 1, total: 2 }, "Chrome", true, true),+ "Uploading"+ );+ assert_eq!(+ super::stage_text(&S::Importing, "Chrome", true, true),+ "Importing into the Space"+ );+ assert_eq!(+ super::stage_text(&S::Saving, "Chrome", true, true),+ "Saving to Keyvault"+ );+ for st in [S::Reading, S::Saving, S::Packing, S::Importing] {+ assert!(!super::stage_text(&st, "Chrome", true, true).contains('\u{2014}'));+ }+ }+use super::*;#[test]diff --git a/libs/cua/crates/cua-spaces-ext/tests/keyvault_delivery.rs b/libs/cua/crates/cua-spaces-ext/tests/keyvault_delivery.rsindex b7dd80a216..beabd838e5 100644--- a/libs/cua/crates/cua-spaces-ext/tests/keyvault_delivery.rs+++ b/libs/cua/crates/cua-spaces-ext/tests/keyvault_delivery.rs@@ -225,7 +225,8 @@ async fn broker_delivers_a_granted_capability_and_wipes_on_release() {.await.expect("a granted capability delivers");assert_eq!(outcome.deliveries.len(), 1);- assert!(outcome.expires_ms > 0, "the delivery carries a TTL");+ // Auto-wipe is off by default: the copy stays until it is wiped.+ assert_eq!(outcome.expires_ms, 0, "no expiry by default");let imports = r.mock.state.teleport_imports();assert_eq!(imports.len(), 1, "the target received exactly one import");@@ -234,9 +235,9 @@ async fn broker_delivers_a_granted_capability_and_wipes_on_release() {carries(&import.bundle, SECRET),"the session reached the target");- assert!(- import.options.expires_at_ms > 0,- "the receiver got the TTL so it wipes on its own"+ assert_eq!(+ import.options.expires_at_ms, 0,+ "the receiver got no expiry, so only a wipe removes it");// The capability token never travels with the delivery (not in argv-like// fields, not in the bundle): the broker delivers over its own channel.@@ -326,3 +327,57 @@ async fn a_tripped_kill_switch_denies_delivery() {"nothing was delivered while disabled");}++/// A direct teleport through the daemon's backend reports where it is:+/// reading (the Keychain moment on macOS), packing, the upload's bytes and+/// the import, in that order; with auto-wipe off the copy has no expiry.+#[tokio::test]+async fn a_direct_teleport_reports_its_stages_through_the_daemon_backend() {+ use cua_keyvault::broker::{ImportSpec, TeleportStage};+ let r = rig().await;+ let seen = Arc::new(std::sync::Mutex::new(Vec::new()));+ let sink = {+ let seen = seen.clone();+ Arc::new(move |s: TeleportStage| seen.lock().unwrap().push(s))+ };+ let outcome = r+ .broker+ .import_and_teleport_with_progress(+ &r.cua,+ ImportSpec {+ app: "chrome".into(),+ whole_app: true,+ ..Default::default()+ },+ r.target.clone(),+ false,+ Some(sink),+ )+ .await+ .expect("a first-party direct teleport delivers");+ assert_eq!(outcome.expires_ms, 0, "auto-wipe is off by default");+ let seen = seen.lock().unwrap().clone();+ assert_eq!(seen.first(), Some(&TeleportStage::Reading), "{seen:?}");+ let packing = seen+ .iter()+ .position(|s| *s == TeleportStage::Packing)+ .expect("packs");+ let importing = seen+ .iter()+ .position(|s| *s == TeleportStage::Importing)+ .expect("imports");+ assert!(packing < importing, "{seen:?}");+ assert!(+ seen[packing..importing]+ .iter()+ .any(|s| matches!(s, TeleportStage::Uploading { total, .. } if *total > 0)),+ "the upload reports its bytes: {seen:?}"+ );+ assert!(+ !seen.contains(&TeleportStage::Saving),+ "save: false saves nothing"+ );+ let imports = r.mock.state.teleport_imports();+ assert_eq!(imports.len(), 1);+ assert_eq!(imports[0].options.expires_at_ms, 0);+}diff --git a/libs/cua/crates/cua-spaces-ffi/src/app_core.rs b/libs/cua/crates/cua-spaces-ffi/src/app_core.rsindex 75bf155381..0e0cf33c6c 100644--- a/libs/cua/crates/cua-spaces-ffi/src/app_core.rs+++ b/libs/cua/crates/cua-spaces-ffi/src/app_core.rs@@ -1052,6 +1052,36 @@ pub fn app_picker_progress(state: AppPickerState) -> f64 {core::teleport::flow::progress(&state)}+/// What the run is doing, in words ("Packing profile", "Uploading 12 /+/// 80 MB"), for the line under the progress bar; none unless running.+#[uniffi::export]+pub fn app_picker_status(state: AppPickerState) -> Option<String> {+ core::teleport::flow::status(&state)+}++/// [`app_picker_status`] for a run's events as the SDK delivered them.+#[uniffi::export]+pub fn app_teleport_run_status(events: Vec<crate::TeleportRunEvent>) -> Option<String> {+ let events: Vec<_> = events.into_iter().map(app_teleport_run_event).collect();+ core::teleport::flow::run_status(&events)+}++/// An SDK run event as the picker's (`AppPickerEvent.progress`).+#[uniffi::export]+pub fn app_teleport_run_event(event: crate::TeleportRunEvent) -> AppTeleportRunEvent {+ use core::teleport::flow::RunPhase;+ AppTeleportRunEvent {+ step: event.step,+ steps: event.steps,+ kind: event.kind,+ phase: serde_json::from_value(serde_json::Value::String(event.phase))+ .unwrap_or(RunPhase::Progress),+ detail: event.detail,+ done_bytes: event.done_bytes,+ total_bytes: event.total_bytes,+ }+}+/// "12 MB".#[uniffi::export]pub fn app_format_bytes(bytes: u64) -> String {@@ -1312,6 +1342,50 @@ pub fn kv_sharing_label(overview: KeyvaultOverview, now_ms: i64) -> Option<Strincore::keyvault::view::sharing_label(&overview, now_ms)}+/// [`kv_sharing_label`] without the copies the user dismissed (import ids):+/// the notch indicator.+#[uniffi::export]+pub fn kv_visible_sharing_label(+ overview: KeyvaultOverview,+ now_ms: i64,+ dismissed: Vec<String>,+) -> Option<String> {+ core::keyvault::view::visible_sharing_label(&overview, now_ms, &dismissed)+}++/// The ids of `spaces` signed in through the Keyvault (a live copy is in+/// them), less the `dismissed` copies: "Signed in" in the Spaces list+/// (nothing dismissed), the key on notch tiles.+#[uniffi::export]+pub fn kv_signed_in_spaces(+ overview: KeyvaultOverview,+ now_ms: i64,+ dismissed: Vec<String>,+ spaces: Vec<AppSpace>,+) -> Vec<String> {+ core::keyvault::view::signed_in_spaces(&overview, now_ms, &dismissed, &spaces)+}++/// The dismissed copies still live.+#[uniffi::export]+pub fn kv_prune_dismissed(+ overview: KeyvaultOverview,+ now_ms: i64,+ dismissed: Vec<String>,+) -> Vec<String> {+ core::keyvault::view::prune_dismissed(&overview, now_ms, &dismissed)+}++/// The Access row of `space`'s copies, to focus from its "Signed in" badge.+#[uniffi::export]+pub fn kv_space_access_key(+ overview: KeyvaultOverview,+ now_ms: i64,+ space: AppSpace,+) -> Option<String> {+ core::keyvault::view::space_access_key(&overview, now_ms, &space)+}+/// The Passwords-style sidebar.#[uniffi::export]pub fn kv_sidebar(overview: KeyvaultOverview, now_ms: i64) -> KvSidebar {diff --git a/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs b/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rsindex c849b5d001..c63b0bc5d1 100644--- a/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs+++ b/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs@@ -1352,6 +1352,9 @@ pub struct AppNotchMotion {pub hover_damping: f64,/// Horizontal scale of the closed notch (and its tab) under the pointer.pub hover_scale: f64,+ /// Vertical scale of the closed notch under the pointer (a few points+ /// taller, anchored at the top).+ pub hover_scale_y: f64,/// The content starts fading in this long after the shape starts/// opening (ms).pub content_delay_ms: u32,@@ -1451,6 +1454,8 @@ pub struct AppNotchTile {/// While it is being created: the phase in words ("Starting…"), or/// "Failed"; while it is being deleted, "Deleting…".pub progress_label: Option<String>,+ /// Signed in through the Keyvault (and not dismissed): the key badge.+ pub signed_in: bool,}/// What the panel shows.@@ -1489,6 +1494,10 @@ pub struct AppNotchState {/// Keyvault sign-ins are live in a Space right now (the core's/// [`crate::keyvault::view::sharing_label`]), so access is never silent.pub keyvault: Option<String>,+ /// The Spaces signed in through the Keyvault, less the copies the user+ /// dismissed ([`crate::keyvault::view::signed_in_spaces`]): their tiles+ /// carry the key.+ pub signed_in: Vec<String>,/// "Spaces tab in the notch: Hide" (menu bar only): nothing shows in/// the notch, and hover, clicks and window drags do nothing.pub hidden: bool,@@ -1548,6 +1557,8 @@ pub enum AppNotchEvent {Keyvault {/// The sharing label, if any.label: Option<String>,+ /// The Space ids signed in (their tiles carry the key).+ signed_in: Vec<String>,},}@@ -1596,6 +1607,18 @@ pub struct AppNotchPermission {pub pane: String,}+/// The live-access line and its button. Dismiss hides the indicator and+/// the tiles' key; it revokes and wipes nothing (the Keyvault's Access page+/// does that).+pub type AppNotchAccess = core::notch::NotchAccess;+#[uniffi::remote(Record)]+pub struct AppNotchAccess {+ /// "Keyvault sign-ins live in dev-1" (opens the Access page).+ pub text: String,+ /// "Dismiss".+ pub dismiss: String,+}+/// A transfer in flight: bytes sent of the total, when known.pub type AppNotchTransfer = core::notch::NotchTransfer;#[uniffi::remote(Record)]@@ -1731,6 +1754,9 @@ pub struct AppNotchView {pub hover_cue: bool,/// One line in the open panel when window drags cannot be detected.pub permission: Option<AppNotchPermission>,+ /// One line in the open panel while Keyvault sign-ins are live in a+ /// Space (and not dismissed): what is live, and Dismiss.+ pub access: Option<AppNotchAccess>,}/// Active or failed.@@ -3652,7 +3678,7 @@ pub struct KvDelivery {pub caller_fp: String,/// Delivered.pub delivered_ms: u64,- /// Wiped at.+ /// Wiped at ([`KV_NO_EXPIRY`]: only when wiped).pub expires_ms: u64,/// Already wiped.pub wiped: bool,@@ -3706,6 +3732,9 @@ pub struct KvStatus {pub pending: u32,/// `auto` or `presence`.pub unlock_policy: Option<String>,+ /// Delivered copies wipe themselves after their TTL (off by default;+ /// none: not told, a broker before the setting or a third party).+ pub auto_wipe: Option<bool>,/// The daemon can create the OS key store protector (setup offers Touch/// ID); false for a development daemon, which is passphrase-only.pub os_protector_available: bool,@@ -3796,6 +3825,11 @@ pub enum KvCommand {/// Id.id: String,},+ /// Auto-wipe of delivered copies (turning it off asks for Touch ID).+ SetAutoWipe {+ /// On.+ on: bool,+ },/// Wipe a Space's copies.Release {/// Target.@@ -3983,6 +4017,9 @@ pub struct KvAccessRow {pub action_label: String,/// What the button sends.pub command: KvCommand,+ /// A Space's copies: their import ids, which Dismiss hides from the+ /// notch (empty for grants and rules).+ pub imports: Vec<String>,}/// The Keyvault's fixed words.@@ -5552,6 +5589,10 @@ pub struct AppSettings {/// Settings, Experiments: every switch off unless turned on/// ([`crate::experiments`]).pub experiments: AppExperiments,+ /// Keyvault copies (import ids) the user dismissed from the notch: it no+ /// longer shows them, nothing is revoked or wiped+ /// ([`crate::keyvault::view::prune_dismissed`] forgets the gone ones).+ pub dismissed_access: Vec<String>,}/// A pressed key combination.@@ -5633,6 +5674,9 @@ pub struct AppSettingsInput {pub login_item: Option<AppLoginItemInput>,/// Settings, Experiments (what the page mentions follows them).pub experiments: AppExperiments,+ /// The Keyvault's auto-wipe, once the broker told it (none: no+ /// Keyvault section).+ pub keyvault_auto_wipe: Option<bool>,}/// How a Settings row draws.diff --git a/libs/cua/crates/cua-teleport/src/send.rs b/libs/cua/crates/cua-teleport/src/send.rsindex 9e2fbaf6ad..1dd2f6c915 100644--- a/libs/cua/crates/cua-teleport/src/send.rs+++ b/libs/cua/crates/cua-teleport/src/send.rs@@ -203,7 +203,9 @@ pub struct SendOptions {/// session has a TTL on the target even if the host never calls/// `WipeImport` (design 5.9).pub expires_at_ms: u64,- /// Upload progress.+ /// Upload progress: bytes the Space has, of the total. It reports the+ /// total as the last chunk goes out, so `sent == total` means the Space+ /// is importing (the call returns once it has).pub progress: Option<Progress>,/// Marks a delivery the Keyvault broker authorized/// (`ImportOptions.broker_grant`); `None` for direct sends.@@ -673,6 +675,11 @@ pub async fn upload_bundle(for _ in 0..max_calls {let end = (offset + chunk).min(total);let commit = end == total;+ if commit {+ // The last chunk carries the import: everything is on its way,+ // and the Space imports while this call runs.+ progress(end);+ }let request = pb::ImportSessionRequest {import_id: import_id.to_string(),app: provider_id.to_string(),diff --git a/libs/cua/crates/cua-teleport/tests/send_mock.rs b/libs/cua/crates/cua-teleport/tests/send_mock.rsindex b4efe82a76..0ac819cbb6 100644--- a/libs/cua/crates/cua-teleport/tests/send_mock.rs+++ b/libs/cua/crates/cua-teleport/tests/send_mock.rs@@ -118,6 +118,10 @@ async fn uploads_in_offset_addressed_chunks_over_both_transports() {sent.last(),Some(&(outcome.bundle_bytes, outcome.bundle_bytes)));+ // The total is reported as the last chunk (the import) goes out,+ // then again once the Space has it.+ let n = outcome.bundle_bytes;+ assert_eq!(sent.iter().filter(|p| **p == (n, n)).count(), 2, "{sent:?}");}}diff --git a/libs/cua/scripts/generate-app-core-ffi.py b/libs/cua/scripts/generate-app-core-ffi.pyindex 5e48a31f26..2f108e8426 100644--- a/libs/cua/scripts/generate-app-core-ffi.py+++ b/libs/cua/scripts/generate-app-core-ffi.py@@ -28,7 +28,7 @@ TYPES = [("notch/geometry.rs", "notch::geometry", ["WindowMode", "LogicalRect"]),("teleport/drag.rs", "teleport::drag", ["DragOverlayPhase", "DragOverlayState", "DragOverlayEvent", "DragOverlayEffect", "DragOverlayTransition"]),("notch/drag_trigger.rs", "notch::drag_trigger", ["DragKind", "TriggerPhase", "DragDisplay", "StillAnchor", "DragTriggerState", "DragTriggerEvent", "DragTriggerTransition"]),- ("notch/mod.rs", "notch", ["NotchMotion", "NotchRadii", "ScreenFacts", "NotchLayout", "NotchTile", "NotchPhase", "NotchState", "NotchEvent", "NotchEffect", "NotchTransition", "NotchPermission", "NotchTransfer", "NotchTab", "NotchButtonId", "NotchButton", "NotchHeader", "NotchActivityKind", "NotchActivity", "NotchView"]),+ ("notch/mod.rs", "notch", ["NotchMotion", "NotchRadii", "ScreenFacts", "NotchLayout", "NotchTile", "NotchPhase", "NotchState", "NotchEvent", "NotchEffect", "NotchTransition", "NotchPermission", "NotchAccess", "NotchTransfer", "NotchTab", "NotchButtonId", "NotchButton", "NotchHeader", "NotchActivityKind", "NotchActivity", "NotchView"]),("teleport/transfer.rs", "teleport::transfer", ["TransferPhase", "TransferOverlayState", "TransferStatus", "TransferSignal", "SentFileInfo"]),("teleport/windows.rs", "teleport::windows", ["OpenWindow", "OpenApp", "RemoteWindow", "RemoteWindowGroup", "PickerTab", "PickerAction", "PickerPrimary"]),("teleport/grid.rs", "teleport::grid", ["PickerTileIcon", "PickerTileThumbnail", "PickerTile", "PickerTileSection", "PickerGrid", "PickerGridTab", "PickerGridTabItem", "PickerGridPrimary"]),diff --git a/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift b/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swiftindex c69f1e3dc6..ad532faa37 100644--- a/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift+++ b/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift@@ -17457,6 +17457,72 @@ public func FfiConverterTypeAppModeChoice_lower(_ value: AppModeChoice) -> RustB}+public struct AppNotchAccess: Equatable, Hashable {+ /**+ * "Keyvault sign-ins live in dev-1" (opens the Access page).+ */+ public var text: String+ /**+ * "Dismiss".+ */+ public var dismiss: String++ // Default memberwise initializers are never public by default, so we+ // declare one manually.+ public init(+ /**+ * "Keyvault sign-ins live in dev-1" (opens the Access page).+ */text: String,+ /**+ * "Dismiss".+ */dismiss: String) {+ self.text = text+ self.dismiss = dismiss+ }+++++}++#if compiler(>=6)+extension AppNotchAccess: Sendable {}+#endif++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeAppNotchAccess: FfiConverterRustBuffer {+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AppNotchAccess {+ return+ try AppNotchAccess(+ text: FfiConverterString.read(from: &buf),+ dismiss: FfiConverterString.read(from: &buf)+ )+ }++ public static func write(_ value: AppNotchAccess, into buf: inout [UInt8]) {+ FfiConverterString.write(value.text, into: &buf)+ FfiConverterString.write(value.dismiss, into: &buf)+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeAppNotchAccess_lift(_ buf: RustBuffer) throws -> AppNotchAccess {+ return try FfiConverterTypeAppNotchAccess.lift(buf)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeAppNotchAccess_lower(_ value: AppNotchAccess) -> RustBuffer {+ return FfiConverterTypeAppNotchAccess.lower(value)+}++public struct AppNotchActivity: Equatable, Hashable {/*** Which.@@ -17945,6 +18011,11 @@ public struct AppNotchMotion: Equatable, Hashable {* Horizontal scale of the closed notch (and its tab) under the pointer.*/public var hoverScale: Double+ /**+ * Vertical scale of the closed notch under the pointer (a few points+ * taller, anchored at the top).+ */+ public var hoverScaleY: Double/*** The content starts fading in this long after the shape starts* opening (ms).@@ -17997,6 +18068,10 @@ public struct AppNotchMotion: Equatable, Hashable {/*** Horizontal scale of the closed notch (and its tab) under the pointer.*/hoverScale: Double,+ /**+ * Vertical scale of the closed notch under the pointer (a few points+ * taller, anchored at the top).+ */hoverScaleY: Double,/*** The content starts fading in this long after the shape starts* opening (ms).@@ -18020,6 +18095,7 @@ public struct AppNotchMotion: Equatable, Hashable {self.hoverResponse = hoverResponseself.hoverDamping = hoverDampingself.hoverScale = hoverScale+ self.hoverScaleY = hoverScaleYself.contentDelayMs = contentDelayMsself.contentIn = contentInself.contentOut = contentOut@@ -18052,6 +18128,7 @@ public struct FfiConverterTypeAppNotchMotion: FfiConverterRustBuffer {hoverResponse: FfiConverterDouble.read(from: &buf),hoverDamping: FfiConverterDouble.read(from: &buf),hoverScale: FfiConverterDouble.read(from: &buf),+ hoverScaleY: FfiConverterDouble.read(from: &buf),contentDelayMs: FfiConverterUInt32.read(from: &buf),contentIn: FfiConverterDouble.read(from: &buf),contentOut: FfiConverterDouble.read(from: &buf),@@ -18070,6 +18147,7 @@ public struct FfiConverterTypeAppNotchMotion: FfiConverterRustBuffer {FfiConverterDouble.write(value.hoverResponse, into: &buf)FfiConverterDouble.write(value.hoverDamping, into: &buf)FfiConverterDouble.write(value.hoverScale, into: &buf)+ FfiConverterDouble.write(value.hoverScaleY, into: &buf)FfiConverterUInt32.write(value.contentDelayMs, into: &buf)FfiConverterDouble.write(value.contentIn, into: &buf)FfiConverterDouble.write(value.contentOut, into: &buf)@@ -18444,6 +18522,12 @@ public struct AppNotchState: Equatable, Hashable {* [`crate::keyvault::view::sharing_label`]), so access is never silent.*/public var keyvault: String?+ /**+ * The Spaces signed in through the Keyvault, less the copies the user+ * dismissed ([`crate::keyvault::view::signed_in_spaces`]): their tiles+ * carry the key.+ */+ public var signedIn: [String]/*** "Spaces tab in the notch: Hide" (menu bar only): nothing shows in* the notch, and hover, clicks and window drags do nothing.@@ -18482,6 +18566,11 @@ public struct AppNotchState: Equatable, Hashable {* Keyvault sign-ins are live in a Space right now (the core's* [`crate::keyvault::view::sharing_label`]), so access is never silent.*/keyvault: String?,+ /**+ * The Spaces signed in through the Keyvault, less the copies the user+ * dismissed ([`crate::keyvault::view::signed_in_spaces`]): their tiles+ * carry the key.+ */signedIn: [String],/*** "Spaces tab in the notch: Hide" (menu bar only): nothing shows in* the notch, and hover, clicks and window drags do nothing.@@ -18495,6 +18584,7 @@ public struct AppNotchState: Equatable, Hashable {self.hotspot = hotspotself.transfer = transferself.keyvault = keyvault+ self.signedIn = signedInself.hidden = hidden}@@ -18523,6 +18613,7 @@ public struct FfiConverterTypeAppNotchState: FfiConverterRustBuffer {hotspot: FfiConverterBool.read(from: &buf),transfer: FfiConverterOptionTypeAppNotchTransfer.read(from: &buf),keyvault: FfiConverterOptionString.read(from: &buf),+ signedIn: FfiConverterSequenceString.read(from: &buf),hidden: FfiConverterBool.read(from: &buf))}@@ -18537,6 +18628,7 @@ public struct FfiConverterTypeAppNotchState: FfiConverterRustBuffer {FfiConverterBool.write(value.hotspot, into: &buf)FfiConverterOptionTypeAppNotchTransfer.write(value.transfer, into: &buf)FfiConverterOptionString.write(value.keyvault, into: &buf)+ FfiConverterSequenceString.write(value.signedIn, into: &buf)FfiConverterBool.write(value.hidden, into: &buf)}}@@ -18672,6 +18764,10 @@ public struct AppNotchTile: Equatable, Hashable {* "Failed"; while it is being deleted, "Deleting…".*/public var progressLabel: String?+ /**+ * Signed in through the Keyvault (and not dismissed): the key badge.+ */+ public var signedIn: Bool// Default memberwise initializers are never public by default, so we// declare one manually.@@ -18712,7 +18808,10 @@ public struct AppNotchTile: Equatable, Hashable {/*** While it is being created: the phase in words ("Starting…"), or* "Failed"; while it is being deleted, "Deleting…".- */progressLabel: String?) {+ */progressLabel: String?,+ /**+ * Signed in through the Keyvault (and not dismissed): the key badge.+ */signedIn: Bool) {self.id = idself.name = nameself.os = os@@ -18724,6 +18823,7 @@ public struct AppNotchTile: Equatable, Hashable {self.label = labelself.progress = progressself.progressLabel = progressLabel+ self.signedIn = signedIn}@@ -18752,7 +18852,8 @@ public struct FfiConverterTypeAppNotchTile: FfiConverterRustBuffer {symbol: FfiConverterString.read(from: &buf),label: FfiConverterString.read(from: &buf),progress: FfiConverterOptionUInt32.read(from: &buf),- progressLabel: FfiConverterOptionString.read(from: &buf)+ progressLabel: FfiConverterOptionString.read(from: &buf),+ signedIn: FfiConverterBool.read(from: &buf))}@@ -18768,6 +18869,7 @@ public struct FfiConverterTypeAppNotchTile: FfiConverterRustBuffer {FfiConverterString.write(value.label, into: &buf)FfiConverterOptionUInt32.write(value.progress, into: &buf)FfiConverterOptionString.write(value.progressLabel, into: &buf)+ FfiConverterBool.write(value.signedIn, into: &buf)}}@@ -18978,6 +19080,11 @@ public struct AppNotchView: Equatable, Hashable {* One line in the open panel when window drags cannot be detected.*/public var permission: AppNotchPermission?+ /**+ * One line in the open panel while Keyvault sign-ins are live in a+ * Space (and not dismissed): what is live, and Dismiss.+ */+ public var access: AppNotchAccess?// Default memberwise initializers are never public by default, so we// declare one manually.@@ -19025,7 +19132,11 @@ public struct AppNotchView: Equatable, Hashable {*/hoverCue: Bool,/*** One line in the open panel when window drags cannot be detected.- */permission: AppNotchPermission?) {+ */permission: AppNotchPermission?,+ /**+ * One line in the open panel while Keyvault sign-ins are live in a+ * Space (and not dismissed): what is live, and Dismiss.+ */access: AppNotchAccess?) {self.phase = phaseself.tiles = tilesself.dropMode = dropMode@@ -19040,6 +19151,7 @@ public struct AppNotchView: Equatable, Hashable {self.showTab = showTabself.hoverCue = hoverCueself.permission = permission+ self.access = access}@@ -19071,7 +19183,8 @@ public struct FfiConverterTypeAppNotchView: FfiConverterRustBuffer {hidden: FfiConverterBool.read(from: &buf),showTab: FfiConverterBool.read(from: &buf),hoverCue: FfiConverterBool.read(from: &buf),- permission: FfiConverterOptionTypeAppNotchPermission.read(from: &buf)+ permission: FfiConverterOptionTypeAppNotchPermission.read(from: &buf),+ access: FfiConverterOptionTypeAppNotchAccess.read(from: &buf))}@@ -19090,6 +19203,7 @@ public struct FfiConverterTypeAppNotchView: FfiConverterRustBuffer {FfiConverterBool.write(value.showTab, into: &buf)FfiConverterBool.write(value.hoverCue, into: &buf)FfiConverterOptionTypeAppNotchPermission.write(value.permission, into: &buf)+ FfiConverterOptionTypeAppNotchAccess.write(value.access, into: &buf)}}@@ -24100,6 +24214,12 @@ public struct AppSettings: Equatable, Hashable {* ([`crate::experiments`]).*/public var experiments: AppExperiments+ /**+ * Keyvault copies (import ids) the user dismissed from the notch: it no+ * longer shows them, nothing is revoked or wiped+ * ([`crate::keyvault::view::prune_dismissed`] forgets the gone ones).+ */+ public var dismissedAccess: [String]// Default memberwise initializers are never public by default, so we// declare one manually.@@ -24137,7 +24257,12 @@ public struct AppSettings: Equatable, Hashable {/*** Settings, Experiments: every switch off unless turned on* ([`crate::experiments`]).- */experiments: AppExperiments) {+ */experiments: AppExperiments,+ /**+ * Keyvault copies (import ids) the user dismissed from the notch: it no+ * longer shows them, nothing is revoked or wiped+ * ([`crate::keyvault::view::prune_dismissed`] forgets the gone ones).+ */dismissedAccess: [String]) {self.hotkey = hotkeyself.menuBar = menuBarself.theme = theme@@ -24148,6 +24273,7 @@ public struct AppSettings: Equatable, Hashable {self.updateChannel = updateChannelself.launchAtLogin = launchAtLoginself.experiments = experiments+ self.dismissedAccess = dismissedAccess}@@ -24175,7 +24301,8 @@ public struct FfiConverterTypeAppSettings: FfiConverterRustBuffer {lastSeenVersion: FfiConverterOptionString.read(from: &buf),updateChannel: FfiConverterTypeAppUpdateChannel.read(from: &buf),launchAtLogin: FfiConverterOptionBool.read(from: &buf),- experiments: FfiConverterTypeAppExperiments.read(from: &buf)+ experiments: FfiConverterTypeAppExperiments.read(from: &buf),+ dismissedAccess: FfiConverterSequenceString.read(from: &buf))}@@ -24190,6 +24317,7 @@ public struct FfiConverterTypeAppSettings: FfiConverterRustBuffer {FfiConverterTypeAppUpdateChannel.write(value.updateChannel, into: &buf)FfiConverterOptionBool.write(value.launchAtLogin, into: &buf)FfiConverterTypeAppExperiments.write(value.experiments, into: &buf)+ FfiConverterSequenceString.write(value.dismissedAccess, into: &buf)}}@@ -24267,6 +24395,11 @@ public struct AppSettingsInput: Equatable, Hashable {* Settings, Experiments (what the page mentions follows them).*/public var experiments: AppExperiments+ /**+ * The Keyvault's auto-wipe, once the broker told it (none: no+ * Keyvault section).+ */+ public var keyvaultAutoWipe: Bool?// Default memberwise initializers are never public by default, so we// declare one manually.@@ -24313,7 +24446,11 @@ public struct AppSettingsInput: Equatable, Hashable {*/loginItem: AppLoginItemInput?,/*** Settings, Experiments (what the page mentions follows them).- */experiments: AppExperiments) {+ */experiments: AppExperiments,+ /**+ * The Keyvault's auto-wipe, once the broker told it (none: no+ * Keyvault section).+ */keyvaultAutoWipe: Bool?) {self.identity = identityself.apiKeyClient = apiKeyClientself.signIn = signIn@@ -24328,6 +24465,7 @@ public struct AppSettingsInput: Equatable, Hashable {self.billing = billingself.loginItem = loginItemself.experiments = experiments+ self.keyvaultAutoWipe = keyvaultAutoWipe}@@ -24359,7 +24497,8 @@ public struct FfiConverterTypeAppSettingsInput: FfiConverterRustBuffer {agentsPending: FfiConverterSequenceString.read(from: &buf),billing: FfiConverterOptionTypeAppBillingStatus.read(from: &buf),loginItem: FfiConverterOptionTypeAppLoginItemInput.read(from: &buf),- experiments: FfiConverterTypeAppExperiments.read(from: &buf)+ experiments: FfiConverterTypeAppExperiments.read(from: &buf),+ keyvaultAutoWipe: FfiConverterOptionBool.read(from: &buf))}@@ -24378,6 +24517,7 @@ public struct FfiConverterTypeAppSettingsInput: FfiConverterRustBuffer {FfiConverterOptionTypeAppBillingStatus.write(value.billing, into: &buf)FfiConverterOptionTypeAppLoginItemInput.write(value.loginItem, into: &buf)FfiConverterTypeAppExperiments.write(value.experiments, into: &buf)+ FfiConverterOptionBool.write(value.keyvaultAutoWipe, into: &buf)}}@@ -31205,6 +31345,11 @@ public struct KvAccessRow: Equatable, Hashable {* What the button sends.*/public var command: KvCommand+ /**+ * A Space's copies: their import ids, which Dismiss hides from the+ * notch (empty for grants and rules).+ */+ public var imports: [String]// Default memberwise initializers are never public by default, so we// declare one manually.@@ -31226,13 +31371,18 @@ public struct KvAccessRow: Equatable, Hashable {*/actionLabel: String,/*** What the button sends.- */command: KvCommand) {+ */command: KvCommand,+ /**+ * A Space's copies: their import ids, which Dismiss hides from the+ * notch (empty for grants and rules).+ */imports: [String]) {self.kind = kindself.key = keyself.text = textself.detail = detailself.actionLabel = actionLabelself.command = command+ self.imports = imports}@@ -31256,7 +31406,8 @@ public struct FfiConverterTypeKvAccessRow: FfiConverterRustBuffer {text: FfiConverterString.read(from: &buf),detail: FfiConverterString.read(from: &buf),actionLabel: FfiConverterString.read(from: &buf),- command: FfiConverterTypeKvCommand.read(from: &buf)+ command: FfiConverterTypeKvCommand.read(from: &buf),+ imports: FfiConverterSequenceString.read(from: &buf))}@@ -31267,6 +31418,7 @@ public struct FfiConverterTypeKvAccessRow: FfiConverterRustBuffer {FfiConverterString.write(value.detail, into: &buf)FfiConverterString.write(value.actionLabel, into: &buf)FfiConverterTypeKvCommand.write(value.command, into: &buf)+ FfiConverterSequenceString.write(value.imports, into: &buf)}}@@ -32362,7 +32514,7 @@ public struct KvDelivery: Equatable, Hashable {*/public var deliveredMs: UInt64/**- * Wiped at.+ * Wiped at ([`KV_NO_EXPIRY`]: only when wiped).*/public var expiresMs: UInt64/**@@ -32392,7 +32544,7 @@ public struct KvDelivery: Equatable, Hashable {* Delivered.*/deliveredMs: UInt64,/**- * Wiped at.+ * Wiped at ([`KV_NO_EXPIRY`]: only when wiped).*/expiresMs: UInt64,/*** Already wiped.@@ -34643,6 +34795,11 @@ public struct KvStatus: Equatable, Hashable {* `auto` or `presence`.*/public var unlockPolicy: String?+ /**+ * Delivered copies wipe themselves after their TTL (off by default;+ * none: not told, a broker before the setting or a third party).+ */+ public var autoWipe: Bool?/*** The daemon can create the OS key store protector (setup offers Touch* ID); false for a development daemon, which is passphrase-only.@@ -34688,6 +34845,10 @@ public struct KvStatus: Equatable, Hashable {/*** `auto` or `presence`.*/unlockPolicy: String?,+ /**+ * Delivered copies wipe themselves after their TTL (off by default;+ * none: not told, a broker before the setting or a third party).+ */autoWipe: Bool?,/*** The daemon can create the OS key store protector (setup offers Touch* ID); false for a development daemon, which is passphrase-only.@@ -34708,6 +34869,7 @@ public struct KvStatus: Equatable, Hashable {self.items = itemsself.pending = pendingself.unlockPolicy = unlockPolicy+ self.autoWipe = autoWipeself.osProtectorAvailable = osProtectorAvailableself.passphraseAvailable = passphraseAvailableself.unlockProtectors = unlockProtectors@@ -34738,6 +34900,7 @@ public struct FfiConverterTypeKvStatus: FfiConverterRustBuffer {items: FfiConverterUInt32.read(from: &buf),pending: FfiConverterUInt32.read(from: &buf),unlockPolicy: FfiConverterOptionString.read(from: &buf),+ autoWipe: FfiConverterOptionBool.read(from: &buf),osProtectorAvailable: FfiConverterBool.read(from: &buf),passphraseAvailable: FfiConverterBool.read(from: &buf),unlockProtectors: FfiConverterSequenceString.read(from: &buf)@@ -34754,6 +34917,7 @@ public struct FfiConverterTypeKvStatus: FfiConverterRustBuffer {FfiConverterUInt32.write(value.items, into: &buf)FfiConverterUInt32.write(value.pending, into: &buf)FfiConverterOptionString.write(value.unlockPolicy, into: &buf)+ FfiConverterOptionBool.write(value.autoWipe, into: &buf)FfiConverterBool.write(value.osProtectorAvailable, into: &buf)FfiConverterBool.write(value.passphraseAvailable, into: &buf)FfiConverterSequenceString.write(value.unlockProtectors, into: &buf)@@ -41498,7 +41662,10 @@ public enum AppNotchEvent: Equatable, Hashable {case keyvault(/*** The sharing label, if any.- */label: String?+ */label: String?,+ /**+ * The Space ids signed in (their tiles carry the key).+ */signedIn: [String])@@ -41553,7 +41720,7 @@ public struct FfiConverterTypeAppNotchEvent: FfiConverterRustBuffer {case 13: return .activity(hotspot: try FfiConverterBool.read(from: &buf), transfer: try FfiConverterOptionTypeAppNotchTransfer.read(from: &buf))- case 14: return .keyvault(label: try FfiConverterOptionString.read(from: &buf)+ case 14: return .keyvault(label: try FfiConverterOptionString.read(from: &buf), signedIn: try FfiConverterSequenceString.read(from: &buf))default: throw UniffiInternalError.unexpectedEnumCase@@ -41623,9 +41790,10 @@ public struct FfiConverterTypeAppNotchEvent: FfiConverterRustBuffer {FfiConverterOptionTypeAppNotchTransfer.write(transfer, into: &buf)- case let .keyvault(label):+ case let .keyvault(label,signedIn):writeInt(&buf, Int32(14))FfiConverterOptionString.write(label, into: &buf)+ FfiConverterSequenceString.write(signedIn, into: &buf)}}@@ -47874,6 +48042,14 @@ public enum KvCommand: Equatable, Hashable {* Id.*/id: String)+ /**+ * Auto-wipe of delivered copies (turning it off asks for Touch ID).+ */+ case setAutoWipe(+ /**+ * On.+ */on: Bool+ )/*** Wipe a Space's copies.*/@@ -47940,13 +48116,16 @@ public struct FfiConverterTypeKvCommand: FfiConverterRustBuffer {case 6: return .removeRule(id: try FfiConverterString.read(from: &buf))- case 7: return .release(target: try FfiConverterString.read(from: &buf)+ case 7: return .setAutoWipe(on: try FfiConverterBool.read(from: &buf))- case 8: return .approve(requestId: try FfiConverterString.read(from: &buf), items: try FfiConverterOptionSequenceString.read(from: &buf)+ case 8: return .release(target: try FfiConverterString.read(from: &buf))- case 9: return .deny(requestId: try FfiConverterString.read(from: &buf)+ case 9: return .approve(requestId: try FfiConverterString.read(from: &buf), items: try FfiConverterOptionSequenceString.read(from: &buf)+ )++ case 10: return .deny(requestId: try FfiConverterString.read(from: &buf))default: throw UniffiInternalError.unexpectedEnumCase@@ -47986,19 +48165,24 @@ public struct FfiConverterTypeKvCommand: FfiConverterRustBuffer {FfiConverterString.write(id, into: &buf)- case let .release(target):+ case let .setAutoWipe(on):writeInt(&buf, Int32(7))+ FfiConverterBool.write(on, into: &buf)+++ case let .release(target):+ writeInt(&buf, Int32(8))FfiConverterString.write(target, into: &buf)case let .approve(requestId,items):- writeInt(&buf, Int32(8))+ writeInt(&buf, Int32(9))FfiConverterString.write(requestId, into: &buf)FfiConverterOptionSequenceString.write(items, into: &buf)case let .deny(requestId):- writeInt(&buf, Int32(9))+ writeInt(&buf, Int32(10))FfiConverterString.write(requestId, into: &buf)}@@ -50619,6 +50803,30 @@ fileprivate struct FfiConverterOptionTypeAppMenuPreview: FfiConverterRustBuffer}}+#if swift(>=5.8)+@_documentation(visibility: private)+#endif+fileprivate struct FfiConverterOptionTypeAppNotchAccess: FfiConverterRustBuffer {+ typealias SwiftType = AppNotchAccess?++ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {+ guard let value = value else {+ writeInt(&buf, Int8(0))+ return+ }+ writeInt(&buf, Int8(1))+ FfiConverterTypeAppNotchAccess.write(value, into: &buf)+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {+ switch try readInt(&buf) as Int8 {+ case 0: return nil+ case 1: return try FfiConverterTypeAppNotchAccess.read(from: &buf)+ default: throw UniffiInternalError.unexpectedOptionalTag+ }+ }+}+#if swift(>=5.8)@_documentation(visibility: private)#endif@@ -55260,6 +55468,31 @@ fileprivate struct FfiConverterSequenceTypeTeleportProvider: FfiConverterRustBuf}}+#if swift(>=5.8)+@_documentation(visibility: private)+#endif+fileprivate struct FfiConverterSequenceTypeTeleportRunEvent: FfiConverterRustBuffer {+ typealias SwiftType = [TeleportRunEvent]++ public static func write(_ value: [TeleportRunEvent], into buf: inout [UInt8]) {+ let len = Int32(value.count)+ writeInt(&buf, len)+ for item in value {+ FfiConverterTypeTeleportRunEvent.write(item, into: &buf)+ }+ }++ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [TeleportRunEvent] {+ let len: Int32 = try readInt(&buf)+ var seq = [TeleportRunEvent]()+ seq.reserveCapacity(Int(len))+ for _ in 0 ..< len {+ seq.append(try FfiConverterTypeTeleportRunEvent.read(from: &buf))+ }+ return seq+ }+}+#if swift(>=5.8)@_documentation(visibility: private)#endif@@ -57138,6 +57371,17 @@ public func appPickerSensitiveOptions(state: AppPickerState) -> [AppSensitiveOpt)})}+/**+ * What the run is doing, in words ("Packing profile", "Uploading 12 /+ * 80 MB"), for the line under the progress bar; none unless running.+ */+public func appPickerStatus(state: AppPickerState) -> String? {+ return try! FfiConverterOptionString.lift(try! rustCall() {+ uniffi_cua_spaces_ffi_fn_func_app_picker_status(+ FfiConverterTypeAppPickerState_lower(state),$0+ )+})+}/*** The picker's Open windows tab.*/@@ -57845,6 +58089,26 @@ public func appTeleportPlanFromJson(json: String)throws -> AppTeleportPlan {)})}+/**+ * An SDK run event as the picker's (`AppPickerEvent.progress`).+ */+public func appTeleportRunEvent(event: TeleportRunEvent) -> AppTeleportRunEvent {+ return try! FfiConverterTypeAppTeleportRunEvent_lift(try! rustCall() {+ uniffi_cua_spaces_ffi_fn_func_app_teleport_run_event(+ FfiConverterTypeTeleportRunEvent_lower(event),$0+ )+})+}+/**+ * [`app_picker_status`] for a run's events as the SDK delivered them.+ */+public func appTeleportRunStatus(events: [TeleportRunEvent]) -> String? {+ return try! FfiConverterOptionString.lift(try! rustCall() {+ uniffi_cua_spaces_ffi_fn_func_app_teleport_run_status(+ FfiConverterSequenceTypeTeleportRunEvent.lower(events),$0+ )+})+}/*** The "This machine" roster entry.*/@@ -58144,6 +58408,18 @@ public func kvPassphraseCheck(mode: KvFormMode, passphrase: String, confirm: Str)})}+/**+ * The dismissed copies still live.+ */+public func kvPruneDismissed(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String]) -> [String] {+ return try! FfiConverterSequenceString.lift(try! rustCall() {+ uniffi_cua_spaces_ffi_fn_func_kv_prune_dismissed(+ FfiConverterTypeKeyvaultOverview_lower(overview),+ FfiConverterInt64.lower(nowMs),+ FfiConverterSequenceString.lower(dismissed),$0+ )+})+}/*** The banner after setup: the recovery key, shown once.*/@@ -58177,6 +58453,21 @@ public func kvSidebar(overview: KeyvaultOverview, nowMs: Int64) -> KvSidebar {)})}+/**+ * The ids of `spaces` signed in through the Keyvault (a live copy is in+ * them), less the `dismissed` copies: "Signed in" in the Spaces list+ * (nothing dismissed), the key on notch tiles.+ */+public func kvSignedInSpaces(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String], spaces: [AppSpace]) -> [String] {+ return try! FfiConverterSequenceString.lift(try! rustCall() {+ uniffi_cua_spaces_ffi_fn_func_kv_signed_in_spaces(+ FfiConverterTypeKeyvaultOverview_lower(overview),+ FfiConverterInt64.lower(nowMs),+ FfiConverterSequenceString.lower(dismissed),+ FfiConverterSequenceTypeAppSpace.lower(spaces),$0+ )+})+}/*** One site's detail.*/@@ -58200,6 +58491,31 @@ public func kvSiteToggle(group: KvSiteGroup, on: Bool) -> KvCommand {)})}+/**+ * The Access row of `space`'s copies, to focus from its "Signed in" badge.+ */+public func kvSpaceAccessKey(overview: KeyvaultOverview, nowMs: Int64, space: AppSpace) -> String? {+ return try! FfiConverterOptionString.lift(try! rustCall() {+ uniffi_cua_spaces_ffi_fn_func_kv_space_access_key(+ FfiConverterTypeKeyvaultOverview_lower(overview),+ FfiConverterInt64.lower(nowMs),+ FfiConverterTypeAppSpace_lower(space),$0+ )+})+}+/**+ * [`kv_sharing_label`] without the copies the user dismissed (import ids):+ * the notch indicator.+ */+public func kvVisibleSharingLabel(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String]) -> String? {+ return try! FfiConverterOptionString.lift(try! rustCall() {+ uniffi_cua_spaces_ffi_fn_func_kv_visible_sharing_label(+ FfiConverterTypeKeyvaultOverview_lower(overview),+ FfiConverterInt64.lower(nowMs),+ FfiConverterSequenceString.lower(dismissed),$0+ )+})+}/*** Opens a media session on `client` and delivers *decoded* video (packed* BGRA) and control events to `frames`. Lost references trigger a keyframe@@ -58699,6 +59015,9 @@ private let initializationResult: InitializationResult = {if (uniffi_cua_spaces_ffi_checksum_func_app_picker_sensitive_options() != 65097) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cua_spaces_ffi_checksum_func_app_picker_status() != 28472) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cua_spaces_ffi_checksum_func_app_picker_window_grid() != 8477) {return InitializationResult.apiChecksumMismatch}@@ -58894,6 +59213,12 @@ private let initializationResult: InitializationResult = {if (uniffi_cua_spaces_ffi_checksum_func_app_teleport_plan_from_json() != 33817) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cua_spaces_ffi_checksum_func_app_teleport_run_event() != 7876) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cua_spaces_ffi_checksum_func_app_teleport_run_status() != 21027) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cua_spaces_ffi_checksum_func_app_this_machine_space() != 14017) {return InitializationResult.apiChecksumMismatch}@@ -58978,6 +59303,9 @@ private let initializationResult: InitializationResult = {if (uniffi_cua_spaces_ffi_checksum_func_kv_passphrase_check() != 38965) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cua_spaces_ffi_checksum_func_kv_prune_dismissed() != 61054) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cua_spaces_ffi_checksum_func_kv_recovery_key_text() != 26226) {return InitializationResult.apiChecksumMismatch}@@ -58987,12 +59315,21 @@ private let initializationResult: InitializationResult = {if (uniffi_cua_spaces_ffi_checksum_func_kv_sidebar() != 64808) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cua_spaces_ffi_checksum_func_kv_signed_in_spaces() != 26065) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cua_spaces_ffi_checksum_func_kv_site_detail() != 19420) {return InitializationResult.apiChecksumMismatch}if (uniffi_cua_spaces_ffi_checksum_func_kv_site_toggle() != 62757) {return InitializationResult.apiChecksumMismatch}+ if (uniffi_cua_spaces_ffi_checksum_func_kv_space_access_key() != 62359) {+ return InitializationResult.apiChecksumMismatch+ }+ if (uniffi_cua_spaces_ffi_checksum_func_kv_visible_sharing_label() != 41274) {+ return InitializationResult.apiChecksumMismatch+ }if (uniffi_cua_spaces_ffi_checksum_func_spacesd_open_media_decoded() != 37315) {return InitializationResult.apiChecksumMismatch}diff --git a/libs/spaces-app-swift/Sources/CuaSpacesTeleport/TeleportPickerModel.swift b/libs/spaces-app-swift/Sources/CuaSpacesTeleport/TeleportPickerModel.swiftindex 0bddfb4b83..39468a1bdb 100644--- a/libs/spaces-app-swift/Sources/CuaSpacesTeleport/TeleportPickerModel.swift+++ b/libs/spaces-app-swift/Sources/CuaSpacesTeleport/TeleportPickerModel.swift@@ -91,6 +91,13 @@ public final class TeleportPickerModel: ObservableObject {return min(1, (Double(last.step) + within) / Double(max(1, last.steps)))}+ /// What the run is doing, in words, under the progress bar ("Reading+ /// Chrome cookies (macOS will ask for Keychain access)…", "Uploading+ /// 12 / 80 MB"): the app core's reading of the SDK's step events.+ public var status: String? {+ step == .running ? appTeleportRunStatus(events: events) : nil+ }+/// The least that moves (files when some were dropped).public static func defaultMove(_ entry: TeleportCatalogEntry, files: [String] = []) -> TeleportMove? {if !files.isEmpty, entry.moves.contains(.appWithFiles) { return .appWithFiles }diff --git a/libs/spaces-app-swift/Sources/CuaSpacesTeleport/TeleportViews.swift b/libs/spaces-app-swift/Sources/CuaSpacesTeleport/TeleportViews.swiftindex 19a822688e..96880a72c3 100644--- a/libs/spaces-app-swift/Sources/CuaSpacesTeleport/TeleportViews.swift+++ b/libs/spaces-app-swift/Sources/CuaSpacesTeleport/TeleportViews.swift@@ -179,9 +179,13 @@ public struct TeleportAppPicker: View {VStack(alignment: .leading, spacing: 10) {header("Teleporting \(model.plan?.app.name ?? "") to \(model.spaceName)…")ProgressView(value: model.progress)- if let last = model.events.last {- Text("\(last.kind): \(last.detail)").font(.caption).foregroundStyle(.secondary).lineLimit(2)- }+ Text(model.status ?? " ")+ .font(.callout)+ .foregroundStyle(.secondary)+ .lineLimit(2)+ .contentTransition(.opacity)+ .animation(.easeInOut(duration: 0.15), value: model.status)+ .accessibilityIdentifier("teleport-run-status")Spacer()}}diff --git a/libs/spaces-app-swift/Sources/cua_spaces_ffiFFI/include/cua_spaces_ffiFFI.h b/libs/spaces-app-swift/Sources/cua_spaces_ffiFFI/include/cua_spaces_ffiFFI.hindex 5688a02b2c..29375604f8 100644--- a/libs/spaces-app-swift/Sources/cua_spaces_ffiFFI/include/cua_spaces_ffiFFI.h+++ b/libs/spaces-app-swift/Sources/cua_spaces_ffiFFI/include/cua_spaces_ffiFFI.h@@ -1385,6 +1385,11 @@ RustBuffer uniffi_cua_spaces_ffi_fn_func_app_picker_sections(RustBuffer state, RRustBuffer uniffi_cua_spaces_ffi_fn_func_app_picker_sensitive_options(RustBuffer state, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_PICKER_STATUS+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_PICKER_STATUS+RustBuffer uniffi_cua_spaces_ffi_fn_func_app_picker_status(RustBuffer state, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_PICKER_WINDOW_GRID#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_PICKER_WINDOW_GRIDRustBuffer uniffi_cua_spaces_ffi_fn_func_app_picker_window_grid(RustBuffer windows, RustBuffer query, RustBuffer selected, RustCallStatus *_Nonnull out_status@@ -1715,6 +1720,16 @@ RustBuffer uniffi_cua_spaces_ffi_fn_func_app_teleport_plan(RustBuffer plan, RustRustBuffer uniffi_cua_spaces_ffi_fn_func_app_teleport_plan_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_TELEPORT_RUN_EVENT+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_TELEPORT_RUN_EVENT+RustBuffer uniffi_cua_spaces_ffi_fn_func_app_teleport_run_event(RustBuffer event, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_TELEPORT_RUN_STATUS+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_TELEPORT_RUN_STATUS+RustBuffer uniffi_cua_spaces_ffi_fn_func_app_teleport_run_status(RustBuffer events, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_THIS_MACHINE_SPACE#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_APP_THIS_MACHINE_SPACERustBuffer uniffi_cua_spaces_ffi_fn_func_app_this_machine_space(RustBuffer status, int64_t now_ms, RustCallStatus *_Nonnull out_status@@ -1857,6 +1872,11 @@ RustBuffer uniffi_cua_spaces_ffi_fn_func_kv_page(RustBuffer overview, int64_t noRustBuffer uniffi_cua_spaces_ffi_fn_func_kv_passphrase_check(RustBuffer mode, RustBuffer passphrase, RustBuffer confirm, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_PRUNE_DISMISSED+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_PRUNE_DISMISSED+RustBuffer uniffi_cua_spaces_ffi_fn_func_kv_prune_dismissed(RustBuffer overview, int64_t now_ms, RustBuffer dismissed, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_RECOVERY_KEY_TEXT#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_RECOVERY_KEY_TEXTRustBuffer uniffi_cua_spaces_ffi_fn_func_kv_recovery_key_text(RustBuffer key, RustCallStatus *_Nonnull out_status@@ -1872,6 +1892,11 @@ RustBuffer uniffi_cua_spaces_ffi_fn_func_kv_sharing_label(RustBuffer overview, iRustBuffer uniffi_cua_spaces_ffi_fn_func_kv_sidebar(RustBuffer overview, int64_t now_ms, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_SIGNED_IN_SPACES+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_SIGNED_IN_SPACES+RustBuffer uniffi_cua_spaces_ffi_fn_func_kv_signed_in_spaces(RustBuffer overview, int64_t now_ms, RustBuffer dismissed, RustBuffer spaces, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_SITE_DETAIL#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_SITE_DETAILRustBuffer uniffi_cua_spaces_ffi_fn_func_kv_site_detail(RustBuffer overview, RustBuffer key, int64_t now_ms, RustCallStatus *_Nonnull out_status@@ -1882,6 +1907,16 @@ RustBuffer uniffi_cua_spaces_ffi_fn_func_kv_site_detail(RustBuffer overview, RusRustBuffer uniffi_cua_spaces_ffi_fn_func_kv_site_toggle(RustBuffer group, int8_t on, RustCallStatus *_Nonnull out_status);#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_SPACE_ACCESS_KEY+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_SPACE_ACCESS_KEY+RustBuffer uniffi_cua_spaces_ffi_fn_func_kv_space_access_key(RustBuffer overview, int64_t now_ms, RustBuffer space, RustCallStatus *_Nonnull out_status+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_VISIBLE_SHARING_LABEL+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_KV_VISIBLE_SHARING_LABEL+RustBuffer uniffi_cua_spaces_ffi_fn_func_kv_visible_sharing_label(RustBuffer overview, int64_t now_ms, RustBuffer dismissed, RustCallStatus *_Nonnull out_status+);+#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_SPACESD_OPEN_MEDIA_DECODED#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_FN_FUNC_SPACESD_OPEN_MEDIA_DECODEDuint64_t uniffi_cua_spaces_ffi_fn_func_spacesd_open_media_decoded(uint64_t client, RustBuffer options, uint64_t frames@@ -3025,6 +3060,12 @@ uint16_t uniffi_cua_spaces_ffi_checksum_func_app_picker_sections(void#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_PICKER_SENSITIVE_OPTIONSuint16_t uniffi_cua_spaces_ffi_checksum_func_app_picker_sensitive_options(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_PICKER_STATUS+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_PICKER_STATUS+uint16_t uniffi_cua_spaces_ffi_checksum_func_app_picker_status(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_PICKER_WINDOW_GRID@@ -3415,6 +3456,18 @@ uint16_t uniffi_cua_spaces_ffi_checksum_func_app_teleport_plan(void#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_TELEPORT_PLAN_FROM_JSONuint16_t uniffi_cua_spaces_ffi_checksum_func_app_teleport_plan_from_json(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_TELEPORT_RUN_EVENT+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_TELEPORT_RUN_EVENT+uint16_t uniffi_cua_spaces_ffi_checksum_func_app_teleport_run_event(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_TELEPORT_RUN_STATUS+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_TELEPORT_RUN_STATUS+uint16_t uniffi_cua_spaces_ffi_checksum_func_app_teleport_run_status(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_APP_THIS_MACHINE_SPACE@@ -3583,6 +3636,12 @@ uint16_t uniffi_cua_spaces_ffi_checksum_func_kv_page(void#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_PASSPHRASE_CHECKuint16_t uniffi_cua_spaces_ffi_checksum_func_kv_passphrase_check(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_PRUNE_DISMISSED+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_PRUNE_DISMISSED+uint16_t uniffi_cua_spaces_ffi_checksum_func_kv_prune_dismissed(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_RECOVERY_KEY_TEXT@@ -3601,6 +3660,12 @@ uint16_t uniffi_cua_spaces_ffi_checksum_func_kv_sharing_label(void#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_SIDEBARuint16_t uniffi_cua_spaces_ffi_checksum_func_kv_sidebar(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_SIGNED_IN_SPACES+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_SIGNED_IN_SPACES+uint16_t uniffi_cua_spaces_ffi_checksum_func_kv_signed_in_spaces(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_SITE_DETAIL@@ -3613,6 +3678,18 @@ uint16_t uniffi_cua_spaces_ffi_checksum_func_kv_site_detail(void#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_SITE_TOGGLEuint16_t uniffi_cua_spaces_ffi_checksum_func_kv_site_toggle(void+);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_SPACE_ACCESS_KEY+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_SPACE_ACCESS_KEY+uint16_t uniffi_cua_spaces_ffi_checksum_func_kv_space_access_key(void++);+#endif+#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_VISIBLE_SHARING_LABEL+#define UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_KV_VISIBLE_SHARING_LABEL+uint16_t uniffi_cua_spaces_ffi_checksum_func_kv_visible_sharing_label(void+);#endif#ifndef UNIFFI_FFIDEF_UNIFFI_CUA_SPACES_FFI_CHECKSUM_FUNC_SPACESD_OPEN_MEDIA_DECODEDdiff --git a/libs/spaces-app-swift/Tests/CuaSpacesTeleportTests/TeleportPickerTests.swift b/libs/spaces-app-swift/Tests/CuaSpacesTeleportTests/TeleportPickerTests.swiftindex 6fcaee12a6..b165a31904 100644--- a/libs/spaces-app-swift/Tests/CuaSpacesTeleportTests/TeleportPickerTests.swift+++ b/libs/spaces-app-swift/Tests/CuaSpacesTeleportTests/TeleportPickerTests.swift@@ -71,6 +71,28 @@ let firefox = fixtureEntry("firefox", "Firefox", .full, moves: [.appOnly, .appWilet safari = fixtureEntry("com.apple.Safari", "Safari", .unsupported, moves: [], reason: "no Linux build")@Suite @MainActor struct TeleportPickerTests {+ /// The line under the bar reads the SDK's step events through the app+ /// core: the Keychain prompt is named before it appears, and bytes show+ /// while they move.+ @Test func theRunSaysWhichStepItIsOn() {+ func ev(_ phase: String, _ detail: String, _ done: UInt64 = 0, _ total: UInt64 = 0) -> TeleportRunEvent {+ TeleportRunEvent(step: 0, steps: 1, kind: "state", phase: phase, detail: detail,+ doneBytes: done, totalBytes: total)+ }+ let reading = "Reading Chrome cookies (macOS will ask for Keychain access)\u{2026}"+ var events = [ev("started", "Preparing the sign-in")]+ #expect(appTeleportRunStatus(events: events) == "Preparing the sign-in")+ events.append(ev("progress", reading))+ #expect(appTeleportRunStatus(events: events) == reading)+ events.append(ev("progress", "Uploading", 12 << 20, 80 << 20))+ #expect(appTeleportRunStatus(events: events) == "Uploading 12 / 80 MB")+ events.append(ev("progress", "Importing into the Space"))+ #expect(appTeleportRunStatus(events: events) == "Importing into the Space")+ events.append(TeleportRunEvent(step: 1, steps: 1, kind: "done", phase: "done", detail: "Chrome",+ doneBytes: 0, totalBytes: 0))+ #expect(appTeleportRunStatus(events: events) == nil)+ }+/// The Keyvault refuses session teleport from an embedded SDK by design/// (`requires_cua_app`); the model shows the Install Cua prompt instead.@Test func requiresCuaAppBecomesTheInstallPrompt() async throws {