Skip to content

Commit 0508e2d

Browse files
benmosherclaude
andauthored
Auto-create one movement group when creating a new workout (#15)
Instead of starting with an empty groups array, new workouts now include one movement group with a blank movement and a default set (5 reps × 1 @ 0), so the editor is immediately ready for input. https://claude.ai/code/session_01NcqwefXDNkEAmXJ6kou93E Co-authored-by: Claude <noreply@anthropic.com>
1 parent 82f2d47 commit 0508e2d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/WorkoutList.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,16 @@ export default function WorkoutList() {
8181
<button
8282
type="button"
8383
onClick={async () => {
84-
const id = await putWorkout({ name: "", groups: [] });
84+
const id = await putWorkout({
85+
name: "",
86+
groups: [
87+
{
88+
movements: [
89+
{ name: "", maxId: null, sets: [{ reps: 5, count: 1, weight: 0 }] },
90+
],
91+
},
92+
],
93+
});
8594
navigate(`/workouts/${id}/edit`);
8695
}}
8796
>

0 commit comments

Comments
 (0)