perf(swift-ios): skip validated stale detail replay #10762
Closedsaphid(GitHub profile, opens in a new tab)wants to merge 250+ commits into
t3code/rebuild-mobile-app-swift fromrefs/pull/10762/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:XL
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
- @@ -2280,0 +2498,21 @@2498+ private func scheduleAcceptedCommandRefresh(2499+ threadID: String, client: T3Client, generation: Int, refreshDetail: Bool = true2500+ ) {2501+ guard isKnownClient(client, environmentID: client.environment.id, generation: generation) else {2502+ return2503+ }2504+ if let current = acceptedCommandRefreshes[threadID],2505+ current.client === client, current.generation == generation {2506+ acceptedCommandRefreshes[threadID]?.pending = true2507+ acceptedCommandRefreshes[threadID]?.needsDetail = current.needsDetail || refreshDetail2508+ return2509+ }2510+ cancelAcceptedCommandRefreshes(threadID: threadID)2511+ let id = UUID()2512+ let task = Task { [weak self] in2513+ while self?.isCurrentAcceptedCommandRefresh(threadID: threadID, id: id) == true {2514+ let needsDetail = self?.acceptedCommandRefreshes[threadID]?.needsDetail == true2515+ self?.acceptedCommandRefreshes[threadID]?.needsDetail = false2516+ self?.acceptedCommandRefreshes[threadID]?.pending = false2517+ if needsDetail {2518+ try? await self?.refreshThread(id: threadID, client: client) { [weak self] in
- @@ -971,3 +1160,4 @@9711160 _ environment: Environment,9721161 client newClient: T3Client9731162 ) async {1163+ cancelAggregateRefresh()
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This diff is a large Swift runtime refactor that changes foreground hydration, passive environment streaming, retry timing, background lifecycle, outbox presentation, and stale-response handling. The unresolved refresh-history and worker-cancellation concerns, together with changed product defaults, warrant human review.
Not approved because:
- 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in [Settings](https://app.macroscope.com/pingdotgg/settings#Repos). You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).