trails/openspec/changes
Ullrich Schäfer ceda9f1877
profile-weekly-distance: weekly distance bar chart on the profile
Implements the profile-weekly-distance change (specs/profile-weekly-distance):

- getWeeklyDistance(ownerId, { publicOnly, weeks=12 }) in activities.server.ts:
  one query that gap-fills in SQL — generate_series of week-starts LEFT JOINed
  to activities — so it returns exactly 12 contiguous { weekStart, distance }
  rows with matching Postgres week boundaries, viewer-scoped, no cache, no
  schema change.
- WeeklyDistanceChart: SVG bars normalized to the busiest week (empty weeks keep
  their slot as zero-height bars), per-bar title distance, localized label;
  renders nothing when there's no distance in the window. Mounted under the
  ProfileStats header.
- i18n journal.profileStats.weeklyDistance (en + de).

Tests: WeeklyDistanceChart component (jsdom: bar count incl. zero weeks, empty
→ hidden, normalization); e2e creates an activity with distance and asserts the
chart renders. typecheck + lint + unit (journal 321) green; verified in the
browser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 07:46:06 +02:00
..
activity-photos Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
archive openspec: archive the detail catch-up changes, sync specs 2026-06-12 15:58:17 +02:00
changelog Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
garmin-import feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00
mobile-app Implement mobile route editor with MapLibre and BRouter routing 2026-04-15 01:06:10 +02:00
profile-stats profile-stats: lifetime roll-up header on the profile 2026-06-13 07:25:06 +02:00
profile-weekly-distance profile-weekly-distance: weekly distance bar chart on the profile 2026-06-13 07:46:06 +02:00
route-discovery Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
route-features Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
route-federation docs: split-domain handles idea + interop constraint for the trails check 2026-06-07 11:18:13 +02:00
route-sharing docs: fix stale route-sharing → social-federation dependency 2026-06-06 13:16:06 +02:00
visual-redesign Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
wahoo-production-cutover Add openspec changes for Wahoo production cutover and route updates 2026-05-01 11:37:42 +02:00