Watch: snooze finished threads, name the files a file approval would edit, Settle on finished notifications, an instant launch from the saved feed, plain Loading states, and no more cancelled errors
Gateway / check (push) Successful in 9s
Gateway / image (push) Successful in 22s

Gateway: an approval push for a file change says which files it would edit
This commit is contained in:
gib committed 2026-11-02 14:45:34 -05:00
1 parent 4dc4e57dac
commit edc4b88990
35 files changed
+1162 -144

No files matched your search

+34
View File
@@ -179,6 +179,40 @@ struct SnapshotTests {
try write(titled("Notifications", NotificationsView(status: status, result: result, scrolls: false)), "status-notifications.png")
}
@Test func snooze() async throws {
let feed = try await DemoGateway().feed()
let item = try #require(feed.recent.first)
// 2 PM today, before This evening drops out, so all four choices show.
let afternoon = try #require(Calendar.current.date(bySettingHour: 14, minute: 0, second: 0, of: .now))
try write(titled("Snooze until", SnoozePicker(item: item, now: afternoon, scrolls: false)), "snooze-picker.png")
// The preview model has the demo's snoozed threads loaded.
try write(titled("Snoozed", SnoozedView(scrolls: false)), "snoozed.png")
try write(feedColumn {
RecentHeader(recent: feed.recent, more: feed.moreRecent)
ForEach(feed.recent.suffix(2)) { StatusCard(item: $0) }
MoreRecentRow(count: feed.moreRecent)
SnoozedRow(count: feed.snoozedTotal)
}, "feed-snoozed.png")
}
@Test func fileApprovals() async throws {
let gateway = DemoGateway()
let feed = try await gateway.feed()
let files = feed.needsYou.filter { $0.request?.fileEdit != nil }
#expect(files.count == 2)
try write(feedColumn { ForEach(files) { NeedsYouCard(item: $0) } }, "approval-file.png")
let detail = try await gateway.thread(hostId: "server-gib", threadId: "t-compose")
try write(titled("Thread", ThreadView(hostId: "server-gib", threadId: "t-compose", detail: detail, scrolls: false)), "thread-approval-file.png")
}
@Test func cachedFeed() async throws {
let feed = try await DemoGateway().feed()
try write(feedColumn {
FeedHeader(feed: feed, cached: true)
ForEach(feed.needsYou.prefix(2)) { NeedsYouCard(item: $0) }
}, "feed-cached.png")
}
/// Feed rows stacked as the feed's List lays them out, which ImageRenderer leaves blank.
private func feedColumn(@ViewBuilder _ rows: () -> some View) -> some View {
VStack(spacing: 6) {