mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
CONTRIBUTING-WITH-AI requires a review pass by a different agent before opening the PR. It found five issues; four are fixed here. toDetectedWorkout read durationSeconds(), so a POWR-dialect kind 1301 — which carries start/end and no duration tag — mapped to null and disappeared from the dashboard entirely. It now reads effectiveDurationSeconds(), the helper WorkoutDisplay already uses, and the function was already falling back to workoutStart() for the timestamp, so it was half-converted. Covered by a test built from start/end tags alone. MyFitnessScreen used a bare Scaffold while MY_FITNESS is pinnable to the bottom bar, so pinning it and tapping it made the bar vanish. Now DisappearingScaffold + AppBottomBar, matching Drafts and every other pinnable destination. The New Workout carousel still offered Health Connect workouts the user had already shared — the alreadyPublished flag was honoured only in My Fitness, so the duplicate-publish path fixed two commits ago stayed open one screen over. Both screens now build their "what have I already posted" view from one shared helper, publishedWorkoutsOf, because two answers to that question is what let them disagree in the first place. Also corrects the declaration's "Related code" paths, which still pointed at service/workouts/health for two files that now live in commons/fitness. The fifth finding is NOT fixed and is called out in the PR description: the dashboard never REQs kind 1301, so on a cold start it summarises only what some other screen happened to load. Fixing it means choosing outbox relays, which I cannot verify without a device or relay, and guessing at relay selection is worse than not fetching. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019egdJyBHnrATZHjs86up8f