trails/packages
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
..
api activity-sport-type: schema, contract, write/read paths, federation 2026-06-12 14:11:41 +02:00
db activity-sport-type: schema, contract, write/read paths, federation 2026-06-12 14:11:41 +02:00
fit chore(deps): bump the production group across 1 directory with 30 updates 2026-06-07 09:48:14 +00:00
gpx journal-elevation-profile: elevation chart + map↔chart sync 2026-06-12 15:34:45 +02:00
i18n profile-weekly-distance: weekly distance bar chart on the profile 2026-06-13 07:46:06 +02:00
jobs build(deps): Bump the production group across 1 directory with 21 updates 2026-06-11 19:22:35 +00:00
map-core Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00
sentry-config Fix sentry-config typecheck: explicit types: [node] in tsconfig 2026-04-18 00:43:48 +02:00
types one source of truth for Route/Activity shapes; enforce api contracts 2026-06-10 07:39:50 +02:00