ReviewOS

stacks/wildloop

Add manual activity entry (log a run after the fact)

#955
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Problem

Activities can only be created via live GPS recording or simulated replay. There's no form/endpoint to log an activity manually (distance/duration/type/elevation), which is standard Strava behavior.

Acceptance

  • Manual-entry form (distance, duration, type, elevation, optional trail).
  • Reuse POST /api/activities (gps optional).
  • Entry point from feed/profile.
9 days ago

Done in 2a9913c.

  • Manual entry modal on the feed ("Log activity" next to "Capture run"): type, date, miles, duration, elevation, optional trail, notes. Logic in useManualActivity composable.
  • Reuses POST /api/activities with no gpx — pace computed client-side from distance + duration (shared resources/functions/duration.ts), moving_time = duration (no pause data for manual logs), date-only input pinned to midday so timezones can't shift the day.
  • The created row is inserted into the feed store with its real backend id, so kudos/comments/edit/delete work immediately.
  • Manual entries are editable in full (no GPS lock) per #954, and the form notes that manual logs don't capture territory.

Validation + pace math covered by scripts/verify-activity-crud.ts part 1 + the store round-trip checks.

Sign in to comment on this issue.