Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ in the workspace directory:
its tile, workspace page, viewer toolbar and sidebar row show the machine's name
with a computer icon (VoiceOver: "Running on <machine>"),
with the placement reason as hover text. Local devices show no placement label. The
same views label EAS Simulator sessions **EAS**. The
menus offer the platforms `stim status` reports in `platforms`, plus any
with a device or a last build; an older `stim` that does not report them
offers the used ones, or iOS and Android when none is recorded. Run is disabled while a build runs in the workspace.
Expand Down
3 changes: 3 additions & 0 deletions apps/desktop/Sources/StimKit/DeviceRef.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public enum DeviceRef: Hashable, Identifiable, Sendable {
}

public var placement: DevicePlacementLabel? {
if case .remote(let device) = self, device.backend == "eas" {
return DevicePlacementLabel(machine: "EAS", reason: nil)
}
guard let machine = hostedMachine else { return nil }
let reason: String?
let selected: String?
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/Tests/StimKitTests/StimKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Testing
return payload.environments[0]
}()

@Test func placementLabelsDescribeOnlyHostedDevices() throws {
@Test func placementLabelsDescribeHostedAndEasDevices() throws {
let url = try #require(Bundle.module.url(forResource: "status-placement", withExtension: "json", subdirectory: "Fixtures"))
let payload = try JSONDecoder().decode(StatusPayload.self, from: Data(contentsOf: url))
let hosted = payload.environments[0]
Expand All @@ -27,7 +27,7 @@ import Testing
#expect(local.ios?.devicePlacement?.decision == "local")
#expect(local.android?.devicePlacement?.decision == "waited-locally")
#expect(local.devices.allSatisfy { $0.placement == nil })
#expect(workspace.devices.allSatisfy { $0.placement == nil })
#expect(workspace.devices.map(\.placement) == [nil, nil, nil, DevicePlacementLabel(machine: "EAS", reason: nil)])
#expect(workspace.ios?.host?.selected == nil)
#expect(workspace.ios?.devicePlacement == nil)
}
Expand Down
2 changes: 2 additions & 0 deletions apps/desktop/Tests/StimKitTests/WorkspaceViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ private let booted = #"{"name":"stim-w (iPhone 18 27.0)","udid":"SIM-1","owned":
]
#expect(idle.orderedDevices.map(\.id) == order)
#expect(driven.orderedDevices.map(\.id) == order)
#expect(idle.orderedDevices.first(where: { $0.id == "remote:S" })?.placement?.machine == "EAS")
#expect(idle.orderedDevices.first?.placement == nil)
}
}

Expand Down
1 change: 1 addition & 0 deletions website/docs/desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Desktop passes no `--remote` flag for new iOS and Android runs, so the project's
settings apply. Recorded hosted sessions stay fixed until `stim stop`.
When a device is not on this Mac, its tile, workspace page, viewer toolbar and
sidebar row show the machine's name with a computer icon, with the placement reason as hover text.
EAS Simulator sessions show an **EAS** placement label in those views.
Local devices show no placement label. See [iOS on an approved Mac](./owned-devices#run-ios-on-another-mac).

Desktop runs no login shell. It finds Node, the `stim` CLI, Homebrew, the
Expand Down
Loading