feat(#59): add weekly training planner view#122
Closed
ChristopherRotnes wants to merge 7 commits into
Closed
Conversation
New Planlegger view lets the user assign session templates to days of the current week and see the projected muscle coverage on a live heatmap body map. - Supabase migration: week_plans + week_plan_days tables with RLS policies - db.js: fetchWeekPlan, saveWeekPlan, deleteWeekPlan - utils.js: toWeekIso, weekIsoToMonday helpers - Planlegger.jsx: full component (week nav, HeatmapBodySVG, 7-day plan list, bottom-sheet template picker, Forslag card, sticky save/delete CTA) - App.jsx: planlegger view branch + onShowPlanlegger in NavContext - PageShell.jsx: EventSchedule nav icon linking to planner https://claude.ai/code/session_01XVey99eDCo79X8b6fNQuKP
Caused ESLint no-unused-vars error in CI. https://claude.ai/code/session_01XVey99eDCo79X8b6fNQuKP
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-122.westeurope.7.azurestaticapps.net |
Adding EventSchedule pushed the last icon(s) off-screen on narrow viewports. 7 × 40px = 280px fits alongside the logo on a 390px iPhone. https://claude.ai/code/session_01XVey99eDCo79X8b6fNQuKP
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-122.westeurope.7.azurestaticapps.net |
7 × 36px = 252px + ~100px logo = 352px, fits within 358px available on a 390px iPhone (after 16px side padding). The body overflow-x: hidden was clipping the calendar icon. https://claude.ai/code/session_01XVey99eDCo79X8b6fNQuKP
This was referenced May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Supabase migration
week_plans— one row per user per ISO week, RLS enforcedweek_plan_days— one row per day slot, cascades on plan delete, RLS via parent joinutils.jstoWeekIso(date)—Date → "2026-W19", handles ISO week year-rollover edge casesweekIsoToMonday(weekIso)—"2026-W19" → Monday Datedb.jsfetchWeekPlan(weekIso)— fetches plan + days with joined template datasaveWeekPlan(weekIso, assignments)— upserts plan row, delete + reinserts daysdeleteWeekPlan(weekIso)— deletes plan row (cascade removes days)Planlegger.jsx(new component)ChevronLeft/ChevronRight) withUKE N · D–D MÅNEDlabelHeatmapBodySVGprojected coverage map, updates live as templates are assigned+ Legg til øktFjern uke(ghost, only when a saved plan exists) +Lagre plan(primary)App.jsx—Planleggerimport,onShowPlanleggerin NavContext,"planlegger"view branchPageShell.jsx—EventScheduleCarbon icon nav button (between Bibliotek and theme toggle)Verification steps
EventSchedulecalendar icon in nav → navigates to Planlegger, shows current weekChevronLeft/ChevronRightupdate week label and reload plan correctlyHeatmapBodySVGupdates liveLagre plan→ rows persisted in Supabase; reload page → plan loads backFjern uke→ confirm strip appears → confirm →week_plansrow deleted (cascade removes days)toWeekIso/weekIsoToMondayat year rollover (29 Dec → W01 next year)Out of scope
https://claude.ai/code/session_01XVey99eDCo79X8b6fNQuKP