Watch: notification switches, a model list and Ask before acting on new threads, and Ask before acting on a thread

This commit is contained in:
gib committed 2026-11-02 12:10:48 -05:00
1 parent 3cc7e40852
commit 6bc9cac6ca
14 files changed
+623 -81

No files matched your search

+21
View File
@@ -73,6 +73,27 @@ struct SnapshotTests {
try write(titled("Thread", ThreadView(hostId: "laptop", threadId: "t-status", detail: detail, scrolls: false)), "thread-settle.png")
}
@Test func runningThreadWithAskFirst() async throws {
let detail = try await DemoGateway().thread(hostId: "mac-mini", threadId: "t-scaffold")
try write(titled("Thread", ThreadView(hostId: "mac-mini", threadId: "t-scaffold", detail: detail, scrolls: false)), "thread.png")
}
@Test func newThreadAndAgentList() async throws {
let projects = try await DemoGateway().projects()
// The demo opens on Mac mini › wristcode, with Ask before acting on as the mock shows it.
UserDefaults.standard.removeObject(forKey: "lastModels")
UserDefaults.standard.set(true, forKey: "askFirst")
defer { UserDefaults.standard.removeObject(forKey: "askFirst") }
try write(titled("New thread", NewThreadView(projects: projects, scrolls: false)), "new-thread.png")
let host = try #require(projects.hosts.first)
let project = try #require(host.projects.first)
let list = AgentList(
providers: host.providers, selected: project.defaultModel, defaultInstanceId: project.instanceId,
scrolls: false) { _ in }
try write(titled("Agent", list), "agent-list.png")
}
@Test func statusScreens() async throws {
let status = try await DemoGateway().status()
try write(titled("Status", StatusView(status: status, scrolls: false)), "status.png")