Queue document writes durably and surface sync trouble in the UI

iCloud Drive writes now flow through a persistent WriteBacklog sidecar
(drained with backoff, flushed on backgrounding, wiped with the cache on
account change), so a save can never be lost to a transient coordinator
error. A status banner on the workout list surfaces stuck syncing.
Also: the split picker gains a Recent section with day labels, split
rows fold SplitItem into SplitListView, and list rows dim the multiply
sign in sets-by-reps.

Claude-Session: https://claude.ai/code/session_01HJDQQDA9QdP8zByg43H5v3
This commit is contained in:
2026-07-08 12:48:12 -04:00
parent 495fce1e5a
commit c05e83cff7
13 changed files with 1175 additions and 144 deletions
+15
View File
@@ -39,6 +39,21 @@ extension Date {
var abbreviatedWeekday: String { Self.weekdayAbbrev.string(from: self) }
var dayOfMonth: Int { Calendar.current.component(.day, from: self) }
/// "Today", "Yesterday", or "N days ago" by calendar-day difference.
func daysAgoLabel(relativeTo now: Date = Date()) -> String {
let calendar = Calendar.current
let days = calendar.dateComponents(
[.day],
from: calendar.startOfDay(for: self),
to: calendar.startOfDay(for: now)
).day ?? 0
switch days {
case ..<1: return "Today"
case 1: return "Yesterday"
default: return "\(days) days ago"
}
}
func humanTimeInterval(to other: Date) -> String {
let interval = other.timeIntervalSince(self)
let hours = Int(interval) / 3600