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): newer-Cua note with a real action, shared desktop listed first, bundle new cua in Cua Spaces (CUA-1989) (#5702)
ddupontb131466103ec
diff --git a/.github/workflows/release-spaces-bundle-cua.yml b/.github/workflows/release-spaces-bundle-cua.ymlnew file mode 100644index 0000000000..db081ac6d3--- /dev/null+++ b/.github/workflows/release-spaces-bundle-cua.yml@@ -0,0 +1,75 @@+name: "Release: Bundle the new cua in Cua Spaces"++# Cua Spaces bundles the `cua` CLI and daemon built from libs/cua, but+# Release Please opens a cua-spaces release only for a user-facing commit+# under apps/cua-spaces-macos. A cua-sdk release (a chore commit under+# libs/cua) therefore never produced a Mac app release, and the app kept+# bundling the old cua while other machines moved on (CUA-1989).+#+# When libs/cua/VERSION changes on main, this opens a `fix(spaces-macos)`+# PR that records the version in apps/cua-spaces-macos/BUNDLED_CUA_VERSION.+# Merging it makes Release Please open the next cua-spaces release PR, which+# builds the app from that commit and so bundles the new cua.++on:+ push:+ branches:+ - main+ paths:+ - libs/cua/VERSION+ workflow_dispatch:++permissions:+ contents: write+ pull-requests: write++concurrency:+ group: release-spaces-bundle-cua+ cancel-in-progress: false++jobs:+ bundle:+ runs-on: ubuntu-latest+ steps:+ - name: Generate release GitHub App token+ id: app-token+ uses: actions/create-github-app-token@v1+ with:+ app-id: ${{ secrets.RELEASE_APP_ID }}+ private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}+ owner: ${{ github.repository_owner }}+ repositories: ${{ github.event.repository.name }}++ - uses: actions/checkout@v4+ with:+ ref: main+ token: ${{ steps.app-token.outputs.token }}++ - name: Open the bundle PR when the app is behind+ env:+ GH_TOKEN: ${{ steps.app-token.outputs.token }}+ run: |+ set -euo pipefail+ VERSION=$(tr -d '[:space:]' < libs/cua/VERSION)+ MARKER=apps/cua-spaces-macos/BUNDLED_CUA_VERSION+ if [[ "$(tr -d '[:space:]' < "$MARKER" 2>/dev/null || true)" == "$VERSION" ]]; then+ echo "Cua Spaces already records cua $VERSION"+ exit 0+ fi+ BRANCH="chore/cua-spaces-bundle-cua-$VERSION"+ if [[ -n "$(gh pr list --state open --head "$BRANCH" --json number -q '.[0].number')" ]]; then+ echo "A bundle PR for cua $VERSION is already open"+ exit 0+ fi+ git config user.name "trycua-release[bot]"+ git config user.email "trycua-release[bot]@users.noreply.github.com"+ git checkout -B "$BRANCH"+ echo "$VERSION" > "$MARKER"+ git add "$MARKER"+ git commit -m "fix(spaces-macos): bundle cua $VERSION in Cua Spaces" \+ -m "cua $VERSION was released, and the Mac app bundles the cua it is built with. Merging this lets Release Please open the next Cua Spaces release, so the app and the machines running cua $VERSION match."+ git push --force-with-lease origin "$BRANCH"+ gh pr create --base main --head "$BRANCH" \+ --title "fix(spaces-macos): bundle cua $VERSION in Cua Spaces" \+ --body "cua $VERSION was released, and Cua Spaces for Mac bundles the cua it is built with. Merging this lets Release Please open the next Cua Spaces release so the app catches up. Opened automatically when libs/cua/VERSION changes (CUA-1989)."+ gh pr merge --auto --squash "$BRANCH"diff --git a/apps/cua-spaces-desktop/src/model/app-model.ts b/apps/cua-spaces-desktop/src/model/app-model.tsindex 483164ebb0..4a23e7db08 100644--- a/apps/cua-spaces-desktop/src/model/app-model.ts+++ b/apps/cua-spaces-desktop/src/model/app-model.ts@@ -355,6 +355,9 @@ export class AppModel {about: this.about?.() ?? { computerName: "", appVersion: "", osVersion: "" },rows: undefined,health: [...this.machineHealth.values()],+ // The Electron app has no in-app Mac update to offer on this page.+ appUpdate: "",+ appUpdateReady: false,});}diff --git a/apps/cua-spaces-desktop/src/native/generated/cua_spaces_ffi.ts b/apps/cua-spaces-desktop/src/native/generated/cua_spaces_ffi.tsindex 51a1c6931e..abaa9dcc9c 100644--- a/apps/cua-spaces-desktop/src/native/generated/cua_spaces_ffi.ts+++ b/apps/cua-spaces-desktop/src/native/generated/cua_spaces_ffi.ts@@ -25612,7 +25612,12 @@ export type AppMachinesViewIssueAction = {/*** A host action to run (`host.action`).*/- hostAction?: AppHostActionId+ hostAction?: AppHostActionId,+ /**+ * Restart into the Cua Spaces update this app already downloaded+ * (the shell's own update flow, the sidebar's "Restart to update").+ */+ appUpdate: boolean}/**@@ -25638,18 +25643,21 @@ const FfiConverterTypeAppMachinesViewIssueAction = (() => {return {label: FfiConverterString.read(from),url: FfiConverterOptionalString.read(from),- hostAction: FfiConverterOptionalTypeAppHostActionId.read(from)+ hostAction: FfiConverterOptionalTypeAppHostActionId.read(from),+ appUpdate: FfiConverterBool.read(from)};}write(value: TypeName, into: RustBuffer): void {FfiConverterString.write(value.label, into);FfiConverterOptionalString.write(value.url, into);FfiConverterOptionalTypeAppHostActionId.write(value.hostAction, into);+ FfiConverterBool.write(value.appUpdate, into);}allocationSize(value: TypeName): number {return FfiConverterString.allocationSize(value.label) +FfiConverterOptionalString.allocationSize(value.url) +- FfiConverterOptionalTypeAppHostActionId.allocationSize(value.hostAction);+ FfiConverterOptionalTypeAppHostActionId.allocationSize(value.hostAction) ++ FfiConverterBool.allocationSize(value.appUpdate);}};@@ -25662,7 +25670,8 @@ export type AppMachinesViewIssue = {*/id: string,/**- * `warn` or `fail`.+ * `warn` or `fail`; `info` for a note that is no problem (it does not+ * tint the row's dot).*/level: string,/**@@ -25881,6 +25890,83 @@ const FfiConverterTypeAppMachinesViewSpace = (() => {return new FFIConverter();})();+export type AppMachinesViewDesktop = {+ /**+ * The Space's id (its page).+ */+ id: string,+ /**+ * Its name, as the Spaces list names it.+ */+ name: string,+ /**+ * Its system ("Ubuntu 24.04.5 LTS", "macOS").+ */+ os: string,+ /**+ * Its status word ("Running", "Stopped").+ */+ status: string,+ /**+ * Running (the green dot).+ */+ running: boolean,+ /**+ * "Desktop".+ */+ label: string+}++/**+ * Generated factory for {@link AppMachinesViewDesktop} record objects.+ */+export const AppMachinesViewDesktop = (() => {+ const defaults = () => ({+ });+ const create = (() => {+ return uniffiCreateRecord<AppMachinesViewDesktop, ReturnType<typeof defaults>>(defaults);+ })();+ return Object.freeze({+ create,+ new: create,+ defaults: () => Object.freeze(defaults()) as Partial<AppMachinesViewDesktop>,+ });+})();++const FfiConverterTypeAppMachinesViewDesktop = (() => {+ type TypeName = AppMachinesViewDesktop;+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {+ read(from: RustBuffer): TypeName {+ return {+ id: FfiConverterString.read(from),+ name: FfiConverterString.read(from),+ os: FfiConverterString.read(from),+ status: FfiConverterString.read(from),+ running: FfiConverterBool.read(from),+ label: FfiConverterString.read(from)+ };+ }+ write(value: TypeName, into: RustBuffer): void {+ FfiConverterString.write(value.id, into);+ FfiConverterString.write(value.name, into);+ FfiConverterString.write(value.os, into);+ FfiConverterString.write(value.status, into);+ FfiConverterBool.write(value.running, into);+ FfiConverterString.write(value.label, into);+ }+ allocationSize(value: TypeName): number {+ return FfiConverterString.allocationSize(value.id) ++ FfiConverterString.allocationSize(value.name) ++ FfiConverterString.allocationSize(value.os) ++ FfiConverterString.allocationSize(value.status) ++ FfiConverterBool.allocationSize(value.running) ++ FfiConverterString.allocationSize(value.label);++ }+ };+ return new FFIConverter();+})();+export type AppMachinesViewNewSpace = {/*** "New Space here".@@ -26082,6 +26168,10 @@ export type AppMachinesViewMachine = {* The Spaces on it.*/spaces: Array<AppMachinesViewSpace>,+ /**+ * Its own desktop, when it shares it (shown above `spaces`).+ */+ desktop?: AppMachinesViewDesktop,/*** When it has none.*/@@ -26146,6 +26236,7 @@ const FfiConverterTypeAppMachinesViewMachine = (() => {togglesNote: FfiConverterOptionalString.read(from),spacesTitle: FfiConverterString.read(from),spaces: FfiConverterSequenceTypeAppMachinesViewSpace.read(from),+ desktop: FfiConverterOptionalTypeAppMachinesViewDesktop.read(from),spacesEmpty: FfiConverterOptionalString.read(from),newSpace: FfiConverterTypeAppMachinesViewNewSpace.read(from),detailsTitle: FfiConverterString.read(from),@@ -26175,6 +26266,7 @@ const FfiConverterTypeAppMachinesViewMachine = (() => {FfiConverterOptionalString.write(value.togglesNote, into);FfiConverterString.write(value.spacesTitle, into);FfiConverterSequenceTypeAppMachinesViewSpace.write(value.spaces, into);+ FfiConverterOptionalTypeAppMachinesViewDesktop.write(value.desktop, into);FfiConverterOptionalString.write(value.spacesEmpty, into);FfiConverterTypeAppMachinesViewNewSpace.write(value.newSpace, into);FfiConverterString.write(value.detailsTitle, into);@@ -26203,6 +26295,7 @@ const FfiConverterTypeAppMachinesViewMachine = (() => {FfiConverterOptionalString.allocationSize(value.togglesNote) +FfiConverterString.allocationSize(value.spacesTitle) +FfiConverterSequenceTypeAppMachinesViewSpace.allocationSize(value.spaces) ++ FfiConverterOptionalTypeAppMachinesViewDesktop.allocationSize(value.desktop) +FfiConverterOptionalString.allocationSize(value.spacesEmpty) +FfiConverterTypeAppMachinesViewNewSpace.allocationSize(value.newSpace) +FfiConverterString.allocationSize(value.detailsTitle) +@@ -26556,7 +26649,16 @@ export type AppMachinesViewInput = {* the machines whose `health_target` the shell checked* ([`crate::machines_health`]).*/- health: Array<AppMachinesViewHealth>+ health: Array<AppMachinesViewHealth>,+ /**+ * The Cua Spaces update this app found (its version); empty when this+ * app is the newest release.+ */+ appUpdate: string,+ /**+ * That update is downloaded and ready to restart into.+ */+ appUpdateReady: boolean}/**@@ -26585,7 +26687,9 @@ const FfiConverterTypeAppMachinesViewInput = (() => {host: FfiConverterOptionalTypeAppHostState.read(from),about: FfiConverterTypeAppMachinesViewAbout.read(from),rows: FfiConverterOptionalSequenceTypeAppMachinePageRow.read(from),- health: FfiConverterSequenceTypeAppMachinesViewHealth.read(from)+ health: FfiConverterSequenceTypeAppMachinesViewHealth.read(from),+ appUpdate: FfiConverterString.read(from),+ appUpdateReady: FfiConverterBool.read(from)};}write(value: TypeName, into: RustBuffer): void {@@ -26595,6 +26699,8 @@ const FfiConverterTypeAppMachinesViewInput = (() => {FfiConverterTypeAppMachinesViewAbout.write(value.about, into);FfiConverterOptionalSequenceTypeAppMachinePageRow.write(value.rows, into);FfiConverterSequenceTypeAppMachinesViewHealth.write(value.health, into);+ FfiConverterString.write(value.appUpdate, into);+ FfiConverterBool.write(value.appUpdateReady, into);}allocationSize(value: TypeName): number {return FfiConverterTypeAppMachinesPageInput.allocationSize(value.page) +@@ -26602,7 +26708,9 @@ const FfiConverterTypeAppMachinesViewInput = (() => {FfiConverterOptionalTypeAppHostState.allocationSize(value.host) +FfiConverterTypeAppMachinesViewAbout.allocationSize(value.about) +FfiConverterOptionalSequenceTypeAppMachinePageRow.allocationSize(value.rows) +- FfiConverterSequenceTypeAppMachinesViewHealth.allocationSize(value.health);+ FfiConverterSequenceTypeAppMachinesViewHealth.allocationSize(value.health) ++ FfiConverterString.allocationSize(value.appUpdate) ++ FfiConverterBool.allocationSize(value.appUpdateReady);}};@@ -63158,6 +63266,9 @@ const FfiConverterSequenceTypeAppMachinesViewToggle = new FfiConverterArray(FfiC// FfiConverter for Array<AppMachinesViewSpace>const FfiConverterSequenceTypeAppMachinesViewSpace = new FfiConverterArray(FfiConverterTypeAppMachinesViewSpace);+// FfiConverter for AppMachinesViewDesktop | undefined+const FfiConverterOptionalTypeAppMachinesViewDesktop = new FfiConverterOptional(FfiConverterTypeAppMachinesViewDesktop);+// FfiConverter for Array<AppMachinesViewFact>const FfiConverterSequenceTypeAppMachinesViewFact = new FfiConverterArray(FfiConverterTypeAppMachinesViewFact);@@ -64980,6 +65091,7 @@ export default Object.freeze({FfiConverterTypeAppMachinesView,FfiConverterTypeAppMachinesViewAbout,FfiConverterTypeAppMachinesViewCheck,+ FfiConverterTypeAppMachinesViewDesktop,FfiConverterTypeAppMachinesViewFact,FfiConverterTypeAppMachinesViewGroup,FfiConverterTypeAppMachinesViewHealth,diff --git a/apps/cua-spaces-macos/BUNDLED_CUA_VERSION b/apps/cua-spaces-macos/BUNDLED_CUA_VERSIONnew file mode 100644index 0000000000..faef31a435--- /dev/null+++ b/apps/cua-spaces-macos/BUNDLED_CUA_VERSION@@ -0,0 +1 @@+0.7.0diff --git a/apps/cua-spaces-macos/README.md b/apps/cua-spaces-macos/README.mdindex c3adb10ddd..f29e4458f4 100644--- a/apps/cua-spaces-macos/README.md+++ b/apps/cua-spaces-macos/README.md@@ -72,6 +72,7 @@ pressed look; `CUA_SPACES_UPDATER=live` runs Sparkle in a fixtures run (the feedInfo.plist; use a test bundle identifier and a local feed), `CUA_SPACES_UPDATE_CHECK=background`checks at launch, and `CUA_SPACES_REFRESH=1` runs the after-update refresh in a fixturesrun (with a throwaway `HOME`). State lives under `$HOME/Library/Application Support/com.trycua.spaces.macos`.+`CUA_SPACES_FIXTURE_PEER_CUA=<version>` (fixtures) signs the fixture account in with one Linux machine, `ellieln`, that shares its desktop, provides a Space and runs that Cua (This Mac reports 0.6.0), and `CUA_SPACES_FIXTURE_UPDATE=<version>` has that Cua Spaces update downloaded; `CUA_SPACES_WEBUI_CAPTURE_SELECT=<machine id>` captures the Machines page with that machine chosen;`CUA_SPACES_OFFSCREEN=1` runs with nothing on screen, for captures on a Mac in use (`OffscreenRun`): an accessory app (no Dock icon or menu bar), no menu bar item, notch or global shortcut, no activation, and transparent click-through windows that still paint, so `CUA_SPACES_WEBUI_CAPTURE` works (with fixtures and a throwaway `HOME`, a first run captures `/onboarding`).`CuaSpacesMac --check-launch-only` loads the app's libraries, prints its version and exits(`scripts/check-launch.sh`; release builds too).@@ -390,6 +391,14 @@ splits commits by package path and skips a path with no commits (even for atargeted bump), so a change only under `libs/spaces-app-swift` does not openone on its own: land it with the app change that uses it.+The same holds for the `cua` the app bundles (built from `libs/cua`): a+cua-sdk release is a chore commit under `libs/cua`, so it opens no app+release. `BUNDLED_CUA_VERSION` records the cua the app bundles, and the+`Release: Bundle the new cua in Cua Spaces` workflow opens a+`fix(spaces-macos)` PR that updates it whenever `libs/cua/VERSION` changes+on main. Merging that PR makes Release Please open the next `cua-spaces`+release, so the app never lags the machines running the new cua.+### Publishing the appcast (runbook)1. The key: the `CUA_SPACES_SPARKLE_ED_PRIVATE_KEY` secret (base64 Ed25519diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppEnvironment.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppEnvironment.swiftindex 024175a922..1accc51605 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppEnvironment.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppEnvironment.swift@@ -73,6 +73,7 @@ public enum AppEnvironment {let fixture = FixtureSpacesBackend(rows: FixtureSpacesBackend.rows(environment: env))fixture.fixtureRuns["local:aurora"] = FixtureSpacesBackend.sampleRunsfixture.fixtureEvents = FixtureSpacesBackend.sampleEvents+ fixture.fixtureHealth = FixtureSpacesBackend.peerHealth(environment: env)backend = fixture} else {backend = PendingSpacesBackend(gate: gate)@@ -90,7 +91,7 @@ public enum AppEnvironment {// Fixtures never touch the host service, the account, the telemetry// config or the coding agents' configs.let host: HostRunning = fixtures ? FixtureHost() : PendingHost(gate: gate)- let account: AccountRunning = fixtures ? FixtureAccount() : PendingAccount(gate: gate)+ let account: AccountRunning = fixtures ? FixtureAccount(identity: env["CUA_SPACES_FIXTURE_PEER_CUA"] != nil ? "[email protected]" : nil) : PendingAccount(gate: gate)let telemetry: TelemetryRunning = fixtures ? FixtureTelemetry() : LiveTelemetry()let agents: AgentSetupRunning = fixtures ? FixtureAgentSetup() : PendingAgentSetup(gate: gate)// The first run's pages are the web UI's; this is its state file.@@ -153,6 +154,11 @@ public enum AppEnvironment {let updater: UpdaterDriving? = fixtures && env["CUA_SPACES_UPDATER"] != "live"? FixtureUpdater(lastCheck: Date().addingTimeInterval(-2 * 3600)): SparkleUpdater.start(channels: appAboutAllowedChannels(channel: channel))+ // `CUA_SPACES_FIXTURE_UPDATE=<version>` (fixtures): that update is found and downloaded.+ if let fixture = updater as? FixtureUpdater, let version = env["CUA_SPACES_FIXTURE_UPDATE"] {+ fixture.simulateFound(version: version)+ fixture.simulateDownloaded()+ }model.updates = UpdatesModel(updater: updater, channel: channel)model.updates.telemetry = telemetrymodel.updates.saveChannel = { [weak model] channel in model?.setUpdateChannel(channel) }diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swiftindex 610d37f358..006745dc27 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift@@ -377,9 +377,14 @@ public final class AppModel {AppMachinesViewRelay(id: $0.id, role: $0.role, team: $0.team, ownerEmail: $0.ownerEmail,providesSpaces: $0.providesSpaces)}+ // The Cua Spaces update this app found: a peer on a newer Cua is+ // fixed by it (this app bundles its Cua), and by nothing else.+ let update = updates.updateState+ let found = [.available, .downloading, .downloaded].contains(update.status) ? update.version ?? "" : ""return appMachinesView(input: AppMachinesViewInput(page: machinesPageInput, relay: relay, host: host.state, about: Self.machinesAbout, rows: nil,- health: machineHealth.keys.sorted().compactMap { machineHealth[$0] }))+ health: machineHealth.keys.sorted().compactMap { machineHealth[$0] },+ appUpdate: found, appUpdateReady: !found.isEmpty && update.status == .downloaded))}/// What each machine's own daemon last reported of its health, bydiff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/MachinesViews.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/MachinesViews.swiftindex 42e8d74e86..a5b261040d 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/MachinesViews.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/MachinesViews.swift@@ -355,13 +355,18 @@ struct MachinePage: View {.padding(.top, 28).padding(.bottom, 8)card {- ForEach(Array(m.spaces.enumerated()), id: \.element.id) { i, s in+ ForEach(Array(spaceRows(m).enumerated()), id: \.element.id) { i, s inif i > 0 { Divider() }Button {model.select(s.id)} label: {HStack(spacing: 8) {Text(s.name).font(.system(.callout, design: .monospaced)).lineLimit(1)+ if let label = s.label {+ Text(label).font(.caption2).foregroundStyle(.secondary)+ .padding(.horizontal, 5)+ .background(.quaternary, in: RoundedRectangle(cornerRadius: 4))+ }if !s.os.isEmpty {Text("\u{b7}").foregroundStyle(.tertiary)Text(s.os).foregroundStyle(.secondary).lineLimit(1)@@ -497,9 +502,10 @@ struct MachinePage: View {/// here (a System Settings pane, or This Mac's host action).private func issueRow(_ issue: AppMachinesViewIssue) -> some View {HStack(alignment: .firstTextBaseline, spacing: 10) {- Image(systemName: issue.level == "fail" ? "xmark.octagon.fill" : "exclamationmark.triangle.fill")- .foregroundStyle(issue.level == "fail" ? Color.red : Color.orange)- .accessibilityLabel(issue.level == "fail" ? "Problem" : "Warning")+ Image(systemName: issue.level == "fail" ? "xmark.octagon.fill"+ : issue.level == "info" ? "info.circle" : "exclamationmark.triangle.fill")+ .foregroundStyle(issue.level == "fail" ? Color.red : issue.level == "info" ? Color.secondary : Color.orange)+ .accessibilityLabel(issue.level == "fail" ? "Problem" : issue.level == "info" ? "Note" : "Warning")Text(issue.text).fixedSize(horizontal: false, vertical: true)Spacer(minLength: 12)if let action = issue.action {@@ -515,8 +521,24 @@ struct MachinePage: View {.accessibilityIdentifier("machine-issue-\(issue.id)")}+ /// Its shared desktop first, then its Spaces: every row a Space row.+ private struct SpaceRowItem {+ let id: String, name: String, os: String, status: String, running: Bool, label: String?+ }++ private func spaceRows(_ m: AppMachinesViewMachine) -> [SpaceRowItem] {+ let desktop = m.desktop.map {+ SpaceRowItem(id: $0.id, name: $0.name, os: $0.os, status: $0.status, running: $0.running, label: $0.label)+ }+ return (desktop.map { [$0] } ?? [])+ + m.spaces.map { SpaceRowItem(id: $0.id, name: $0.name, os: $0.os, status: $0.status, running: $0.running, label: nil) }+ }+private func fix(_ action: AppMachinesViewIssueAction) {- if let url = action.url {+ if action.appUpdate {+ // Restart into the Cua Spaces update already downloaded.+ model.updates.installUpdate()+ } else if let url = action.url {PermissionRows.open(url)} else if let id = action.hostAction, machine.current {Task {diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/SyntheticStreamProvider.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/SyntheticStreamProvider.swiftindex 7083b8ac5b..afbf709ff2 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/SyntheticStreamProvider.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/SyntheticStreamProvider.swift@@ -236,14 +236,40 @@ extension FixtureSpacesBackend {/// sample Spaces plus `n` running Linux Spaces on this Mac, for the video/// harness's grid of tiles.static func rows(environment: [String: String]) -> [AppSpaceRow] {+ var base = sample+ // `CUA_SPACES_FIXTURE_PEER_CUA=<version>`: one of your Linux machines (relay machine+ // `m1`) shares its desktop and runs that Cua (see `peerHealth`).+ if environment["CUA_SPACES_FIXTURE_PEER_CUA"] != nil {+ base.append(AppSpaceRow(+ id: "relay:m1", name: "ellieln", provider: "relay", spacesdVersion: "0.7.0",+ features: ["desktop_stream", "window_stream", "host_spaces"], addedAt: nil,+ os: .linux, osName: "Ubuntu", osPrettyName: "Ubuntu 24.04.3 LTS", image: nil, imageDigest: nil,+ kind: nil, arch: nil, reachable: true, error: nil, host: nil, hostName: nil,+ power: nil, powerState: "running", cloud: nil, cloudPlace: nil, cloudDelete: nil, stopReason: nil))+ // A Space it provides, for comparison with its desktop row.+ base.append(AppSpaceRow(+ id: "relay:m1/xm1", name: "0123456789ab", provider: "relay", spacesdVersion: "0.7.0",+ features: ["desktop_stream"], addedAt: nil,+ os: .linux, osName: "Ubuntu", osPrettyName: "Ubuntu 24.04.3 LTS", image: nil, imageDigest: nil,+ kind: nil, arch: nil, reachable: true, error: nil, host: "m1", hostName: "ellieln",+ power: nil, powerState: "running", cloud: nil, cloudPlace: nil, cloudDelete: nil, stopReason: nil))+ }guard let n = environment["CUA_SPACES_FIXTURE_SPACES"].flatMap(Int.init), n > 0,- let template = sample.first else { return sample }+ let template = base.first else { return base }let extra = (1...min(n, 32)).map { i -> AppSpaceRow invar row = templaterow.id = "local:bench-\(i)"row.name = "bench-\(i)"return row}- return extra + sample+ return extra + base+ }++ /// What `machineHealth` answers under `CUA_SPACES_FIXTURE_PEER_CUA=<version>`: This Mac runs+ /// Cua 0.6.0 and the peer runs `<version>`.+ static func peerHealth(environment: [String: String]) -> [String: AppMachinesViewHealth] {+ guard let peer = environment["CUA_SPACES_FIXTURE_PEER_CUA"] else { return [:] }+ return ["": AppMachinesViewHealth(id: "", checks: [], cuaVersion: "0.6.0", error: nil),+ "m1": AppMachinesViewHealth(id: "m1", checks: [], cuaVersion: peer, error: nil)]}}diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge.swiftindex b333acd3ff..19a241a2cc 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge.swift@@ -1014,7 +1014,7 @@ final class WebUIBridge: NSObject, WKScriptMessageHandlerWithReply {// only when what the page shows differs.followChanges("machines.changed") { [weak self] inguard let self else { return "" }- return Self.signature([self.hostStatus(), BridgeValue.encode(self.model.devices.view)])+ return Self.signature([self.hostStatus(), BridgeValue.encode(self.model.devices.view), self.model.updates.updateState.json])}followChanges("update.changed") { [model] in Self.signature(model.updates.updateState.json) }followChanges("checklist.changed") { [model] in Self.signature(model.checklist.stored) }diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUICapture.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUICapture.swiftindex 78cd128b06..7993385a3e 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUICapture.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUICapture.swift@@ -37,6 +37,14 @@ extension WebUIWindowController {webView.load(URLRequest(url: Self.url(route, in: captureBase)))page = await settledPage()}+ // `CUA_SPACES_WEBUI_CAPTURE_SELECT=<machine id>`: the Machines page with that machine chosen.+ if route == "machines", let id = DevHooks.environment["CUA_SPACES_WEBUI_CAPTURE_SELECT"] {+ try? await Task.sleep(for: .seconds(6))+ _ = try? await bridge.handle("machines.checkHealth", [:])+ try? await Task.sleep(for: .seconds(4))+ _ = try? await webView.evaluateJavaScript("document.querySelector('[data-machine-id=\"\(id)\"]')?.click()")+ try? await Task.sleep(for: .milliseconds(800))+ }let file = dir.appendingPathComponent("\(route.replacingOccurrences(of: "/", with: "-"))-\(theme).png")if let image = try? await webView.takeSnapshot(configuration: nil),let tiff = image.tiffRepresentation,diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/MachinesViewTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/MachinesViewTests.swiftindex 6be2588b65..3bb425ca4e 100644--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/MachinesViewTests.swift+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/MachinesViewTests.swift@@ -60,6 +60,9 @@ extension ParityTests {lines.append("\(t.label): \(t.on ? "on" : "off") (\(how))")}if let note = m.togglesNote { lines.append("note: \(note)") }+ if let d = m.desktop {+ lines.append("desktop \(d.name) \u{b7} \(d.os) \u{b7} \(d.status) [\(d.label)] -> \(d.id)")+ }for s in m.spaces { lines.append("space \(s.name) \u{b7} \(s.os) \u{b7} \(s.status) -> \(s.id)") }if let e = m.spacesEmpty { lines.append("spaces: \(e)") }let ns = m.newSpacediff --git a/apps/cua-spaces-web/e2e/parity.spec.ts b/apps/cua-spaces-web/e2e/parity.spec.tsindex b736f738ca..290f34399c 100644--- a/apps/cua-spaces-web/e2e/parity.spec.ts+++ b/apps/cua-spaces-web/e2e/parity.spec.ts@@ -357,8 +357,11 @@ async function checkTelemetry(page: Page, cps: Of<"telemetry">[]): Promise<numbeawait expect.poll(() => tracked(page)).toContainEqual({ type: "launched", onboardingEligible: false });const before = (await tracked(page)).length;for (const cp of cps) await track(page, cp.signals);- // The getting-started checklist records its own steps as the page loads; they are not this flow's.- const ours = (await tracked(page)).slice(before).filter((s) => !(s.type === "step" && s.step.startsWith("checklist_")));+ // The page records its own events as it loads (the getting-started checklist's steps, the first+ // ready Space's agent offer, once per install); they are not this flow's.+ const pages = (s: { type: string; step?: string; feature?: string }) =>+ (s.type === "step" && s.step?.startsWith("checklist_")) || (s.type === "feature" && s.feature?.startsWith("agent_offer_"));+ const ours = (await tracked(page)).slice(before).filter((s) => !pages(s));expect(ours, "the host recorded the core's events").toEqual(cps.flatMap((c) => c.signals));await page.evaluate(() => window.__cuaParity!.setTelemetry(false));diff --git a/apps/cua-spaces-web/src/__tests__/first-run.test.tsx b/apps/cua-spaces-web/src/__tests__/first-run.test.tsxindex 9417282ff1..1c9521dbf2 100644--- a/apps/cua-spaces-web/src/__tests__/first-run.test.tsx+++ b/apps/cua-spaces-web/src/__tests__/first-run.test.tsx@@ -113,14 +113,15 @@ describe.skipIf(!wasmBuilt)("the first run (real route, wasm core)", () => {host: (h) => ({ ...h, permissions: [{ id: "accessibility", label: "Accessibility", granted: false, settingsUrl: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility" }] }),});await waitFor(() => expect(heading()).toBe("One step left."), { timeout: 5000 });- expect(document.querySelector('[data-first-run-row="computer"]')!.textContent).toMatch(/^Let Cua control this/);+ await waitFor(() => expect(document.querySelector('[data-first-run-row="computer"]')!.textContent).toMatch(/^Let Cua control this/), { timeout: 5000 });fireEvent.click(document.querySelector('[data-first-run-action="open-settings"]')!);await waitFor(() => expect(calls.find((c) => c.op === "host.openSettings")).toBeTruthy());expect(primary()!.textContent).toBe("Finish later");fireEvent.click(primary()!);await waitFor(() => expect(calls.find((c) => c.op === "session.completeOnboarding")).toBeTruthy());await waitFor(() => expect(document.querySelector("[data-first-run-todos]")).toBeTruthy(), { timeout: 5000 });- expect(document.querySelector('[data-first-run-todo="computer"]')!.textContent).toMatch(/Let Cua control/);+ // The row says "Checking…" until the host's permissions arrive: wait for the fix to be named.+ await waitFor(() => expect(document.querySelector('[data-first-run-todo="computer"]')!.textContent).toMatch(/Let Cua control/), { timeout: 5000 });});it("offers the host's runtime fix when nothing can be made here", async () => {diff --git a/apps/cua-spaces-web/src/__tests__/machines-page.test.tsx b/apps/cua-spaces-web/src/__tests__/machines-page.test.tsxindex 3634c0784a..bcff471eba 100644--- a/apps/cua-spaces-web/src/__tests__/machines-page.test.tsx+++ b/apps/cua-spaces-web/src/__tests__/machines-page.test.tsx@@ -58,9 +58,9 @@ async function mockupView(): Promise<MachinesView> {/** The mockup with each machine's health as its daemon reported it* (`parity/machines.json`, the view "the mockup with issues"). */-async function issuesView(): Promise<MachinesView> {+async function issuesView(name = "the mockup with issues"): Promise<MachinesView> {const fixture = JSON.parse(readFileSync(resolve(process.cwd(), "../../libs/cua/crates/cua-spaces-app-core/parity/machines.json"), "utf8"));- const v = (fixture.views as { name: string; input: object }[]).find((x) => x.name.startsWith("the mockup with issues"))!;+ const v = (fixture.views as { name: string; input: object }[]).find((x) => x.name.startsWith(name))!;const core = await testCore();return core.call<MachinesView>("machines.view", { input: v.input });}@@ -261,4 +261,62 @@ describe.skipIf(!wasmBuilt)("the Machines page (real routes, wasm core)", () =>fireEvent.click(within(detail).getByRole("button", { name: "Restart service" }));await waitFor(() => expect(calls.some(([op, a]) => op === "host.action" && JSON.stringify(a).includes("resume-sharing"))).toBe(true));});++ it("a peer on a newer Cua is a plain note when this app is the newest release: no warning, no button", async () => {+ const view = await issuesView("the Mac Studio runs a newer Cua and this app is the newest");+ const { router } = await mountApp("/machines", hostDrawn(view, []));+ await router.load();+ await screen.findByText(view.summary);+ expect(document.querySelector('[data-machine-id="studio"] [data-machine-health]')?.getAttribute("data-machine-health")).toBe("warn");+ select("studio");+ const detail = await detailOf("cua's Mac Studio");+ const note = detail.querySelector<HTMLElement>('[data-machine-issue="version"]')!;+ expect(note.dataset.level).toBe("info");+ expect(note.textContent).toContain("newer than this Mac’s 0.4.1");+ expect(note.textContent).not.toContain("Update Cua here");+ expect(note.querySelector("[data-machine-issue-action]")).toBeNull();+ });++ it("with the Cua Spaces update downloaded, the newer-Cua row offers Restart to update", async () => {+ const view = await issuesView("the Mac Studio runs a newer Cua and this app has the update");+ const calls: [string, unknown][] = [];+ const h = hostDrawn(view, calls);+ const base = h.intercept;+ h.intercept = (op, args) => {+ if (op === "update.install") {+ calls.push([op, args]);+ return null;+ }+ // No agent is working: a restart cuts nothing short.+ if (op === "agents.runs") return [];+ return base?.(op, args);+ };+ const { router } = await mountApp("/machines", h);+ await router.load();+ await screen.findByText(view.summary);+ select("studio");+ const detail = await detailOf("cua's Mac Studio");+ const row = detail.querySelector<HTMLElement>('[data-machine-issue="version"]')!;+ expect(row.dataset.level).toBe("warn");+ expect(row.textContent).toContain("Cua Spaces 0.12.2 is ready to install");+ fireEvent.click(within(row).getByRole("button", { name: "Restart to update" }));+ await waitFor(() => expect(calls.some(([op]) => op === "update.install")).toBe(true));+ });++ it("lists a shared desktop first among a machine's Spaces, drawn as any Space row", async () => {+ const view = await issuesView();+ const studio = view.machines.find((m) => m.id === "studio")!;+ expect(studio.desktop?.label).toBe("Desktop");+ const { router } = await mountApp("/machines", hostDrawn(view, []));+ await router.load();+ await screen.findByText(view.summary);+ select("studio");+ const detail = await detailOf("cua's Mac Studio");+ const rows = [...detail.querySelectorAll<HTMLElement>("[data-machine-spaces] [data-space-row]")];+ // The desktop first, then the Spaces: one row component, one look.+ expect(rows.map((r) => r.dataset.spaceRow)).toEqual([studio.desktop!.id, ...studio.spaces.map((x) => x.id)]);+ expect(rows[0]!.getAttribute("href")).toBe(`/spaces/${encodeURIComponent(studio.desktop!.id)}`);+ expect(rows[0]!.textContent).toContain("Desktop");+ expect(rows[1]!.textContent).not.toContain("Desktop");+ });});diff --git a/apps/cua-spaces-web/src/bridge/contracts/bridge-shapes.json b/apps/cua-spaces-web/src/bridge/contracts/bridge-shapes.jsonindex c096f84ef1..e78506c632 100644--- a/apps/cua-spaces-web/src/bridge/contracts/bridge-shapes.json+++ b/apps/cua-spaces-web/src/bridge/contracts/bridge-shapes.json@@ -1927,6 +1927,9 @@"string","null"]+ },+ "appUpdate": {+ "type": "boolean"}},"required": [@@ -2099,6 +2102,40 @@]}},+ "desktop": {+ "type": [+ "object",+ "null"+ ],+ "properties": {+ "id": {+ "type": "string"+ },+ "name": {+ "type": "string"+ },+ "os": {+ "type": "string"+ },+ "status": {+ "type": "string"+ },+ "running": {+ "type": "boolean"+ },+ "label": {+ "type": "string"+ }+ },+ "required": [+ "id",+ "name",+ "os",+ "status",+ "running",+ "label"+ ]+ },"spacesEmpty": {"type": ["string",diff --git a/apps/cua-spaces-web/src/bridge/contracts/host.ts b/apps/cua-spaces-web/src/bridge/contracts/host.tsindex b3215ad69b..cecff290f7 100644--- a/apps/cua-spaces-web/src/bridge/contracts/host.ts+++ b/apps/cua-spaces-web/src/bridge/contracts/host.ts@@ -209,6 +209,18 @@ export interface MachinesViewToggle {setup?: string | null;}+/** A machine's own desktop, the first row of its Spaces when it shares it: a Space row with a quiet label (`machines_view::MachinesViewDesktop`). */+export interface MachinesViewDesktop {+ /** The Space's id (its page). */+ id: string;+ name: string;+ os: string;+ status: string;+ running: boolean;+ /** "Desktop". */+ label: string;+}+/** A Space on a machine: a link to its page (`machines_view::MachinesViewSpace`). */export interface MachinesViewSpace {id: string;@@ -258,13 +270,15 @@ export interface MachinesViewIssueAction {url?: string | null;/** A host action to run (`host.action`). */hostAction?: HostActionId | null;+ /** Restart into the Cua Spaces update already downloaded (the sidebar's "Restart to update"). */+ appUpdate?: boolean;}/** One issue on a machine's page (`machines_health::MachinesViewIssue`). */export interface MachinesViewIssue {/** The check it comes from (`machine.disk`, `service`, `version`). */id: string;- /** `warn` or `fail`. */+ /** `warn` or `fail`; `info` is a note that is no problem. */level: string;/** One plain sentence. */text: string;@@ -301,6 +315,8 @@ export interface MachinesViewMachine {togglesNote?: string | null;spacesTitle: string;spaces: MachinesViewSpace[];+ /** Its own desktop, when it shares it (above `spaces`; not one of the Spaces counted). */+ desktop?: MachinesViewDesktop | null;spacesEmpty?: string | null;newSpace: MachinesViewNewSpace;detailsTitle: string;diff --git a/apps/cua-spaces-web/src/bridge/contracts/shapes.ts b/apps/cua-spaces-web/src/bridge/contracts/shapes.tsindex 27e0ce8b68..a171073207 100644--- a/apps/cua-spaces-web/src/bridge/contracts/shapes.ts+++ b/apps/cua-spaces-web/src/bridge/contracts/shapes.ts@@ -766,7 +766,7 @@ const MachinesViewShape = ref(id: str,level: str,text: str,- action: optNull(object({ label: str, url: optNull(str), hostAction: optNull(str) })),+ action: optNull(object({ label: str, url: optNull(str), hostAction: optNull(str), appUpdate: opt(bool) })),}),),),@@ -793,6 +793,7 @@ const MachinesViewShape = ref(togglesNote: optNull(str),spacesTitle: str,spaces: list(object({ id: str, name: str, os: str, status: str, running: bool })),+ desktop: optNull(object({ id: str, name: str, os: str, status: str, running: bool, label: str })),spacesEmpty: optNull(str),newSpace: object({ label: str, on: str, enabled: bool, help: optNull(str) }),detailsTitle: str,diff --git a/apps/cua-spaces-web/src/bridge/store.ts b/apps/cua-spaces-web/src/bridge/store.tsindex 2ebf99f0ab..ef5b98697d 100644--- a/apps/cua-spaces-web/src/bridge/store.ts+++ b/apps/cua-spaces-web/src/bridge/store.ts@@ -437,7 +437,11 @@ export class BridgeStore {break;}case "machines": {- if (!this.machinesPinned) this.machineRows = await this.adapter.call("machines.list", {});+ if (!this.machinesPinned) {+ const rows = await this.adapter.call("machines.list", {});+ // Rows shown meanwhile (`showMachines`, parity) must not lose to a listing that was already in flight.+ if (!this.machinesPinned) this.machineRows = rows;+ }this.publishMachines();break;}diff --git a/apps/cua-spaces-web/src/components/shell/update-indicator.tsx b/apps/cua-spaces-web/src/components/shell/update-indicator.tsxindex 65b464df1c..e1ac17aab8 100644--- a/apps/cua-spaces-web/src/components/shell/update-indicator.tsx+++ b/apps/cua-spaces-web/src/components/shell/update-indicator.tsx@@ -18,7 +18,7 @@ import { restartWarning, runsInProgress, updateView, type UpdateView } from "./u* actions. "Restart to update" asks first while an agent is running, and the* host restarts only on this call: nothing here restarts on its own.*/-function useUpdateIndicator() {+export function useUpdateIndicator() {const { data, install } = useUpdate();const { data: agents } = useAgents();const { openExternal } = useSession();@@ -67,7 +67,7 @@ function ProgressRing({ percent }: { percent: number | null }) {);}-function RestartDialog({ ui }: { ui: ReturnType<typeof useUpdateIndicator> }) {+export function RestartDialog({ ui }: { ui: ReturnType<typeof useUpdateIndicator> }) {const w = restartWarning(ui.running);return (<ConfirmDialog open={ui.asking} onOpenChange={ui.setAsking} title={w.title} description={w.description} confirmLabel={w.confirm} cancelLabel={w.cancel} destructive onConfirm={ui.restartNow} />diff --git a/apps/cua-spaces-web/src/routes/machines/index.tsx b/apps/cua-spaces-web/src/routes/machines/index.tsxindex e057690ecb..62f8489e71 100644--- a/apps/cua-spaces-web/src/routes/machines/index.tsx+++ b/apps/cua-spaces-web/src/routes/machines/index.tsx@@ -23,6 +23,7 @@ import { JoinWithCodeDialog } from "@/components/join-with-code-dialog";import { UpsellPrompt } from "@/components/upsell-prompt";import { OsIcon } from "@/components/os-icon";import { EmptyState, Page, PageHeader } from "@/components/page";+import { RestartDialog, useUpdateIndicator } from "@/components/shell/update-indicator";import { ThisMachineExtras } from "@/components/this-machine";import { ConfirmDialog } from "@/components/ui/alert-dialog";import { Button } from "@/components/ui/button";@@ -359,9 +360,12 @@ function MachineDetail({ machine: m, row, onRemoved }: { machine: MachinesViewMa// reached at all (offline), plain with a note when it is.const dim = (t: MachinesViewToggle) => !t.editable && !m.togglesNote;+ // Its shared desktop first, then its Spaces, all drawn as Space rows.+ const rows: { id: string; name: string; os: string; status: string; running: boolean; label?: string }[] = [...(m.desktop ? [m.desktop] : []), ...m.spaces];+// This machine's setup form takes the page while it is open.if (m.current && host.formView) {- return (+ return (<section aria-label={`${m.name} details`} className="min-w-0"><ThisMachineExtras panel={row?.panel ?? null} progress={row?.hostProgress} /></section>@@ -439,7 +443,7 @@ function MachineDetail({ machine: m, row, onRemoved }: { machine: MachinesViewMa<h3 className="mt-7 mb-2 text-xs font-semibold text-muted-foreground">{m.spacesTitle}</h3><div className="overflow-hidden rounded-xl border bg-card" data-machine-spaces>- {m.spaces.map((s, i) => (+ {rows.map((s, i) => (<Linkkey={s.id}to="/spaces/$spaceId"@@ -449,6 +453,7 @@ function MachineDetail({ machine: m, row, onRemoved }: { machine: MachinesViewMaclassName={cn("flex items-center gap-2.5 px-4 py-2.5 text-[13px] outline-none hover:bg-accent/50 focus-visible:bg-accent/60", i > 0 && "border-t")}><span className="truncate font-mono text-xs">{s.name}</span>+ {s.label ? <span className="shrink-0 rounded bg-muted px-1.5 text-2xs text-muted-foreground">{s.label}</span> : null}{s.os ? (<><span className="text-muted-foreground/50">·</span>@@ -462,7 +467,7 @@ function MachineDetail({ machine: m, row, onRemoved }: { machine: MachinesViewMa<ChevronRightIcon className="size-3.5 shrink-0 text-muted-foreground/60" /></Link>))}- {m.spacesEmpty ? <p className="px-4 py-3.5 text-xs text-muted-foreground">{m.spacesEmpty}</p> : null}+ {m.spacesEmpty ? <p className={cn("px-4 py-3.5 text-xs text-muted-foreground", rows.length > 0 && "border-t")}>{m.spacesEmpty}</p> : null}<div className="border-t px-3 py-2.5"><NewSpaceHere machine={m} /></div>@@ -535,9 +540,12 @@ function MachineIssues({ machine: m, hidePermissions, onFail }: { machine: Machiconst { data: session } = useSession();const host = useThisMachine(session?.identity ?? null);const issues = (m.issues ?? []).filter((i) => !(hidePermissions && i.id.startsWith("machine.permissions.")));+ const update = useUpdateIndicator();if (!issues.length) return null;const act = (i: MachinesViewIssue) => {const a = i.action!;+ // Restart into the downloaded Cua Spaces update: the sidebar's own flow, which asks first while an agent is running.+ if (a.appUpdate) return update.restart();const done = a.url ? host.openSettings(a.url) : a.hostAction ? host.run(a.hostAction) : Promise.resolve();void Promise.resolve(done).catch(onFail(`Couldn't ${a.label.charAt(0).toLowerCase()}${a.label.slice(1)}`));};@@ -549,18 +557,21 @@ function MachineIssues({ machine: m, hidePermissions, onFail }: { machine: Machi<div key={i.id} className={cn("flex items-center gap-2.5 px-4 py-2.5", n > 0 && "border-t")} data-machine-issue={i.id} data-level={i.level}>{i.level === "fail" ? (<CircleAlertIcon aria-label="Problem" className="size-3.5 shrink-0 text-destructive" />+ ) : i.level === "info" ? (+ <InfoIcon aria-label="Note" className="size-3.5 shrink-0 text-muted-foreground" />) : (<TriangleAlertIcon aria-label="Warning" className="size-3.5 shrink-0 text-warning" />)}<span className="min-w-0 flex-1 text-[13px]">{i.text}</span>{i.action ? (- <Button size="sm" variant="outline" className="shrink-0" disabled={host.busy} onClick={() => act(i)} data-machine-issue-action={i.id}>+ <Button size="sm" variant="outline" className="shrink-0" disabled={host.busy || (i.action.appUpdate && update.installing)} onClick={() => act(i)} data-machine-issue-action={i.id}>{i.action.label}</Button>) : null}</div>))}</div>+ <RestartDialog ui={update} /></>);}diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/machines.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/machines.jsonindex 899bcf996f..f59f023dda 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/machines.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/machines.json@@ -91,6 +91,7 @@"Ada's MacBook Pro — Online (rename: host)","Provide Spaces: off (runs: provide-spaces)","Share this desktop: on (runs: hide-desktop)",+ "desktop This Mac · macOS · This Mac [Desktop] -> this-mac","space space-cdf71481c4 · macOS 26.5.2 · Running -> local:space-cdf71481c4","space space-1cef393ac1 · Linux · Suspended -> local:space-1cef393ac1","New Space here on local",@@ -102,6 +103,7 @@"Provide Spaces: on (read-only)","Share this desktop: on (read-only)","note: Change this on that Mac.",+ "desktop cua's Mac Studio · macOS 26.5.2 · Running [Desktop] -> relay:studio","space xm-before-linux · Ubuntu 24.04.5 LTS · Running -> relay:studio/xm","New Space here on host:studio","details: OS: macOS 26.5.2; Connection: via Cua relay; Service: Running",@@ -151,7 +153,8 @@"build-mini-01 — Online · Shared by your team","Provide Spaces: on (read-only)","note: Its owner changes this on that Mac.",- "spaces: No Spaces yet.",+ "desktop build-mini-01 · macOS · Running [Desktop] -> relay:team",+ "spaces: No other Spaces yet.","New Space here on host:team","details: OS: macOS; Connection: via Cua relay; Service: Running"]@@ -275,6 +278,7 @@"issues warn: Only 21 GB free. A macOS Space needs about 30 GB. [Free disk space]","Provide Spaces: off (runs: provide-spaces)","Share this desktop: on (runs: hide-desktop)",+ "desktop This Mac · macOS · This Mac [Desktop] -> this-mac","space space-cdf71481c4 · macOS 26.5.2 · Running -> local:space-cdf71481c4","space space-1cef393ac1 · Linux · Suspended -> local:space-1cef393ac1","New Space here on local",@@ -288,6 +292,7 @@"Provide Spaces: on (read-only)","Share this desktop: on (read-only)","note: Change this on that Mac.",+ "desktop cua's Mac Studio · macOS 26.5.2 · Running [Desktop] -> relay:studio","space xm-before-linux · Ubuntu 24.04.5 LTS · Running -> relay:studio/xm","New Space here on host:studio","details: OS: macOS 26.5.2; Connection: via Cua relay; Service: Running",@@ -337,13 +342,224 @@"build-mini-01 — Online · Shared by your team","Provide Spaces: on (read-only)","note: Its owner changes this on that Mac.",- "spaces: No Spaces yet.",+ "desktop build-mini-01 · macOS · Running [Desktop] -> relay:team",+ "spaces: No other Spaces yet.","New Space here on host:team","details: OS: macOS; Connection: via Cua relay; Service: Running"]],"summary": "7 machines, 4 online","view": "the mockup with issues: This Mac's daemon blocked from the Local Network and low on disk, the Mac Studio on an older Cua and short of memory, the offline Mac's old checks hidden"+ },+ {+ "groups": [+ {+ "group": "Your machines",+ "rows": [+ "● Ada's MacBook Pro [This Mac] — 1 Space running [fail]",+ "● cua's Mac Studio — 1 Space running · Provides Spaces [warn]",+ "○ Cua BYOC tests — Offline · last seen 9 days ago",+ "○ Adas-MacBook-Pro-2.local — Not sharing · No Spaces",+ "● Ana's laptop — Online"+ ]+ },+ {+ "group": "Offline for 30+ days (1) (collapsed) · Remove old machines",+ "rows": [+ "○ mac-mini-staging — Offline · last seen 41 days ago"+ ]+ },+ {+ "group": "Team machines",+ "rows": [+ "● build-mini-01 — Ready for Spaces"+ ]+ }+ ],+ "pages": [+ [+ "Ada's MacBook Pro — Online (rename: host)",+ "issues fail: Cua can’t reach this Mac’s macOS Spaces: Local Network access is off for Cua Spaces. [Open Local Network settings]",+ "issues warn: Only 21 GB free. A macOS Space needs about 30 GB. [Free disk space]",+ "Provide Spaces: off (runs: provide-spaces)",+ "Share this desktop: on (runs: hide-desktop)",+ "desktop This Mac · macOS · This Mac [Desktop] -> this-mac",+ "space space-cdf71481c4 · macOS 26.5.2 · Running -> local:space-cdf71481c4",+ "space space-1cef393ac1 · Linux · Suspended -> local:space-1cef393ac1",+ "New Space here on local",+ "details: OS: macOS 26.5.2; App: 0.9.1; Connection: via Cua relay; Service: Running",+ "Remove from account -> host setup"+ ],+ [+ "cua's Mac Studio — Online (rename: machine)",+ "issues warn: Running Spaces use 28 of 32 GB of memory on that Mac, so another may not start.",+ "issues warn: It runs Cua 0.5.0, newer than this Mac’s 0.4.1. Cua Spaces 0.12.2 is ready to install. [Restart to update]",+ "Provide Spaces: on (read-only)",+ "Share this desktop: on (read-only)",+ "note: Change this on that Mac.",+ "desktop cua's Mac Studio · macOS 26.5.2 · Running [Desktop] -> relay:studio",+ "space xm-before-linux · Ubuntu 24.04.5 LTS · Running -> relay:studio/xm",+ "New Space here on host:studio",+ "details: OS: macOS 26.5.2; Connection: via Cua relay; Service: Running",+ "Remove from account -> studio (disabled: It’s online. Remove it on that Mac, or here once it’s offline.)"+ ],+ [+ "Cua BYOC tests — Offline · last seen 9 days ago (rename: machine)",+ "notice: This machine is offline. Open Cua Spaces on it to use it.",+ "Provide Spaces: on (read-only)",+ "Share this desktop: on (read-only)",+ "spaces: No Spaces. The machine is offline.",+ "New Space here on host:byoc (disabled: It’s offline.)",+ "details: OS: macOS; Connection: via Cua relay; Service: Not reachable",+ "Remove from account -> byoc + dev_byoc"+ ],+ [+ "Adas-MacBook-Pro-2.local — Not sharing (rename: machine)",+ "notice: Sharing is off on that Mac. Turn it on there to use it.",+ "Provide Spaces: off (read-only)",+ "Share this desktop: on (read-only)",+ "spaces: No Spaces yet.",+ "New Space here on host:b695 (disabled: It isn’t sharing.)",+ "details: OS: macOS; Connection: via Cua relay; Service: Not sharing",+ "Remove from account -> b695 (disabled: It’s online. Remove it on that Mac, or here once it’s offline.)"+ ],+ [+ "Ana's laptop — Online (rename: device)",+ "Provide Spaces: off (read-only)",+ "Share this desktop: off (read-only)",+ "note: Change this on that PC.",+ "spaces: No Spaces yet.",+ "New Space here on host:dev_lap (disabled: It doesn’t provide Spaces. Turn on Provide Spaces on that PC.)",+ "details: OS: Windows",+ "Remove from account -> dev_lap"+ ],+ [+ "mac-mini-staging — Offline · last seen 41 days ago (rename: machine)",+ "notice: This machine is offline. Open Cua Spaces on it to use it.",+ "Provide Spaces: off (read-only)",+ "Share this desktop: on (read-only)",+ "spaces: No Spaces. The machine is offline.",+ "New Space here on host:old1 (disabled: It’s offline.)",+ "details: OS: macOS; Connection: via Cua relay; Service: Not reachable",+ "Remove from account -> old1 + dev_old1"+ ],+ [+ "build-mini-01 — Online · Shared by your team",+ "Provide Spaces: on (read-only)",+ "note: Its owner changes this on that Mac.",+ "desktop build-mini-01 · macOS · Running [Desktop] -> relay:team",+ "spaces: No other Spaces yet.",+ "New Space here on host:team",+ "details: OS: macOS; Connection: via Cua relay; Service: Running"+ ]+ ],+ "summary": "7 machines, 4 online",+ "view": "the Mac Studio runs a newer Cua and this app has the update downloaded"+ },+ {+ "groups": [+ {+ "group": "Your machines",+ "rows": [+ "● Ada's MacBook Pro [This Mac] — 1 Space running [fail]",+ "● cua's Mac Studio — 1 Space running · Provides Spaces [warn]",+ "○ Cua BYOC tests — Offline · last seen 9 days ago",+ "○ Adas-MacBook-Pro-2.local — Not sharing · No Spaces",+ "● Ana's laptop — Online"+ ]+ },+ {+ "group": "Offline for 30+ days (1) (collapsed) · Remove old machines",+ "rows": [+ "○ mac-mini-staging — Offline · last seen 41 days ago"+ ]+ },+ {+ "group": "Team machines",+ "rows": [+ "● build-mini-01 — Ready for Spaces"+ ]+ }+ ],+ "pages": [+ [+ "Ada's MacBook Pro — Online (rename: host)",+ "issues fail: Cua can’t reach this Mac’s macOS Spaces: Local Network access is off for Cua Spaces. [Open Local Network settings]",+ "issues warn: Only 21 GB free. A macOS Space needs about 30 GB. [Free disk space]",+ "Provide Spaces: off (runs: provide-spaces)",+ "Share this desktop: on (runs: hide-desktop)",+ "desktop This Mac · macOS · This Mac [Desktop] -> this-mac",+ "space space-cdf71481c4 · macOS 26.5.2 · Running -> local:space-cdf71481c4",+ "space space-1cef393ac1 · Linux · Suspended -> local:space-1cef393ac1",+ "New Space here on local",+ "details: OS: macOS 26.5.2; App: 0.9.1; Connection: via Cua relay; Service: Running",+ "Remove from account -> host setup"+ ],+ [+ "cua's Mac Studio — Online (rename: machine)",+ "issues warn: Running Spaces use 28 of 32 GB of memory on that Mac, so another may not start.",+ "issues info: It runs Cua 0.5.0, newer than this Mac’s 0.4.1. Cua Spaces will update this Mac in its next release; there is nothing to install yet.",+ "Provide Spaces: on (read-only)",+ "Share this desktop: on (read-only)",+ "note: Change this on that Mac.",+ "desktop cua's Mac Studio · macOS 26.5.2 · Running [Desktop] -> relay:studio",+ "space xm-before-linux · Ubuntu 24.04.5 LTS · Running -> relay:studio/xm",+ "New Space here on host:studio",+ "details: OS: macOS 26.5.2; Connection: via Cua relay; Service: Running",+ "Remove from account -> studio (disabled: It’s online. Remove it on that Mac, or here once it’s offline.)"+ ],+ [+ "Cua BYOC tests — Offline · last seen 9 days ago (rename: machine)",+ "notice: This machine is offline. Open Cua Spaces on it to use it.",+ "Provide Spaces: on (read-only)",+ "Share this desktop: on (read-only)",+ "spaces: No Spaces. The machine is offline.",+ "New Space here on host:byoc (disabled: It’s offline.)",+ "details: OS: macOS; Connection: via Cua relay; Service: Not reachable",+ "Remove from account -> byoc + dev_byoc"+ ],+ [+ "Adas-MacBook-Pro-2.local — Not sharing (rename: machine)",+ "notice: Sharing is off on that Mac. Turn it on there to use it.",+ "Provide Spaces: off (read-only)",+ "Share this desktop: on (read-only)",+ "spaces: No Spaces yet.",+ "New Space here on host:b695 (disabled: It isn’t sharing.)",+ "details: OS: macOS; Connection: via Cua relay; Service: Not sharing",+ "Remove from account -> b695 (disabled: It’s online. Remove it on that Mac, or here once it’s offline.)"+ ],+ [+ "Ana's laptop — Online (rename: device)",+ "Provide Spaces: off (read-only)",+ "Share this desktop: off (read-only)",+ "note: Change this on that PC.",+ "spaces: No Spaces yet.",+ "New Space here on host:dev_lap (disabled: It doesn’t provide Spaces. Turn on Provide Spaces on that PC.)",+ "details: OS: Windows",+ "Remove from account -> dev_lap"+ ],+ [+ "mac-mini-staging — Offline · last seen 41 days ago (rename: machine)",+ "notice: This machine is offline. Open Cua Spaces on it to use it.",+ "Provide Spaces: off (read-only)",+ "Share this desktop: on (read-only)",+ "spaces: No Spaces. The machine is offline.",+ "New Space here on host:old1 (disabled: It’s offline.)",+ "details: OS: macOS; Connection: via Cua relay; Service: Not reachable",+ "Remove from account -> old1 + dev_old1"+ ],+ [+ "build-mini-01 — Online · Shared by your team",+ "Provide Spaces: on (read-only)",+ "note: Its owner changes this on that Mac.",+ "desktop build-mini-01 · macOS · Running [Desktop] -> relay:team",+ "spaces: No other Spaces yet.",+ "New Space here on host:team",+ "details: OS: macOS; Connection: via Cua relay; Service: Running"+ ]+ ],+ "summary": "7 machines, 4 online",+ "view": "the Mac Studio runs a newer Cua and this app is the newest release"}]}diff --git a/libs/cua/crates/cua-spaces-app-core/parity/machines.json b/libs/cua/crates/cua-spaces-app-core/parity/machines.jsonindex 9c66219d86..76487e2c60 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/machines.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/machines.json@@ -650,6 +650,508 @@}]}+ },+ {+ "name": "the Mac Studio runs a newer Cua and this app has the update downloaded",+ "input": {+ "page": {+ "hostOs": "macos",+ "now": 1800000000,+ "spaces": [+ {+ "name": "This Mac",+ "os": "macos",+ "status": "local",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "this-mac"+ },+ {+ "name": "space-cdf71481c4",+ "os": "macos",+ "status": "running",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "local:space-cdf71481c4",+ "osPrettyName": "macOS 26.5.2",+ "provider": "local"+ },+ {+ "name": "space-1cef393ac1",+ "os": "linux",+ "status": "suspended",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "local:space-1cef393ac1",+ "provider": "local"+ },+ {+ "name": "cua's Mac Studio",+ "os": "macos",+ "status": "running",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:studio",+ "osPrettyName": "macOS 26.5.2",+ "provider": "relay"+ },+ {+ "name": "xm-before-linux",+ "os": "linux",+ "status": "running",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:studio/xm",+ "osPrettyName": "Ubuntu 24.04.5 LTS",+ "provider": "relay",+ "host": "studio",+ "hostName": "cua's Mac Studio"+ },+ {+ "name": "Cua BYOC tests",+ "os": "macos",+ "status": "suspended",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:byoc",+ "provider": "relay"+ },+ {+ "name": "mac-mini-staging",+ "os": "macos",+ "status": "suspended",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:old1",+ "provider": "relay"+ },+ {+ "name": "build-mini-01",+ "os": "macos",+ "status": "running",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:team",+ "provider": "relay"+ },+ {+ "name": "Adas-MacBook-Pro-2.local",+ "os": "macos",+ "status": "suspended",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:b695",+ "provider": "relay",+ "sdk": {+ "features": [],+ "spacesdVersion": "",+ "reachable": false,+ "error": "unauthenticated: Adas-MacBook-Pro-2.local stopped sharing: ask its owner to Resume sharing (or run `cua host start` there)"+ }+ }+ ],+ "devices": [+ {+ "id": "dev_byoc",+ "name": "Cua BYOC tests",+ "platform": "macos",+ "lastSeen": 1799222400,+ "state": "enrolled"+ },+ {+ "id": "dev_old1",+ "name": "mac-mini-staging",+ "platform": "macos",+ "lastSeen": 1796457600,+ "state": "enrolled"+ },+ {+ "id": "dev_lap",+ "name": "Ana's laptop",+ "platform": "windows",+ "lastSeen": 1799999880,+ "state": "enrolled"+ }+ ],+ "hostnames": {},+ "presence": {}+ },+ "relay": [+ {+ "id": "studio",+ "role": "owner",+ "providesSpaces": true+ },+ {+ "id": "byoc",+ "role": "owner",+ "providesSpaces": true+ },+ {+ "id": "old1",+ "role": "owner",+ "providesSpaces": false+ },+ {+ "id": "team",+ "role": "shared",+ "team": "team-1",+ "providesSpaces": true+ },+ {+ "id": "b695",+ "role": "owner",+ "providesSpaces": false+ }+ ],+ "host": {+ "configured": true,+ "mode": "relay",+ "name": "Ada's MacBook Pro",+ "sharing": true,+ "serviceInstalled": true,+ "serviceRunning": true,+ "serviceKind": "launchd",+ "shareDesktop": true,+ "provideSpaces": false+ },+ "about": {+ "computerName": "Ada's MacBook Pro",+ "appVersion": "0.9.1",+ "osVersion": "macOS 26.5.2"+ },+ "health": [+ {+ "id": "this-mac",+ "cuaVersion": "0.4.1",+ "checks": [+ {+ "id": "machine.local_network",+ "status": "fail",+ "message": "Cua can't reach this Mac's macOS VMs (space-cdf71481c4 at 192.168.64.4, No route to host): Local Network access is off for Cua Spaces",+ "facts": {+ "app": "Cua Spaces",+ "app_path": "/Applications/Cua Spaces.app",+ "settings_url": "x-apple.systempreferences:com.apple.preference.security?Privacy_LocalNetwork"+ }+ },+ {+ "id": "machine.disk",+ "status": "warn",+ "message": "only 21 GB free on Macintosh HD; a macOS Space needs about 30 GB",+ "facts": {+ "free_gb": "21",+ "volume": "Macintosh HD",+ "settings_url": "x-apple.systempreferences:com.apple.settings.Storage"+ }+ },+ {+ "id": "machine.virtualization",+ "status": "pass",+ "message": "ready: lume, container"+ }+ ]+ },+ {+ "id": "studio",+ "cuaVersion": "0.5.0",+ "checks": [+ {+ "id": "machine.memory",+ "status": "warn",+ "message": "running Spaces use 28 of 32 GB of memory; another may not start",+ "facts": {+ "used_gb": "28",+ "total_gb": "32"+ }+ },+ {+ "id": "machine.disk",+ "status": "pass",+ "message": "412 GB free on Macintosh HD",+ "facts": {+ "free_gb": "412"+ }+ }+ ]+ },+ {+ "id": "old1",+ "cuaVersion": "0.4.1",+ "checks": [+ {+ "id": "machine.disk",+ "status": "fail",+ "message": "only 3 GB free",+ "facts": {+ "free_gb": "3"+ }+ }+ ]+ }+ ],+ "appUpdate": "0.12.2",+ "appUpdateReady": true+ }+ },+ {+ "name": "the Mac Studio runs a newer Cua and this app is the newest release",+ "input": {+ "page": {+ "hostOs": "macos",+ "now": 1800000000,+ "spaces": [+ {+ "name": "This Mac",+ "os": "macos",+ "status": "local",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "this-mac"+ },+ {+ "name": "space-cdf71481c4",+ "os": "macos",+ "status": "running",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "local:space-cdf71481c4",+ "osPrettyName": "macOS 26.5.2",+ "provider": "local"+ },+ {+ "name": "space-1cef393ac1",+ "os": "linux",+ "status": "suspended",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "local:space-1cef393ac1",+ "provider": "local"+ },+ {+ "name": "cua's Mac Studio",+ "os": "macos",+ "status": "running",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:studio",+ "osPrettyName": "macOS 26.5.2",+ "provider": "relay"+ },+ {+ "name": "xm-before-linux",+ "os": "linux",+ "status": "running",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:studio/xm",+ "osPrettyName": "Ubuntu 24.04.5 LTS",+ "provider": "relay",+ "host": "studio",+ "hostName": "cua's Mac Studio"+ },+ {+ "name": "Cua BYOC tests",+ "os": "macos",+ "status": "suspended",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:byoc",+ "provider": "relay"+ },+ {+ "name": "mac-mini-staging",+ "os": "macos",+ "status": "suspended",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:old1",+ "provider": "relay"+ },+ {+ "name": "build-mini-01",+ "os": "macos",+ "status": "running",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:team",+ "provider": "relay"+ },+ {+ "name": "Adas-MacBook-Pro-2.local",+ "os": "macos",+ "status": "suspended",+ "detail": "",+ "lastUsedAt": 0,+ "scene": "linux-terminal",+ "id": "relay:b695",+ "provider": "relay",+ "sdk": {+ "features": [],+ "spacesdVersion": "",+ "reachable": false,+ "error": "unauthenticated: Adas-MacBook-Pro-2.local stopped sharing: ask its owner to Resume sharing (or run `cua host start` there)"+ }+ }+ ],+ "devices": [+ {+ "id": "dev_byoc",+ "name": "Cua BYOC tests",+ "platform": "macos",+ "lastSeen": 1799222400,+ "state": "enrolled"+ },+ {+ "id": "dev_old1",+ "name": "mac-mini-staging",+ "platform": "macos",+ "lastSeen": 1796457600,+ "state": "enrolled"+ },+ {+ "id": "dev_lap",+ "name": "Ana's laptop",+ "platform": "windows",+ "lastSeen": 1799999880,+ "state": "enrolled"+ }+ ],+ "hostnames": {},+ "presence": {}+ },+ "relay": [+ {+ "id": "studio",+ "role": "owner",+ "providesSpaces": true+ },+ {+ "id": "byoc",+ "role": "owner",+ "providesSpaces": true+ },+ {+ "id": "old1",+ "role": "owner",+ "providesSpaces": false+ },+ {+ "id": "team",+ "role": "shared",+ "team": "team-1",+ "providesSpaces": true+ },+ {+ "id": "b695",+ "role": "owner",+ "providesSpaces": false+ }+ ],+ "host": {+ "configured": true,+ "mode": "relay",+ "name": "Ada's MacBook Pro",+ "sharing": true,+ "serviceInstalled": true,+ "serviceRunning": true,+ "serviceKind": "launchd",+ "shareDesktop": true,+ "provideSpaces": false+ },+ "about": {+ "computerName": "Ada's MacBook Pro",+ "appVersion": "0.9.1",+ "osVersion": "macOS 26.5.2"+ },+ "health": [+ {+ "id": "this-mac",+ "cuaVersion": "0.4.1",+ "checks": [+ {+ "id": "machine.local_network",+ "status": "fail",+ "message": "Cua can't reach this Mac's macOS VMs (space-cdf71481c4 at 192.168.64.4, No route to host): Local Network access is off for Cua Spaces",+ "facts": {+ "app": "Cua Spaces",+ "app_path": "/Applications/Cua Spaces.app",+ "settings_url": "x-apple.systempreferences:com.apple.preference.security?Privacy_LocalNetwork"+ }+ },+ {+ "id": "machine.disk",+ "status": "warn",+ "message": "only 21 GB free on Macintosh HD; a macOS Space needs about 30 GB",+ "facts": {+ "free_gb": "21",+ "volume": "Macintosh HD",+ "settings_url": "x-apple.systempreferences:com.apple.settings.Storage"+ }+ },+ {+ "id": "machine.virtualization",+ "status": "pass",+ "message": "ready: lume, container"+ }+ ]+ },+ {+ "id": "studio",+ "cuaVersion": "0.5.0",+ "checks": [+ {+ "id": "machine.memory",+ "status": "warn",+ "message": "running Spaces use 28 of 32 GB of memory; another may not start",+ "facts": {+ "used_gb": "28",+ "total_gb": "32"+ }+ },+ {+ "id": "machine.disk",+ "status": "pass",+ "message": "412 GB free on Macintosh HD",+ "facts": {+ "free_gb": "412"+ }+ }+ ]+ },+ {+ "id": "old1",+ "cuaVersion": "0.4.1",+ "checks": [+ {+ "id": "machine.disk",+ "status": "fail",+ "message": "only 3 GB free",+ "facts": {+ "free_gb": "3"+ }+ }+ ]+ }+ ]+ }}]}diff --git a/libs/cua/crates/cua-spaces-app-core/src/machines_health.rs b/libs/cua/crates/cua-spaces-app-core/src/machines_health.rsindex e38ad57061..2ea55104c2 100644--- a/libs/cua/crates/cua-spaces-app-core/src/machines_health.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/machines_health.rs@@ -72,6 +72,10 @@ pub struct MachinesViewIssueAction {/// A host action to run (`host.action`).#[serde(default)]pub host_action: Option<HostActionId>,+ /// Restart into the Cua Spaces update this app already downloaded+ /// (the shell's own update flow, the sidebar's "Restart to update").+ #[serde(default)]+ pub app_update: bool,}/// One issue on a machine's page.@@ -80,7 +84,8 @@ pub struct MachinesViewIssueAction {pub struct MachinesViewIssue {/// The check it comes from (`machine.disk`, `service`, `version`).pub id: String,- /// `warn` or `fail`.+ /// `warn` or `fail`; `info` for a note that is no problem (it does not+ /// tint the row's dot).pub level: String,/// One plain sentence.pub text: String,@@ -120,6 +125,9 @@ pub struct Subject<'a> {pub os: &'a str,/// The Cua version This Mac's daemon reported, for the version check.pub local_version: Option<&'a str>,+ /// The Cua Spaces update this Mac's app found: `(version, ready)`, ready+ /// once downloaded. `None` when this app is the newest release.+ pub app_update: Option<(&'a str, bool)>,}/// The issues for one machine (pure). `host` is This Mac's host state,@@ -148,6 +156,7 @@ pub fn issues(label: "Restart service".into(),url: None,host_action: Some(HostActionId::ResumeSharing),+ app_update: false,}),));} else if h.service_running && h.sharing && h.online == Some(false) {@@ -194,6 +203,7 @@ pub fn issues(label: label.into(),url: Some(u.into()),host_action: None,+ app_update: false,})};// This Mac's page already lists its permissions, each with its@@ -260,33 +270,67 @@ pub fn issues(&& let (Some(a), Some(b)) = (minor(local), minor(theirs))&& a != b{- out.push(issue(- "version",- "warn",- if b < a {+ out.push(if b < a {+ issue(+ "version",+ "warn",format!("It runs Cua {theirs}, older than this Mac\u{2019}s {local}. Update Cua on it."- )- } else {- format!(- "It runs Cua {theirs}, newer than this Mac\u{2019}s {local}. Update Cua here."- )- },- None,- ));+ ),+ None,+ )+ } else {+ newer_peer(theirs, local, subject.app_update)+ });}out}-/// `fail` when any issue fails, `warn` when any warns, else empty: the-/// tint of the row's dot.+/// The peer runs a newer Cua than this Mac. Only a Cua Spaces update fixes+/// that here (the app bundles its Cua), so the row offers exactly what+/// exists: the downloaded update to restart into, a download in progress,+/// or, when this app is already the newest release, a plain note.+fn newer_peer(theirs: &str, local: &str, update: Option<(&str, bool)>) -> MachinesViewIssue {+ let head = format!("It runs Cua {theirs}, newer than this Mac\u{2019}s {local}.");+ match update {+ Some((v, true)) => issue(+ "version",+ "warn",+ format!("{head} Cua Spaces {v} is ready to install."),+ Some(MachinesViewIssueAction {+ label: "Restart to update".into(),+ url: None,+ host_action: None,+ app_update: true,+ }),+ ),+ Some((v, false)) => issue(+ "version",+ "warn",+ format!("{head} Cua Spaces {v} is downloading and will update this Mac."),+ None,+ ),+ None => issue(+ "version",+ "info",+ format!(+ "{head} Cua Spaces will update this Mac in its next release; there is nothing \+ to install yet."+ ),+ None,+ ),+ }+}++/// `fail` when any issue fails, `warn` when any warns, else empty (a note+/// does not count): the tint of the row's dot.pub fn health_level(issues: &[MachinesViewIssue]) -> String {if issues.iter().any(|i| i.level == "fail") {"fail".into()- } else if issues.is_empty() {- String::new()- } else {+ } else if issues.iter().any(|i| i.level == "warn") {"warn".into()+ } else {+ String::new()}}@@ -355,12 +399,14 @@ mod tests {live: true,os: "macos",local_version: Some("0.4.1"),+ app_update: None,};const OTHER: Subject<'static> = Subject {current: false,live: true,os: "macos",local_version: Some("0.4.1"),+ app_update: None,};#[test]@@ -514,6 +560,38 @@ mod tests {);}+ #[test]+ fn a_newer_peer_offers_only_the_update_that_exists() {+ let h = health(vec![], "0.5.0");+ // This app is the newest release: a plain note, no warning, no button.+ let i = issues(&OTHER, Some(&h), None);+ assert_eq!((i[0].id.as_str(), i[0].level.as_str()), ("version", "info"));+ assert!(i[0].action.is_none());+ assert!(!i[0].text.contains("Update Cua here"));+ assert_eq!(health_level(&i), "");+ // The update is downloading: a warning, no button yet.+ let downloading = Subject {+ app_update: Some(("0.12.2", false)),+ ..OTHER+ };+ let i = issues(&downloading, Some(&h), None);+ assert_eq!(i[0].level, "warn");+ assert!(i[0].action.is_none());+ assert_eq!(health_level(&i), "warn");+ // Downloaded: "Restart to update".+ let ready = Subject {+ app_update: Some(("0.12.2", true)),+ ..OTHER+ };+ let i = issues(&ready, Some(&h), None);+ let a = i[0].action.as_ref().unwrap();+ assert_eq!(+ (a.label.as_str(), a.app_update),+ ("Restart to update", true)+ );+ assert!(i[0].text.contains("Cua Spaces 0.12.2"));+ }+#[test]fn only_online_owned_machines_are_checked() {assert_eq!(diff --git a/libs/cua/crates/cua-spaces-app-core/src/machines_view.rs b/libs/cua/crates/cua-spaces-app-core/src/machines_view.rsindex 5224f508af..eef92b5dcf 100644--- a/libs/cua/crates/cua-spaces-app-core/src/machines_view.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/machines_view.rs@@ -89,6 +89,13 @@ pub struct MachinesViewInput {/// ([`crate::machines_health`]).#[serde(default)]pub health: Vec<MachinesViewHealth>,+ /// The Cua Spaces update this app found (its version); empty when this+ /// app is the newest release.+ #[serde(default)]+ pub app_update: String,+ /// That update is downloaded and ready to restart into.+ #[serde(default)]+ pub app_update_ready: bool,}/// One of the two switches on a machine's page.@@ -132,6 +139,27 @@ pub struct MachinesViewSpace {pub running: bool,}+/// A machine's own desktop, listed first under "Spaces on this machine"+/// when it shares it, as any Space row (its name, system, status), with a+/// quiet "Desktop" label. It is not one of the Spaces counted (the sidebar+/// and the machine's line leave it out).+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct MachinesViewDesktop {+ /// The Space's id (its page).+ pub id: String,+ /// Its name, as the Spaces list names it.+ pub name: String,+ /// Its system ("Ubuntu 24.04.5 LTS", "macOS").+ pub os: String,+ /// Its status word ("Running", "Stopped").+ pub status: String,+ /// Running (the green dot).+ pub running: bool,+ /// "Desktop".+ pub label: String,+}+/// New Space here: the wizard with this machine chosen.#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]#[serde(rename_all = "camelCase")]@@ -255,6 +283,9 @@ pub struct MachinesViewMachine {pub spaces_title: String,/// The Spaces on it.pub spaces: Vec<MachinesViewSpace>,+ /// Its own desktop, when it shares it (shown above `spaces`).+ #[serde(default)]+ pub desktop: Option<MachinesViewDesktop>,/// When it has none.#[serde(default)]pub spaces_empty: Option<String>,@@ -310,6 +341,8 @@ pub struct MachinesView {pub machines: Vec<MachinesViewMachine>,}+/// The quiet label on a machine's own desktop among its Spaces.+pub const DESKTOP_LABEL: &str = "Desktop";/// "Your machines".pub const YOURS_TITLE: &str = "Your machines";/// "Team machines".@@ -598,6 +631,17 @@ pub fn view(input: &MachinesViewInput) -> MachinesView {}};let live = row.online && !row.stopped_sharing;+ let desktop = own_space+ .filter(|_| live && sw.share)+ .map(|s| MachinesViewDesktop {+ id: s.id.clone(),+ name: s.name.clone(),+ os: space_os(s),+ status: crate::spaces::sidebar::status_text(s),+ running: running(s),+ label: DESKTOP_LABEL.into(),+ });+ let has_desktop = desktop.is_some();let name = if row.current {host.and_then(|s| s.name.clone()).filter(|n| s_nonempty(n))@@ -875,6 +919,9 @@ pub fn view(input: &MachinesViewInput) -> MachinesView {live: row.current || live,os: &row.os,local_version,+ app_update: Some(input.app_update.as_str())+ .filter(|v| !v.is_empty())+ .map(|v| (v, input.app_update_ready)),},input.health.iter().find(|h| h.id == row.id),host.filter(|_| row.current),@@ -907,8 +954,11 @@ pub fn view(input: &MachinesViewInput) -> MachinesView {toggles,toggles_note,spaces_title: "Spaces on this machine".into(),+ desktop,spaces_empty: on.is_empty().then(|| {- if row.online {+ if row.online && has_desktop {+ "No other Spaces yet.".into()+ } else if row.online {"No Spaces yet.".into()} else {"No Spaces. The machine is offline.".into()@@ -1065,6 +1115,8 @@ mod tests {fn mockup() -> MachinesViewInput {MachinesViewInput {health: vec![],+ app_update: String::new(),+ app_update_ready: false,page: MachinesPageInput {spaces: vec![space(@@ -1127,6 +1179,8 @@ mod tests {let rows = machines::page_rows(&input.page);let given = view(&MachinesViewInput {health: vec![],+ app_update: String::new(),+ app_update_ready: false,rows: Some(rows),..input.clone()});@@ -1312,6 +1366,33 @@ mod tests {assert!(by_id(&v, "team").new_space.enabled);}+ /// A machine that shares its desktop lists it first, with Open; one+ /// that does not, or is offline, shows no row. The desktop is not one of+ /// the Spaces counted: the machine's line and Space list leave it out.+ #[test]+ fn a_shared_desktop_is_the_first_row_and_is_not_counted() {+ let v = view(&mockup());+ let studio = by_id(&v, "studio");+ let d = studio.desktop.as_ref().unwrap();+ assert_eq!(+ (d.id.as_str(), d.label.as_str()),+ ("relay:studio", "Desktop")+ );+ assert!(!d.name.is_empty() && !d.status.is_empty());+ assert!(studio.spaces.iter().all(|s| s.id != d.id));+ assert!(studio.line.contains("1 Space"), "{}", studio.line);+ // Offline machines show none.+ assert!(by_id(&v, "byoc").desktop.is_none());+ // With no provided Spaces the empty line says "other".+ if let Some(m) = v+ .machines+ .iter()+ .find(|m| m.desktop.is_some() && m.spaces.is_empty() && m.online)+ {+ assert_eq!(m.spaces_empty.as_deref(), Some("No other Spaces yet."));+ }+ }+#[test]fn details_and_remove_from_account() {let v = view(&mockup());@@ -1378,6 +1459,8 @@ mod tests {fn a_machine_that_stopped_sharing_reads_not_sharing_no_spaces() {let input = MachinesViewInput {health: vec![],+ app_update: String::new(),+ app_update_ready: false,page: MachinesPageInput {spaces: vec![space(serde_json::json!({"id": "relay:b695", "name": "Adas-MacBook-Pro-2.local", "os": "macos",diff --git a/libs/cua/crates/cua-spaces-app-core/src/parity.rs b/libs/cua/crates/cua-spaces-app-core/src/parity.rsindex 0b5f0c9b74..617d37c9ef 100644--- a/libs/cua/crates/cua-spaces-app-core/src/parity.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/parity.rs@@ -3118,6 +3118,17 @@ fn view_frame(name: &Value, v: &Value) -> Value {if let Some(n) = m["togglesNote"].as_str() {lines.push(format!("note: {n}"));}+ if let Some(d) = m["desktop"].as_object() {+ let d = |k: &str| d.get(k).and_then(Value::as_str).unwrap_or("");+ lines.push(format!(+ "desktop {} \u{b7} {} \u{b7} {} [{}] -> {}",+ d("name"),+ d("os"),+ d("status"),+ d("label"),+ d("id")+ ));+ }for s in m["spaces"].as_array().into_iter().flatten() {lines.push(format!("space {} \u{b7} {} \u{b7} {} -> {}",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 26a79d2de7..5b286b9cdb 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@@ -9477,6 +9477,9 @@ pub struct AppMachinesViewIssueAction {pub url: Option<String>,/// A host action to run (`host.action`).pub host_action: Option<AppHostActionId>,+ /// Restart into the Cua Spaces update this app already downloaded+ /// (the shell's own update flow, the sidebar's "Restart to update").+ pub app_update: bool,}/// One issue on a machine's page.@@ -9485,7 +9488,8 @@ pub type AppMachinesViewIssue = core::machines_health::MachinesViewIssue;pub struct AppMachinesViewIssue {/// The check it comes from (`machine.disk`, `service`, `version`).pub id: String,- /// `warn` or `fail`.+ /// `warn` or `fail`; `info` for a note that is no problem (it does not+ /// tint the row's dot).pub level: String,/// One plain sentence.pub text: String,@@ -9541,6 +9545,11 @@ pub struct AppMachinesViewInput {/// the machines whose `health_target` the shell checked/// ([`crate::machines_health`]).pub health: Vec<AppMachinesViewHealth>,+ /// The Cua Spaces update this app found (its version); empty when this+ /// app is the newest release.+ pub app_update: String,+ /// That update is downloaded and ready to restart into.+ pub app_update_ready: bool,}/// One of the two switches on a machine's page.@@ -9582,6 +9591,27 @@ pub struct AppMachinesViewSpace {pub running: bool,}+/// A machine's own desktop, listed first under "Spaces on this machine"+/// when it shares it, as any Space row (its name, system, status), with a+/// quiet "Desktop" label. It is not one of the Spaces counted (the sidebar+/// and the machine's line leave it out).+pub type AppMachinesViewDesktop = core::machines_view::MachinesViewDesktop;+#[uniffi::remote(Record)]+pub struct AppMachinesViewDesktop {+ /// The Space's id (its page).+ pub id: String,+ /// Its name, as the Spaces list names it.+ pub name: String,+ /// Its system ("Ubuntu 24.04.5 LTS", "macOS").+ pub os: String,+ /// Its status word ("Running", "Stopped").+ pub status: String,+ /// Running (the green dot).+ pub running: bool,+ /// "Desktop".+ pub label: String,+}+/// New Space here: the wizard with this machine chosen.pub type AppMachinesViewNewSpace = core::machines_view::MachinesViewNewSpace;#[uniffi::remote(Record)]@@ -9691,6 +9721,8 @@ pub struct AppMachinesViewMachine {pub spaces_title: String,/// The Spaces on it.pub spaces: Vec<AppMachinesViewSpace>,+ /// Its own desktop, when it shares it (shown above `spaces`).+ pub desktop: Option<AppMachinesViewDesktop>,/// When it has none.pub spaces_empty: Option<String>,/// New Space here.diff --git a/libs/cua/scripts/generate-app-core-ffi.py b/libs/cua/scripts/generate-app-core-ffi.pyindex b0588cd623..8cf3269bf8 100644--- a/libs/cua/scripts/generate-app-core-ffi.py+++ b/libs/cua/scripts/generate-app-core-ffi.py@@ -68,7 +68,7 @@ TYPES = [("telemetry.rs", "telemetry", ["TelemetrySignal"]),("machines.rs", "machines", ["DeviceIn", "MachinesPageInput", "MachinePageRow"]),("machines_health.rs", "machines_health", ["MachinesViewCheck", "MachinesViewHealth", "MachinesViewIssueAction", "MachinesViewIssue"]),- ("machines_view.rs", "machines_view", ["MachinesViewRelay", "MachinesViewAbout", "MachinesViewInput", "MachinesViewToggle", "MachinesViewSpace", "MachinesViewNewSpace", "MachinesViewRename", "MachinesViewRemove", "MachinesViewFact", "MachinesViewMachine", "MachinesViewRemoveAll", "MachinesViewGroup", "MachinesView"]),+ ("machines_view.rs", "machines_view", ["MachinesViewRelay", "MachinesViewAbout", "MachinesViewInput", "MachinesViewToggle", "MachinesViewSpace", "MachinesViewDesktop", "MachinesViewNewSpace", "MachinesViewRename", "MachinesViewRemove", "MachinesViewFact", "MachinesViewMachine", "MachinesViewRemoveAll", "MachinesViewGroup", "MachinesView"]),("checklist.rs", "checklist", ["ChecklistStep", "ChecklistState", "ChecklistAction", "ChecklistSeen", "ChecklistTransition", "ChecklistRow", "ChecklistView"]),("palette.rs", "palette", ["Keybinding", "PaletteEntry"]),("teams.rs", "teams", ["TeamPersonInput", "TeamInput", "TeamsState", "TeamsInput"]),diff --git a/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift b/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swiftindex 660e5efb23..7616b4e42b 100644--- a/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift+++ b/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift@@ -19890,6 +19890,112 @@ public func FfiConverterTypeAppMachinesViewCheck_lower(_ value: AppMachinesViewC}+public struct AppMachinesViewDesktop: Equatable, Hashable {+ /**+ * The Space's id (its page).+ */+ public var id: String+ /**+ * Its name, as the Spaces list names it.+ */+ public var name: String+ /**+ * Its system ("Ubuntu 24.04.5 LTS", "macOS").+ */+ public var os: String+ /**+ * Its status word ("Running", "Stopped").+ */+ public var status: String+ /**+ * Running (the green dot).+ */+ public var running: Bool+ /**+ * "Desktop".+ */+ public var label: String++ // Default memberwise initializers are never public by default, so we+ // declare one manually.+ public init(+ /**+ * The Space's id (its page).+ */id: String,+ /**+ * Its name, as the Spaces list names it.+ */name: String,+ /**+ * Its system ("Ubuntu 24.04.5 LTS", "macOS").+ */os: String,+ /**+ * Its status word ("Running", "Stopped").+ */status: String,+ /**+ * Running (the green dot).+ */running: Bool,+ /**+ * "Desktop".+ */label: String) {+ self.id = id+ self.name = name+ self.os = os+ self.status = status+ self.running = running+ self.label = label+ }+++++}++#if compiler(>=6)+extension AppMachinesViewDesktop: Sendable {}+#endif++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public struct FfiConverterTypeAppMachinesViewDesktop: FfiConverterRustBuffer {+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AppMachinesViewDesktop {+ return+ try AppMachinesViewDesktop(+ id: FfiConverterString.read(from: &buf),+ name: FfiConverterString.read(from: &buf),+ os: FfiConverterString.read(from: &buf),+ status: FfiConverterString.read(from: &buf),+ running: FfiConverterBool.read(from: &buf),+ label: FfiConverterString.read(from: &buf)+ )+ }++ public static func write(_ value: AppMachinesViewDesktop, into buf: inout [UInt8]) {+ FfiConverterString.write(value.id, into: &buf)+ FfiConverterString.write(value.name, into: &buf)+ FfiConverterString.write(value.os, into: &buf)+ FfiConverterString.write(value.status, into: &buf)+ FfiConverterBool.write(value.running, into: &buf)+ FfiConverterString.write(value.label, into: &buf)+ }+}+++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeAppMachinesViewDesktop_lift(_ buf: RustBuffer) throws -> AppMachinesViewDesktop {+ return try FfiConverterTypeAppMachinesViewDesktop.lift(buf)+}++#if swift(>=5.8)+@_documentation(visibility: private)+#endif+public func FfiConverterTypeAppMachinesViewDesktop_lower(_ value: AppMachinesViewDesktop) -> RustBuffer {+ return FfiConverterTypeAppMachinesViewDesktop.lower(value)+}++public struct AppMachinesViewFact: Equatable, Hashable {/*** "OS", "App", "Connection", "Service".@@ -20166,6 +20272,15 @@ public struct AppMachinesViewInput: Equatable, Hashable {* ([`crate::machines_health`]).*/public var health: [AppMachinesViewHealth]+ /**+ * The Cua Spaces update this app found (its version); empty when this+ * app is the newest release.+ */+ public var appUpdate: String+ /**+ * That update is downloaded and ready to restart into.+ */+ public var appUpdateReady: Bool// Default memberwise initializers are never public by default, so we// declare one manually.@@ -20190,13 +20305,22 @@ public struct AppMachinesViewInput: Equatable, Hashable {* What each machine's daemon reported of its health, by row id, for* the machines whose `health_target` the shell checked* ([`crate::machines_health`]).- */health: [AppMachinesViewHealth]) {+ */health: [AppMachinesViewHealth],+ /**+ * The Cua Spaces update this app found (its version); empty when this+ * app is the newest release.+ */appUpdate: String,+ /**+ * That update is downloaded and ready to restart into.+ */appUpdateReady: Bool) {self.page = pageself.relay = relayself.host = hostself.about = aboutself.rows = rowsself.health = health+ self.appUpdate = appUpdate+ self.appUpdateReady = appUpdateReady}@@ -20220,7 +20344,9 @@ public struct FfiConverterTypeAppMachinesViewInput: FfiConverterRustBuffer {host: FfiConverterOptionTypeAppHostState.read(from: &buf),about: FfiConverterTypeAppMachinesViewAbout.read(from: &buf),rows: FfiConverterOptionSequenceTypeAppMachinePageRow.read(from: &buf),- health: FfiConverterSequenceTypeAppMachinesViewHealth.read(from: &buf)+ health: FfiConverterSequenceTypeAppMachinesViewHealth.read(from: &buf),+ appUpdate: FfiConverterString.read(from: &buf),+ appUpdateReady: FfiConverterBool.read(from: &buf))}@@ -20231,6 +20357,8 @@ public struct FfiConverterTypeAppMachinesViewInput: FfiConverterRustBuffer {FfiConverterTypeAppMachinesViewAbout.write(value.about, into: &buf)FfiConverterOptionSequenceTypeAppMachinePageRow.write(value.rows, into: &buf)FfiConverterSequenceTypeAppMachinesViewHealth.write(value.health, into: &buf)+ FfiConverterString.write(value.appUpdate, into: &buf)+ FfiConverterBool.write(value.appUpdateReady, into: &buf)}}@@ -20256,7 +20384,8 @@ public struct AppMachinesViewIssue: Equatable, Hashable {*/public var id: String/**- * `warn` or `fail`.+ * `warn` or `fail`; `info` for a note that is no problem (it does not+ * tint the row's dot).*/public var level: String/**@@ -20275,7 +20404,8 @@ public struct AppMachinesViewIssue: Equatable, Hashable {* The check it comes from (`machine.disk`, `service`, `version`).*/id: String,/**- * `warn` or `fail`.+ * `warn` or `fail`; `info` for a note that is no problem (it does not+ * tint the row's dot).*/level: String,/*** One plain sentence.@@ -20349,6 +20479,11 @@ public struct AppMachinesViewIssueAction: Equatable, Hashable {* A host action to run (`host.action`).*/public var hostAction: AppHostActionId?+ /**+ * Restart into the Cua Spaces update this app already downloaded+ * (the shell's own update flow, the sidebar's "Restart to update").+ */+ public var appUpdate: Bool// Default memberwise initializers are never public by default, so we// declare one manually.@@ -20361,10 +20496,15 @@ public struct AppMachinesViewIssueAction: Equatable, Hashable {*/url: String?,/*** A host action to run (`host.action`).- */hostAction: AppHostActionId?) {+ */hostAction: AppHostActionId?,+ /**+ * Restart into the Cua Spaces update this app already downloaded+ * (the shell's own update flow, the sidebar's "Restart to update").+ */appUpdate: Bool) {self.label = labelself.url = urlself.hostAction = hostAction+ self.appUpdate = appUpdate}@@ -20385,7 +20525,8 @@ public struct FfiConverterTypeAppMachinesViewIssueAction: FfiConverterRustBuffertry AppMachinesViewIssueAction(label: FfiConverterString.read(from: &buf),url: FfiConverterOptionString.read(from: &buf),- hostAction: FfiConverterOptionTypeAppHostActionId.read(from: &buf)+ hostAction: FfiConverterOptionTypeAppHostActionId.read(from: &buf),+ appUpdate: FfiConverterBool.read(from: &buf))}@@ -20393,6 +20534,7 @@ public struct FfiConverterTypeAppMachinesViewIssueAction: FfiConverterRustBufferFfiConverterString.write(value.label, into: &buf)FfiConverterOptionString.write(value.url, into: &buf)FfiConverterOptionTypeAppHostActionId.write(value.hostAction, into: &buf)+ FfiConverterBool.write(value.appUpdate, into: &buf)}}@@ -20501,6 +20643,10 @@ public struct AppMachinesViewMachine: Equatable, Hashable {* The Spaces on it.*/public var spaces: [AppMachinesViewSpace]+ /**+ * Its own desktop, when it shares it (shown above `spaces`).+ */+ public var desktop: AppMachinesViewDesktop?/*** When it has none.*/@@ -20592,6 +20738,9 @@ public struct AppMachinesViewMachine: Equatable, Hashable {/*** The Spaces on it.*/spaces: [AppMachinesViewSpace],+ /**+ * Its own desktop, when it shares it (shown above `spaces`).+ */desktop: AppMachinesViewDesktop?,/*** When it has none.*/spacesEmpty: String?,@@ -20628,6 +20777,7 @@ public struct AppMachinesViewMachine: Equatable, Hashable {self.togglesNote = togglesNoteself.spacesTitle = spacesTitleself.spaces = spaces+ self.desktop = desktopself.spacesEmpty = spacesEmptyself.newSpace = newSpaceself.detailsTitle = detailsTitle@@ -20672,6 +20822,7 @@ public struct FfiConverterTypeAppMachinesViewMachine: FfiConverterRustBuffer {togglesNote: FfiConverterOptionString.read(from: &buf),spacesTitle: FfiConverterString.read(from: &buf),spaces: FfiConverterSequenceTypeAppMachinesViewSpace.read(from: &buf),+ desktop: FfiConverterOptionTypeAppMachinesViewDesktop.read(from: &buf),spacesEmpty: FfiConverterOptionString.read(from: &buf),newSpace: FfiConverterTypeAppMachinesViewNewSpace.read(from: &buf),detailsTitle: FfiConverterString.read(from: &buf),@@ -20702,6 +20853,7 @@ public struct FfiConverterTypeAppMachinesViewMachine: FfiConverterRustBuffer {FfiConverterOptionString.write(value.togglesNote, into: &buf)FfiConverterString.write(value.spacesTitle, into: &buf)FfiConverterSequenceTypeAppMachinesViewSpace.write(value.spaces, into: &buf)+ FfiConverterOptionTypeAppMachinesViewDesktop.write(value.desktop, into: &buf)FfiConverterOptionString.write(value.spacesEmpty, into: &buf)FfiConverterTypeAppMachinesViewNewSpace.write(value.newSpace, into: &buf)FfiConverterString.write(value.detailsTitle, into: &buf)@@ -62726,6 +62878,30 @@ fileprivate struct FfiConverterOptionTypeAppMachineAccessNotice: FfiConverterRus}}+#if swift(>=5.8)+@_documentation(visibility: private)+#endif+fileprivate struct FfiConverterOptionTypeAppMachinesViewDesktop: FfiConverterRustBuffer {+ typealias SwiftType = AppMachinesViewDesktop?++ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {+ guard let value = value else {+ writeInt(&buf, Int8(0))+ return+ }+ writeInt(&buf, Int8(1))+ FfiConverterTypeAppMachinesViewDesktop.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 FfiConverterTypeAppMachinesViewDesktop.read(from: &buf)+ default: throw UniffiInternalError.unexpectedOptionalTag+ }+ }+}+#if swift(>=5.8)@_documentation(visibility: private)#endif