# Gear Feature Plan ## Why the gap exists Neither sync path populates gear today. The Strava API returns `gear_id` per activity (brut's originals show `b3437566`, `g10422777` etc.) but `strava_to_parsed()` ignores it. The ZIP path also ignores the gear column in activities.csv. Diego_p's "Rose Backroad" was set manually via the EditDrawer free-text field. --- ## Data model — `{user_dir}/gear.json` ```json { "items": [ { "id": "uuid-abc123", "name": "Rose Backroad", "type": "bike", "retired": false, "strava_id": "b3437566" } ] } ``` - `type` enum: `bike | shoes | skis | other` - Per-activity gear stays as a plain string (the gear **name**) — backward compatible with existing sidecars - `strava_id` is optional, used for deduplication during Strava sync --- ## Build order ### [x] Step 1 — `gear.json` CRUD API ✓ File: `bincio/serve/routers/gear.py` - `GET /api/gear` → list items (auth required) - `POST /api/gear` → add item (auto-generate UUID id) - `PATCH /api/gear/{id}` → update (name, type, retired) - `DELETE /api/gear/{id}` → delete File lives at `{user_dir}/gear.json`, same pattern as `athlete.json`. Add gear router to `server.py`. ### [x] Step 2 — Gear tab in AthleteView (ownerOnly) ✓ - Added `'gear'` to `Tab` type and `ALL_TABS` in `AthleteView.svelte` - Inline gear management: list, add, edit, retire — no separate component ### [x] Step 3 — EditDrawer gear selector ✓ - At drawer open, fetches `/api/gear` - Shows `