Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
614576b
Watch rest screen: Coaich look, big accent countdown, outlined chips
cubetes Nov 9, 2026
70ca0be
Watch rest screen: Up next under the effort chips, RIR label on 45-49 mm
cubetes Nov 9, 2026
ac360f2
Watch rest screen: buttons sit right under the countdown
cubetes Nov 9, 2026
dc568ea
Watch rest screen: heart rate and workout time, demo switches for a r…
cubetes Nov 9, 2026
5a98fcc
Merge branch 'release-1.4.5' of https://github.com/DuarteSantos8/open…
cubetes Nov 9, 2026
9dda329
Watch settings: rest timer pictures show the new rest screen
cubetes Nov 9, 2026
1b097b6
Watch: bigger rest countdown, larger Metrics and Pulse, full-screen g…
cubetes Nov 9, 2026
9a330ee
Watch strings: max and min come from watch-strings.mjs
cubetes Nov 9, 2026
36a6604
Watch set page: the Crown turns Apple's wheel, as in Coaich
cubetes Nov 9, 2026
a73cb9f
Watch Metrics: keep clear of the page dots on the Crown's side
cubetes Nov 9, 2026
5eb3500
Watch: no text under 12 pt, bigger set numbers, Effort names wrap
cubetes Nov 9, 2026
3a2f921
Watch set page: the Crown one grid step per detent, one outline
cubetes Nov 9, 2026
7a93216
Watch settings: rest timer pictures retaken from the new rest screen
cubetes Nov 9, 2026
707b57c
Watch: Liquid Glass on every control
cubetes Nov 9, 2026
ad0c64e
Watch set page in Apple Workout's style
cubetes Nov 9, 2026
704032f
Watch rest: fixes from CodeRabbit's second review (#1100)
cubetes Nov 12, 2026
b25938a
Merge branch 'watch/rest-coaich' into watch/liquid-glass
cubetes Nov 12, 2026
00cda4b
Watch rest and Metrics: fixes from CodeRabbit's third review (#1187)
cubetes Nov 13, 2026
3f7f7b0
Merge branch 'watch/rest-coaich' into watch/liquid-glass
cubetes Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/ios/App/Watch/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct HomeView: View {
var body: some View {
NavigationStack {
content
.navigationTitle(store.ready?.today != nil ? Text("Today") : Text(verbatim: "openGym"))
.navigationTitle(store.ready?.today != nil ? Text("Today") : Text(verbatim: "")) // the logo says openGym, centred with the rest
}
// Hidden: a long press shows what arrived from the phone (animations, sync, heart rate).
.onLongPressGesture(minimumDuration: 2) { debug = true }
Expand Down Expand Up @@ -123,7 +123,7 @@ struct VersionLine: View {
let version = info?["CFBundleShortVersionString"] as? String ?? ""
let build = info?["CFBundleVersion"] as? String ?? ""
Text(verbatim: "openGym \(version)" + (build.isEmpty ? "" : " (\(build))"))
.font(.system(size: 10, design: .rounded))
.font(.system(size: 12, design: .rounded))
.foregroundStyle(Theme.label3)
.frame(maxWidth: .infinity)
.padding(.top, 8)
Expand Down
248 changes: 180 additions & 68 deletions frontend/ios/App/Watch/RestHold.swift

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion frontend/ios/App/Watch/SessionStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
return workout == nil ? nil : workoutSeenAt
}

/// The rest page is what the set page shows (one source for LivePage and the badges).
var restPanel: Bool {
holdCountFrom == nil && holdEndsAt == nil && viewing == nil && (restEndsAt ?? .distantPast) > Date()
}

/// When the phone paused the workout (#976), nil while it runs.
var workoutPausedAt: Date? {
guard let d = SafeNum.date(ms: workout?.pausedAt), d.timeIntervalSince1970 > 0 else { return nil }
Expand Down Expand Up @@ -1502,7 +1507,7 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
case "fix": self.picked[0] = 2; self.open(SetRef(entry: 0, set: 1)); self.fixR = 7
case "metrics", "metrics-pulse", "metrics-effort":
self.picked[0] = 2; self.tab = .metrics
if screen == "metrics-pulse" {
if screen != "metrics-effort" {
// 52 minutes of readings, a wave per set, so the sparkline has something to show.
let t0 = Date().addingTimeInterval(-3133)
let readings = stride(from: 0.0, to: 3133, by: 5).map { (t0.addingTimeInterval($0), 125 + 22 * sin($0 / 200) + 6 * sin($0 / 23)) }
Expand Down Expand Up @@ -1540,6 +1545,12 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
self.state.settings.effort = "rir"
self.lastLogged = SetRef(entry: 0, set: 1)
}
if screen == "rest" || screen == "effort" {
self.health.setDemoHeartRate(128)
self.workoutSeenAt = Date().addingTimeInterval(-(24 * 60 + 10))
if let n = SessionStore.argument("-OpenGymWatchRated").flatMap(Double.init), screen == "effort" { self.lastRated = n }
if let n = SessionStore.argument("-OpenGymWatchUnsynced").flatMap(Int.init) { self.unsentSets = n }
}
if screen == "hold" { self.startHold() }
if screen == "offline" { self.reachable = false; self.queued = 3; self.unsentSets = 3 }
if screen == "waiting" { self.queued = 2; self.unsentSets = 2; self.tab = .overview }
Expand Down
46 changes: 35 additions & 11 deletions frontend/ios/App/Watch/SessionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct SessionView: View {
TabView(selection: $store.tab) {
OverviewPage().tag(SessionTab.overview)
LivePage().tag(SessionTab.set)
MetricsStack().tag(SessionTab.metrics)
MetricsStack(health: store.health).tag(SessionTab.metrics)
MusicPage().tag(SessionTab.music)
}
.tabViewStyle(.page)
Expand All @@ -39,14 +39,38 @@ struct SessionView: View {
}
}

/// Beside the clock: whether sets wait for the phone, and the heart rate.
/// Beside the clock: whether sets wait for the phone, and the heart rate. Not on the rest page:
/// it ignores the top safe area (the countdown sits there) and shows both itself.
struct SessionBadges: View {
@EnvironmentObject var store: SessionStore

var body: some View {
HStack(spacing: 4) {
SyncPill()
if store.show.showHr { HeartRateBadge(health: store.health) }
if !(store.tab == .set && store.restPanel) {
HStack(spacing: 4) {
if store.tab == .set { SetPill() }
SyncPill()
// Metrics shows the heart rate big itself.
if store.show.showHr && store.tab != .metrics { HeartRateBadge(health: store.health) }
}
}
}
}

/// The set up next as Apple Workout shows it beside the clock: "2/4" in the accent, on a glass pill.
struct SetPill: View {
@EnvironmentObject var store: SessionStore
@Environment(\.accent) private var accent
@Environment(\.isLuminanceReduced) private var dimmed

var body: some View {
if let ref = store.shownRef, let e = store.shownEntry, e.sets.indices.contains(ref.set) {
let place = SetNav.place(e, ref.set)
Text(verbatim: "\(place.n)/\(place.of)")
.font(.system(size: 17, weight: .semibold, design: .rounded).monospacedDigit())
.foregroundStyle(accent.opacity(dimmed ? 0.75 : 1))
.padding(.horizontal, 10).padding(.vertical, 3)
.background(Capsule().fill(dimmed ? Color.clear : accent.opacity(0.22)))
.accessibilityLabel(Text("Set \(Int64(place.n)) of \(Int64(place.of))"))
}
}
}
Expand All @@ -62,8 +86,8 @@ struct SyncPill: View {
if state.count > 0 {
HStack(spacing: 2) {
Image(systemName: state == .away(state.count) ? "iphone.slash" : "arrow.up")
.font(.system(size: 9, weight: .bold))
Text(verbatim: "\(state.count)").font(.system(size: 11, weight: .semibold, design: .rounded).monospacedDigit())
.font(.system(size: 11, weight: .bold))
Text(verbatim: "\(state.count)").font(.system(size: 13, weight: .semibold, design: .rounded).monospacedDigit())
}
.foregroundStyle(Theme.orange)
.padding(.horizontal, 5)
Expand Down Expand Up @@ -123,7 +147,7 @@ struct LivePage: View {
if store.holdCountFrom != nil { return .count }
if store.holdEndsAt != nil { return .hold }
if store.viewing != nil { return .fix }
if let end = store.restEndsAt, end > Date() { return .rest }
if store.restPanel { return .rest }
return store.entry != nil ? .set : .done
}

Expand Down Expand Up @@ -259,8 +283,8 @@ struct OverviewRowView: View {
.padding(.vertical, 7)
.padding(.horizontal, 8)
.frame(maxWidth: .infinity, minHeight: Theme.tap, alignment: .leading)
.background(RoundedRectangle(cornerRadius: 12, style: .continuous)
.fill(dimmed ? Color.clear : (row.current ? Theme.surface2 : Theme.surface)))
.glass(RoundedRectangle(cornerRadius: 12, style: .continuous),
fill: dimmed ? Color.clear : (row.current ? Theme.surface2 : Theme.surface), dimmed: dimmed)
.overlay(RoundedRectangle(cornerRadius: 12, style: .continuous)
.stroke(row.current ? accent : Theme.surface2, lineWidth: row.current ? 1.5 : (dimmed ? 1 : 0)))
.contentShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
Expand Down Expand Up @@ -328,7 +352,7 @@ struct HoldToFinish: View {
var body: some View {
GeometryReader { g in
ZStack(alignment: .leading) {
Capsule().fill(dimmed ? Color.clear : Theme.surface2)
Color.clear.glass(Capsule(), fill: dimmed ? Color.clear : Theme.surface2, dimmed: dimmed)
Capsule().stroke(accent, lineWidth: 1.5)
label(Color.white)
// The filled part, with the label in the ink on top of it.
Expand Down
Loading
Loading