Skip to content

[History] 4 - Favorite detail and rename #290

Description

@KacperKozak

Parent

What to build

Favorite detail view. Tapping a Favorite in the Favorites tab opens the existing history session sheet in a favorite mode: chart, map route, and stats loaded from the favorite's telemetry range (pinned, so always present), with the Favorite's name shown when set. Favorite mode offers rename (optional name, clearable) and delete; history mode keeps the star action. No re-trim — adjusting a range is delete + recreate.

Likely files

  • src/modules/history/components/HistorySessionSheet.tsx - the shared sheet gaining a mode switch
  • src/modules/history/store/historyStore.ts - session selection/loading pattern to reuse for a favorite range
  • src/modules/history/lib/rideFormat.ts - row/stat formatting shared with favorites list

Implementation hints

  • Loading a favorite's data is a history range read for [startMs, endMs] — reuse the existing selected-session load path with the favorite's range instead of a grouped session's range.
  • Keep the mode switch small: favorite mode = name header + rename + delete-favorite; history mode = star. Everything else stays shared.
  • Rename goes through the bridge API from slice 1 (extend with rename if not present).

Acceptance criteria

  • Opening a Favorite shows chart, route, and stats for exactly its range
  • Name shown when set; date + stats fallback otherwise
  • Rename works and persists natively; name can be cleared
  • Delete removes the Favorite and returns to the Favorites list
  • History mode of the sheet is unchanged apart from the star action

Blocked by

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:historyRide history, sessions, buckets, graphscomplexity:lowIsolated, hard to break other things. Use sonnet/haiku.ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions