openspec: propose journal route/activity detail catch-up changes

Three OpenSpec proposals to bring the journal's route/activity detail and feed
closer to best-in-class outdoor apps, in the order we'll implement them:

- activity-sport-type: nullable sport enum on activities (hike/walk/run/
  ride/gravel/mtb/ski/other), set on create or normalized on import,
  shown as a badge + feed verb, federated as a Note PropertyValue.
- activity-stats: one reusable StatRow + canonical metric set, sport-aware
  avg pace/speed, moving-vs-elapsed time. Derive-only, no schema change.
- journal-elevation-profile: elevation profile chart + chart<->map
  "active distance" hover/click sync on the read-only detail pages.

All three validate with `openspec validate --strict`. Specs only; no code.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-06-12 13:40:53 +02:00
parent e3e01a34ae
commit 26b59b9c95
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
15 changed files with 602 additions and 0 deletions

View file

@ -0,0 +1,41 @@
## ADDED Requirements
### Requirement: Elevation profile chart on detail pages
The route and activity detail pages SHALL render an elevation profile chart (distance on the x-axis, elevation on the y-axis) with a gradient fill and a summary strip showing ascent, descent, highest point, and lowest point, whenever the activity or route has a usable elevation series.
#### Scenario: Chart shown for a route with elevation
- **WHEN** a user views a route whose GPX contains an elevation series
- **THEN** an elevation profile chart is shown with a summary strip (ascent, descent, highest, lowest)
#### Scenario: Chart omitted without elevation
- **WHEN** an activity's GPX has no usable elevation data
- **THEN** no chart is rendered and the existing gain/loss figures remain
### Requirement: Chart-to-map highlight
The detail page SHALL highlight the corresponding location on the map when the user points at a position on the elevation chart.
#### Scenario: Hover chart highlights map
- **WHEN** the user moves the pointer along the elevation chart
- **THEN** a marker appears on the map at the location matching that distance along the route
### Requirement: Map-to-chart highlight
The detail page SHALL highlight the corresponding position on the elevation chart when the user points at the route line on the map.
#### Scenario: Hover map highlights chart
- **WHEN** the user moves the pointer along the route line on the map
- **THEN** the elevation chart marks the position matching the nearest point on the route
### Requirement: Click chart to center map
The detail page SHALL center the map on the corresponding location when the user clicks a position on the elevation chart, without modifying any data.
#### Scenario: Click chart pans map
- **WHEN** the user clicks a point on the elevation chart
- **THEN** the map centers on the matching location
- **AND** no route or activity data is changed
### Requirement: Localized summary labels
The elevation summary strip SHALL render its labels and units through localized strings.
#### Scenario: German summary labels
- **WHEN** the UI locale is German
- **THEN** the ascent, descent, highest, and lowest labels render in German