Skip to content

Conversation

Copy link

Copilot AI commented Oct 27, 2025

Adds a dedicated workouts list view to browse and manage all workouts with filter and sort capabilities.

Changes

New WorkoutsView

  • Displays all workouts from WorkoutManager in scrollable list
  • Filter by status: Scheduled, Completed, Skipped, In Progress
  • Sort by date (ascending/descending) or title
  • WorkoutCard component shows date, status badge, metrics (duration, power, intensity)
  • Empty state handling with contextual messaging
  • Navigates to existing WorkoutDetailView on tap

ViewModel

  • WorkoutsViewModel manages state with @Published properties
  • Computed filteredAndSortedWorkouts applies filter/sort logic reactively
  • Enum-based SortOption for type safety

Integration

  • Added to main menu in ContentView between "Training Plan" and "AI Workout Generator"
  • Uses figure.indoor.cycle SF Symbol for consistency

Testing

  • 8 unit tests: filter/sort logic, boundary conditions
  • 5 UI tests: navigation, interaction, empty states
// Example usage in ContentView
NavigationLink(destination: WorkoutsView()) {
    Label("Workouts", systemImage: "figure.indoor.cycle")
}

All components follow existing accessibility patterns and design language (SF Symbols, 12pt rounded corners, status badge colors).

Original prompt

Add a new workouts screen

[Variant 3 of 3]

The user has attached the following files as relevant context:

  • .github/instructions/run.instructions.md
  • .github/copilot-instructions.md
  • docs/memory.md

Created from VS Code via the GitHub Pull Request extension.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add a new workouts screen Add workouts screen with filtering and sorting Oct 27, 2025
Copilot AI requested a review from pierceboggan October 27, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants