Skip to content

Web workout attach: explicit workout/route attachment, Workouts page on page service, scheduled-today prompt - #69

Merged
gdoumen merged 13 commits into
mainfrom
feat/web-workout-attach
Nov 16, 2026
Merged

gdoumen merged 13 commits into
mainfrom
feat/web-workout-attach

Conversation

@gdoumen

@gdoumen gdoumen commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Brings the mobile workout/route attach UX to web-ui. A workout and a route are now attached explicitly and visibly (Route: <name> [x] / Workout: <name> [x] chips), nothing is selected implicitly, and the Workouts page runs on the new desktop page service instead of calling domain services directly. The Workouts page layout (Scheduled + category carousels with Import and Create cards) is unchanged.

Depends on the services PR: incyclist/services#692 (consumed through the dev alias; the incyclist-services version needs bumping after it is published).

What changed

  • Workouts page now uses getWorkoutListPageService() + usePageService. It makes no domain-service calls; the screen takes plain lists with per-list and per-card observers, and subscribes with proper cleanup.
  • Workout details dialog (new smart + view pair): Cancel / Delete (with confirmation) / Add Route / Start. One Start button: with a route attached it starts the combo, otherwise the workout alone. Clear the route chip to ride the workout alone. The old Select / "Start without route" are gone.
  • Workout cards: no "selected" marking and no Unselect. Today's scheduled workout gets a highlight and "Today" date instead.
  • Route details: shows the attached workout chip; "Start With Workout" becomes "Add Workout" and is driven by the attachment instead of the stale hasWorkout flag.
  • Free Ride settings: shows the attached workout chip only (no Add Workout; the dead onAddWorkout prop is dropped).
  • Activity details: attached workout chip and an Add Workout button after Ride Again.
  • Scheduled-today prompt: after pairing, a Yes / Check workouts / No prompt appears once per session on the Routes, Activities and Workouts pages. It waits while another dialog is open. This replaces the old redirect to Workouts.
  • New AttachmentChip molecule; Icon atom forwards aria-label; Dialog emits a close event used to defer the prompt.

Behaviour change

  • Today's scheduled workout is no longer auto-selected; it has to be started or attached explicitly.
  • After pairing the app lands on the last visited page.

Test plan

  • npm test (unit + story tests)
  • Dev build, Workouts page: carousel windowing, import, delete, retry
  • Add Route from a workout, Add Workout from route / activity, clear via [x]
  • Start with and without a route attached; Free Ride with an attached workout
  • Scheduled-today prompt: Yes / Check workouts / No, and deferral while a dialog is open
  • Visual check of the chip and dialogs in the desktop theme

Not yet verified in a running app.

@gdoumen

gdoumen commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Added: the Workouts page reads the new upcoming section and displayType from the page service and renders the upcoming (scheduled) workouts first, then the regular category lists. The layout is unchanged. The page only has the tile view for now; a list view and the toggle will follow in a separate UI change.

@gdoumen
gdoumen marked this pull request as ready for review November 16, 2026 13:33
@gdoumen
gdoumen merged commit ea7dac0 into main Nov 16, 2026
2 checks passed
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.

1 participant