Skip to content

Add notes field to WorkoutLog - #1300

Open
kmannarbor wants to merge 2 commits into
wger-project:masterfrom
kmannarbor:feature/workout-log-notes
Open

Add notes field to WorkoutLog#1300
kmannarbor wants to merge 2 commits into
wger-project:masterfrom
kmannarbor:feature/workout-log-notes

Conversation

@kmannarbor

Copy link
Copy Markdown

Companion to wger-project/wger#2462 and wger-project/react#1289.
Adds the new optional notes field to the Flutter workout log, mirroring
the Django and React changes.

Proposed Changes

  • WorkoutLogTable + PowersyncWorkoutLogTable: add nullable notes text column
  • Log model: notes field with constructor param, copyWith, and toCompanion
  • GymLogNotifier: add setNotes() method
  • Gym mode log entry form: notes text field
  • Past logs list: notes shown inline in subtitle when present
  • Log edit dialog: notes text field, persisted on save

Note: database.g.dart was hand-updated (Flutter not available in dev
environment). Recommend running dart run build_runner build to verify the
generated output is identical.

Related Issue(s)

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Set a 100-character limit to avoid white space diffs (run dart format .)

kmannarbor and others added 2 commits August 2, 2026 21:57
Companion to wger-project/wger#2462 and wger-project/react#XXXX.

- WorkoutLogTable: add nullable `notes` text column (Drift + PowerSync)
- Log model: add `notes` field with constructor, copyWith, and toCompanion
- GymLogNotifier: add setNotes() method
- LogFormWidget: add notes TextFormField with onChanged handler
- LogsPastLogsWidget: show notes inline in past-log subtitle when present
- LogEditDialog: add notes TextFormField, persist on save

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6 unit tests in log_test.dart cover the notes constructor, copyWith,
and toCompanion behaviour. 3 integration tests in
workout_logs_repository_test.dart verify notes persist through the
in-memory Drift database.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant