Skip to content

Conversation

Copy link

Copilot AI commented Oct 27, 2025

Adds a navigable workouts list screen to display all saved workouts with filtering capabilities.

Implementation

  • WorkoutsListView: New SwiftUI view displaying workouts from WorkoutManager with segmented control filtering (All/Scheduled/Completed/Skipped). Includes empty states and status-coded icons.
  • ContentView: Added navigation link "My Workouts" between existing Training Plan and AI Generator links.
  • WorkoutStatusFilter: Enum defining filter states with display names for the segmented control.

Testing

  • Unit tests: WorkoutManager CRUD operations, status filtering, workout calculations (duration, average power)
  • UI tests: Navigation flow and filter control accessibility

Example Usage

// Filter workouts by status
private var filteredWorkouts: [Workout] {
    switch selectedFilter {
    case .all: return workouts
    case .scheduled: return workouts.filter { $0.status == .scheduled }
    case .completed: return workouts.filter { $0.status == .completed }
    case .skipped: return workouts.filter { $0.status == .skipped }
    }
}

Screen displays workout metadata (title, date, duration, average power) with navigation to existing WorkoutDetailView. Fully accessible with VoiceOver labels.

Original prompt

Add a new workouts screen

[Variant 2 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.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add new workouts screen Add workouts list view with status filtering Oct 27, 2025
Copilot AI requested a review from pierceboggan October 27, 2025 15:20
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