From 466edddebb0a2b7d22e3ae44fe6e078ef2834c68 Mon Sep 17 00:00:00 2001 From: Trent Hoverman Date: Mon, 22 Jun 2026 13:26:37 -0400 Subject: [PATCH] Add Dance activity category MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds "dance" as a recordable activity type alongside the existing walk/run/cycle/gym/squash/sport/yoga/hike/other set. - ActivityMeta (Components.swift): new "dance" entry in the order list and metadata table (figure.dance icon, non-GPS) so it appears in the record picker. - ActionTools.swift: add "dance" to the coach's activityEnum so the AI coach can log/edit dance sessions. - WorkoutActivityAttributes.swift: add a Live Activity icon case for dance. Calories follow the existing per-session estimate (flat 8 kcal/min) — unchanged. Co-Authored-By: Claude Opus 4.8 --- PulseLoop/Coach/Tools/ActionTools.swift | 2 +- PulseLoop/DesignSystem/Components.swift | 3 ++- PulseLoop/Shared/WorkoutActivityAttributes.swift | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PulseLoop/Coach/Tools/ActionTools.swift b/PulseLoop/Coach/Tools/ActionTools.swift index 29e6362..cfc590b 100644 --- a/PulseLoop/Coach/Tools/ActionTools.swift +++ b/PulseLoop/Coach/Tools/ActionTools.swift @@ -12,7 +12,7 @@ enum ActionTools { } static var measurementTools: [AnyCoachTool] { [triggerMeasurement] } - private static let activityEnum = ["walk", "run", "cycle", "gym", "squash", "sport", "yoga", "hike", "other"] + private static let activityEnum = ["walk", "run", "cycle", "gym", "squash", "sport", "yoga", "dance", "hike", "other"] // MARK: set_goal diff --git a/PulseLoop/DesignSystem/Components.swift b/PulseLoop/DesignSystem/Components.swift index cc3533e..158f675 100644 --- a/PulseLoop/DesignSystem/Components.swift +++ b/PulseLoop/DesignSystem/Components.swift @@ -542,7 +542,7 @@ struct ActivityKind: Identifiable { enum ActivityMeta { /// Canonical types in display order (matches web `ACTIVITY_ORDER`). - static let order = ["walk", "run", "cycle", "gym", "squash", "sport", "yoga", "hike", "other"] + static let order = ["walk", "run", "cycle", "gym", "squash", "sport", "yoga", "dance", "hike", "other"] private static let table: [String: ActivityKind] = [ "walk": ActivityKind(type: "walk", label: "Walk", helper: "Outdoor or indoor walk", symbol: "figure.walk", gpsCapable: true), @@ -552,6 +552,7 @@ enum ActivityMeta { "squash": ActivityKind(type: "squash", label: "Squash", helper: "Court session", symbol: "figure.tennis", gpsCapable: false), "sport": ActivityKind(type: "sport", label: "Sport", helper: "General sport", symbol: "figure.soccer", gpsCapable: true), "yoga": ActivityKind(type: "yoga", label: "Yoga", helper: "Mobility or stretching", symbol: "figure.yoga", gpsCapable: false), + "dance": ActivityKind(type: "dance", label: "Dance", helper: "Studio, cardio, or freestyle", symbol: "figure.dance", gpsCapable: false), "hike": ActivityKind(type: "hike", label: "Hike", helper: "Trail or long walk", symbol: "figure.hiking", gpsCapable: true), "other": ActivityKind(type: "other", label: "Other", helper: "Custom activity", symbol: "sparkles", gpsCapable: false) ] diff --git a/PulseLoop/Shared/WorkoutActivityAttributes.swift b/PulseLoop/Shared/WorkoutActivityAttributes.swift index 18335a2..d74f5c6 100644 --- a/PulseLoop/Shared/WorkoutActivityAttributes.swift +++ b/PulseLoop/Shared/WorkoutActivityAttributes.swift @@ -125,6 +125,7 @@ enum WorkoutLAColors { case "gym", "strength", "weights": return "dumbbell.fill" case "hike", "hiking": return "figure.hiking" case "yoga": return "figure.yoga" + case "dance", "dancing": return "figure.dance" case "squash", "tennis": return "figure.tennis" case "sport", "soccer", "football": return "figure.soccer" default: return "sparkles"