Skip to content

As a user I want to plan my training week upfront so I can see projected muscle coverage before I start #59

@ChristopherRotnes

Description

@ChristopherRotnes

Summary

A new view that lets the user plan their training week before it happens. The user assigns templates to days, and a live body map shows the cumulative projected muscle coverage for the week. Addresses the core problem: every other screen answers "what did I do?" — this one answers "what should I do next?"

UI spec (Carbon g100)

  • Header row: week number + date range (e.g. UKE 19 · 4–10 MAI)
  • Page heading: Planlegg uken
  • Projected coverage section (PROJISERT DEKNING): HeatmapBodySVG (front + back, side-by-side or toggle on mobile) showing union of all planned sessions' muscles. Summary line: N ØKTER · N MUSKELGRUPPER · N MIN
  • 7-day list: one row per day (MAN–SØN). Rows with a template assigned show: day label, date, template name, duration, muscle Tag pills. Empty rows show a dashed + Legg til økt button
  • Sticky action bar: Fjern uke (ghost) + Lagre plan (primary)
  • Forslag card (yellow/warning): surfaces neglected muscles based on tag/exercise history and nudges toward templates that cover them

Data model

New table week_plans:

week_plans
  id, user_id, week_iso text (e.g. "2025-W19"), created_at

week_plan_days
  id, plan_id → week_plans, day_of_week int (1=Mon…7=Sun),
  template_id → session_templates (nullable), sort_order int

week_plan_days.template_id nullable — an empty slot is a valid row with template_id = null.

Acceptance criteria

  • New nav icon (calendar) in Header → navigates to "planlegger" view
  • Current week is shown by default; user can navigate ±1 week
  • Assigning a template to a day updates the projected body map in real time
  • Removing a template from a day clears the slot (shows dashed + Legg til økt)
  • "Lagre plan" upserts the week_plans + week_plan_days rows
  • "Fjern uke" deletes the plan for the current week (with confirmation)
  • Forslag card appears if ≥2 muscle groups have no coverage in the planned week
  • Body map uses buildMuscleMapFromExercises over all planned templates' exercises
  • Mobile: single-column, Front/Bak toggle on body map

Out of scope (follow-up)

  • Drag-and-drop reordering of days
  • Multi-week arc / program builder (Push/Pull/Legs 6-week cycle)
  • Converting a saved plan into a logged session directly from this view

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions