Commit Graph

151 Commits

Author SHA1 Message Date
Davide Scaini 5a29259259 fix edit profile 2026-04-09 13:21:47 +02:00
Davide Scaini fb202b4edf Record / Convert tabs — now gated behind PUBLIC_MOBILE_APP=true. Hidden by default in VPS/dev mode; only show when explicitly opted into the mobile app build.
Edit/Upload UI — split into two concepts:
  - PUBLIC_EDIT_URL — the server base URL (empty = use proxy at /api/)
  - PUBLIC_EDIT_ENABLED=true — whether to show the edit/upload buttons at all

  bincio dev now sets PUBLIC_EDIT_ENABLED=true when instance.db exists (multi-user mode), so the upload button, edit button, and edit drawer all appear. The fetch calls already produce  correct relative URLs (${''}/api/upload = /api/upload) which the Vite proxy forwards to bincio serve.
2026-04-09 13:16:00 +02:00
Davide Scaini 50cdeb3b6e ActivityFeed — replaced the <button> inside <a> (invalid HTML, unreliable) with the stretched-link pattern: the card is now a <div>, the title <a> carries a ::before pseudo-element
that covers the whole card making it clickable, and @handle is a proper <a> with z-index: 10 sitting above the stretched link. Clicking the handle navigates to /u/{handle}/; clicking
  anywhere else navigates to the activity.

  ActivityDetail — @handle link added in the date/time row of the header, linking to /u/{handle}/. Only shown when activity.handle is set (i.e. multi-user mode).
2026-04-09 13:02:07 +02:00
Davide Scaini 509557ed6f fix: the user feed shows a page that nests again "feed stats athlete" that should be shown only if you are browsing a user that is not you 2026-04-09 10:35:58 +02:00
Davide Scaini cf7c71b8a3 (opus assessment) Fix auth wall flash, broken multi-user write API, and single-user redirect loop
Auth wall (Base.astro): set data-auth-pending on <body> at SSG time and hide
  it with inline CSS before any JS runs; remove the attribute after /api/me
  resolves. Eliminates the flash of protected content on private instances.

  Multi-user write API (serve/server.py): the previous _apply_sidecar_edit and
  strava_sync imports from bincio.edit.server were broken (those names don't
  exist as module-level exports) and the Strava sync mutated a global data_dir,
  making concurrent requests from different users racy. Fix: extract both
  operations into bincio/edit/ops.py as pure functions that take data_dir
  explicitly. Both edit/server.py and serve/server.py now import from there.

  Security: add rate limiting to POST /api/register (5 attempts / 15 min / IP,
  separate bucket from login). Add _check_id() activity ID validation to both
  GET and POST /api/activity/{id} in serve/server.py.

  Single-user mode: _write_root_manifest now forces instance.private=false when
  no instance.db exists, even if a previous run wrote true. Prevents the auth
  wall from firing and redirecting to /login/ when bincio serve isn't running.

  ActivityFeed: skip filterHandle when profileIndexUrl is set (per-user profile
  pages load the right shard directly; activities have no handle tag at that
  point, so the filter was producing an empty feed). Fix handle links to point
  to /u/{handle}/ instead of /{handle}/. Fix <a>-inside-<a> Svelte warning by
  converting the inner handle link to a <button>.
2026-04-09 09:19:48 +02:00
Davide Scaini 98c42dc443 unify single user and multi user behaviour 2026-04-09 08:59:40 +02:00
Davide Scaini f76cc0ce7e towards multi-user 2026-04-08 19:37:10 +02:00
Davide Scaini 36a91362d9 Strava sync improvements
- Fix first sync finding 0 activities: remove last_sync_at stamp at
    connect time so the first sync checks all Strava history (existence
    check skips already-extracted files without fetching streams)
  - Add POST /api/strava/reset with soft/hard modes: soft sets last_sync_at
    to the most recent activity already on disk; hard clears it entirely
  - Surface error_count in sync response and status message
  - Add Reset / Hard reset buttons below Sync now in the upload modal
  - Reload on bfcache restore so client:only components re-mount after
    back navigation
2026-04-08 14:23:52 +02:00
Davide Scaini 083c67d018 local activity storage and convert page fixes
- Replace rdp dependency with inline pure-Python RDP implementation
    so the bincio wheel runs in Pyodide (no pure-Python wheel existed for rdp)
  - Fix convert page script: remove define:vars so Vite bundles it and
    TypeScript imports (localstore, format) work correctly
  - Rename wheel to proper PEP 427 filename (bincio-0.1.0-py3-none-any.whl)
  - Use en-GB date format on convert result, consistent with the feed
  - Add /activity/local/ page + LocalActivityDetail for IDB-only activities;
    feed links local activities there instead of the SSG route
  - Fix getStaticPaths: try public/data symlink as fallback, never crash on
    missing index.json
  - Fix ActivityDetail.onMount: load detail even when detail_url is absent
    so locally converted activities show map and charts
  - Derive track_url and detail_url from id in toSummary() since they are
    not present in the detail JSON
  - Reload on bfcache restore (pageshow) so client:only components re-mount
    after back navigation
2026-04-08 14:14:42 +02:00
Davide Scaini 5bf0f3636c local conversion 2026-04-06 22:25:57 +02:00
Davide Scaini e940338816 planning 2026-04-06 19:31:52 +02:00
Davide Scaini 17f36889f3 sync strava data from web ui 2026-04-06 12:38:41 +02:00
Davide Scaini ad2710e759 fix ci 2026-04-06 12:14:39 +02:00
Davide Scaini bd5831c2fd second pass. low 2026-04-01 19:00:28 +02:00
Davide Scaini 3d364c3992 second pass. medium 2026-04-01 11:05:00 +02:00
Davide Scaini 94369606a4 second pass at issues. critical ones. 2026-04-01 10:58:45 +02:00
Davide Scaini 81438231b4 fix low level issues 2026-03-31 23:22:12 +02:00
Davide Scaini 8f91503cf7 fix mid level issues. updated changelog 2026-03-31 23:00:39 +02:00
Davide Scaini f8abab2c23 fix high priority issues 2026-03-31 22:53:50 +02:00
Davide Scaini e2870c3344 fixing issues 2026-03-31 22:40:35 +02:00
Davide Scaini 47568e9dda fix back button behaviour 2026-03-30 22:45:13 +02:00
Davide Scaini 9bc9a1d10f paginate stats page 2026-03-30 21:51:01 +02:00
Davide Scaini 5bbc3d07d2 fix: remove sensitive files, sync manifest 2026-03-30 20:38:00 +02:00
Davide Scaini cb345c02a1 preserving navigation 2026-03-30 20:27:34 +02:00
Davide Scaini 877472e620 trying to get sub label showed properly 2026-03-30 20:09:01 +02:00
Davide Scaini d806072546 improve configs, update docs 2026-03-30 13:30:43 +02:00
Davide Scaini a65923c3e0 fix unclosed tags 2026-03-30 13:06:31 +02:00
Davide Scaini 0865159cca upload external files 2026-03-30 13:06:20 +02:00
Davide Scaini a6a81f9421 personal records tab into athlete page 2026-03-30 10:53:51 +02:00
Davide Scaini 2cc53dece4 edit athlete data 2026-03-30 10:39:40 +02:00
Davide Scaini b78f921a3d fix heatmap in stats for bright theme 2026-03-30 09:22:23 +02:00
Davide Scaini ec6175b143 athlete page first draft 2026-03-30 09:05:18 +02:00
Davide Scaini 2a1493a3e5 bright/dark themes 2026-03-30 09:04:57 +02:00
Davide Scaini 1c49d3a769 zone alignment 2026-03-29 22:31:03 +02:00
Davide Scaini 9bd065f354 fixed some warnings 2026-03-29 22:17:01 +02:00
Davide Scaini 4537273de9 get default hr and power zones from config file 2026-03-29 22:06:22 +02:00
Davide Scaini 3fcc8bc089 added power 2026-03-29 21:55:35 +02:00
Davide Scaini 018958f0e9 histograms with ranges 2026-03-29 21:53:00 +02:00
Davide Scaini b76791e197 improving stats page tooltips (click day keeps tooltip open) 2026-03-29 21:23:06 +02:00
Davide Scaini 6fa7e2bea3 add publish infrastructure and update docs for public release
- publish/manifest: explicit file allowlist for public repo
- publish/CLAUDE.md: sanitized version (no personal data paths)
- publish/extract_config.example.yaml: generic paths and owner
- publish.sh: orphan-branch publish script (single squashed commit)
- site/.env.example: documents BINCIO_DATA_DIR and PUBLIC_EDIT_URL
- README.md: updated pipeline diagram, quick start, project layout
- CHEATSHEET.md: added bincio render and bincio edit sections,
  sidecar format reference, updated daily workflow
2026-03-29 16:07:06 +02:00
Davide Scaini 547105550b Merge branch 'dev/edit' 2026-03-29 15:57:02 +02:00
Davide Scaini a9839e8242 gallery of photos in the activity page 2026-03-29 15:51:39 +02:00
Davide Scaini b0ab7fbe3f integrate edit button into astro site 2026-03-29 15:39:11 +02:00
Davide Scaini d9ddae57ba use percentile instead of linear scale from max 2026-03-29 11:26:58 +02:00
Davide Scaini 5647e52865 add overing in stats page 2026-03-29 11:20:48 +02:00
Davide Scaini eadfb1a0fa fix heatmap months legend 2026-03-29 11:11:54 +02:00
Davide Scaini ee98704562 added filtering to the stats page 2026-03-29 11:01:08 +02:00
Davide Scaini e71e8783ab added skiing 2026-03-29 10:51:26 +02:00
Davide Scaini 643d092acd fix activities' types 2026-03-29 10:37:08 +02:00
Davide Scaini 3441079913 map now working 2026-03-28 19:34:22 +01:00