Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(spaces-macos): drop the New Space button beside a machine's not-sharing note (#4565)

ddupont2400bbefdb9a
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift
index c7d9d8faf2..3c4e79e2a6 100644
--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift
+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift
@@ -402,8 +402,7 @@ public final class AppModel {
// MARK: - New Space
- /// New Space with "Run on" set to `on` (`host:<machine>`): a machine's
- /// "New Space on <name>…".
+ /// New Space with "Run on" set to `on` (`host:<machine>`).
public func openNewSpace(on: String) async {
await openNewSpace()
wizard.send(.choosePlacement(on: on))
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/SpaceDetailView.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/SpaceDetailView.swift
index dfc8b04236..3e78b689be 100644
--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/SpaceDetailView.swift
+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/SpaceDetailView.swift
@@ -377,8 +377,8 @@ struct SpaceDetailView: View {
}
/// One of your machines that does not share its desktop: the core's line
-/// in place of the desktop (with "New Space on <name>…" when it provides
-/// Spaces), then the Spaces it provides. No Stream, Agents or Teleport.
+/// in place of the desktop, then the Spaces it provides. No Stream, Agents
+/// or Teleport.
struct DesktopNotSharedSections: View {
let model: AppModel
let machineId: String
@@ -387,17 +387,10 @@ struct DesktopNotSharedSections: View {
var body: some View {
Section {
- HStack(alignment: .firstTextBaseline, spacing: 12) {
- Text(note)
- .foregroundStyle(.secondary)
- .fixedSize(horizontal: false, vertical: true)
- .accessibilityIdentifier("machine-desktop-note")
- Spacer(minLength: 8)
- if let newSpace {
- Button(newSpace.label) { Task { await model.openNewSpace(on: newSpace.on) } }
- .accessibilityIdentifier("machine-new-space")
- }
- }
+ Text(note)
+ .foregroundStyle(.secondary)
+ .fixedSize(horizontal: false, vertical: true)
+ .accessibilityIdentifier("machine-desktop-note")
}
if newSpace != nil {
Section("Spaces") {
diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/MachineAccessTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/MachineAccessTests.swift
index 3c58a0e586..e1305d19a9 100644
--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/MachineAccessTests.swift
+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/MachineAccessTests.swift
@@ -255,8 +255,8 @@ struct MachineAccessTests {
}
}
- /// Desktop shared (its live card), not shared with Spaces on (the note,
- /// New Space on it, its Spaces), and both off (the note alone).
+ /// Desktop shared (its live card), not shared with Spaces on (the note
+ /// and its Spaces), and both off (the note alone).
@Test func desktopSnapshots() async throws {
let size = CGSize(width: 560, height: 440)
let snap = SnapshotTests()
diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/machine-desktop-not-shared.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/machine-desktop-not-shared.png
index e0304b5055..f381f81d77 100644
Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/machine-desktop-not-shared.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/machine-desktop-not-shared.png differ