Session 49: History calendar #224
Labels
No labels
accessibility
area:accounts
area:ai-evals
area:look
area:maps
area:platform
area:rides-progress
area:riding
area:today-plan-coach
area:ui-shell
bot:blocked
bot:failed
bot:pr
bot:waiting
bot:working
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
later
now
owner-check
parked
question
ready
session
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ckreidl/trainer#224
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
49 · The History calendar
Phase: UI polish · Branch:
session/49-history-calendar· Depends on: 48History (48) is still a long list of workouts and TSS. With a year or more of riding it stops being navigable: you can't jump to a time, see a hard week, or tell a block from a lull. This session turns it into the same calendar as Plan, so the past and the plan read as one book: Plan's week rows, a year strip to pick the month, and month-by-month paging that loads instantly.
The owner chose these directions without a mockup and will iterate on the built result, so build them cleanly and expect a follow-up round.
Read first
src/routes/history.tsx(or wherever 48 put it) and its server functionsrc/components/plan/plan-calendar.tsx(StageStrip, week rows,SessionCard,RiddenCard,WeekTotals) andsrc/components/plan/workout-profile.tsxRiddenView.profileinsrc/server/plan-views.ts): it is the cost to measure hereprefetchQueryvia Context7 (current docs, not memory)DESIGN.md,.impeccable/surfaces/src-routes-app.mdGoal
/history?month=2026-10, defaulting to this month. Back and forward, bookmarks and the ride page's "Back to History" return to the same month.getHistoryMonth({ month })returns that month's days in the athlete's time zone: every ride and strength session, each with its title, time, TSS and ridden profile (rides with power), plus week and month totals. It queries by date range, scoped to the user, and never loads more than the month.Rules
getHistoryMonthfor a full month on real data (bun run db:pull). If ridden profiles make it slow, store a ride's profile when it's imported and backfill once, and record the numbers indocs/decisions.md.Tests
/historyopens on this month; Previous loads last month without a spinner (preloaded); the strip jumps to a month; a ride opens and "Back to History" returns to that month; Plan's "Earlier weeks: History" lands before the plan. Axe and the keyboard checks pass, desk and phone.Out of scope
Search and filters (by sport, by workout type): note under Follow-ups if the calendar leaves them wanted.
Done when
A year of riding is navigable in a few clicks, month to month is instant, and the past reads like Plan. Owner check under Follow-ups → Now: does the year strip work as the month picker, or should it be dropdowns? Unit, typecheck, lint, format, audit and e2e pass. End-of-session ritual in
CLAUDE.md.Moved from
prompts/49-history-calendar.mdon 2026-11-08.