test(ios): cover large native home collections

This commit is contained in:
Theo Browne committed 2026-08-09 20:52:50 -07:00
1 parent 5d8096dab1
commit 764698c6e0
1 file changed
+19
@@ -336,6 +336,25 @@ struct DailyUXSidebarTests {
)
}
@Test
func largeWorkingCollectionKeepsStableOrderWithoutParentTimerRefresh() {
let threads = (0..<5_000).map { offset in
thread(
id: "thread-\(offset)",
created: -Double(offset),
updated: -Double(offset),
state: .working
)
}
let index = makeIndex(threads)
#expect(index.active.count == threads.count)
#expect(index.active.prefix(3).map(\.id) == ["thread-0", "thread-1", "thread-2"])
#expect(index.active.last?.id == "thread-4999")
#expect(DailyUXSidebarRefresh.nextBoundary(for: threads, after: now) == nil)
}
@Test
func compactRelativeAgeClampsFutureDatesAndUsesStableUnits() {
#expect(