From 8328a382833a5be12626871984576cd5296efeb5 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 13 May 2026 20:33:53 +0000 Subject: [PATCH] fix: exercise list not shown in History when single session auto-expands loadSession called setExpandedIds for the single-session case but never called initSessionEdit, so edit.exercises stayed undefined and the exercise list rendered nothing. Body map still showed because it reads raw session data directly. Now initSessionEdit is called alongside setExpandedIds. https://claude.ai/code/session_01NwKrrVkWKrzCNzTnEdBqwK --- CHANGELOG.md | 5 +++++ app/src/components/History.jsx | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 836a74e..a033655 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to Workout Lens are documented here. +## [1.2.6] — 2026-05-13 + +### Fixed +- **Exercise list missing in History on mobile** — when a day with a single session was loaded, `loadSession` auto-expanded it by setting `expandedIds` but never called `initSessionEdit`. The body map rendered correctly (reads directly from raw session data) but the exercise list stayed hidden because `edit.exercises` was `undefined`. Fixed by calling `initSessionEdit` alongside `setExpandedIds` in the single-session auto-expand branch. + ## [1.2.5] — 2026-05-13 ### Fixed diff --git a/app/src/components/History.jsx b/app/src/components/History.jsx index 51663ca..110bc73 100644 --- a/app/src/components/History.jsx +++ b/app/src/components/History.jsx @@ -275,7 +275,12 @@ export default function History({ initialDate }) { return new Date(ta) - new Date(tb); }); setDaySessions(results); - setExpandedIds(results.length === 1 ? new Set([results[0].id]) : new Set()); + if (results.length === 1) { + setExpandedIds(new Set([results[0].id])); + initSessionEdit(results[0]); + } else { + setExpandedIds(new Set()); + } } catch (err) { logDevError("History/loadSession", err); } finally {