Commit Graph

1019 Commits

Author SHA1 Message Date
Roland Geider
6d0352a42c Track the entry unit in extra_data and convert on display 2026-07-30 18:54:13 +02:00
Roland Geider
b86c1e7e0e Store body weight in the official measurements category 2026-07-30 17:28:01 +02:00
Roland Geider
41623e3d55 Merge remote-tracking branch 'origin/master' into feature/health-sync 2026-07-30 16:31:11 +02:00
Roland Geider
914e9ac575 Surface involuntary logouts and revalidate the session on app resume
This makes it obvious why users are redirected to the auth screen, since the
snackbar could be easily missed.

See #1265
2026-07-30 15:47:04 +02:00
Roland Geider
1a58dd8f71 Warn in the settings while certificates are not being verified 2026-07-30 14:23:37 +02:00
Roland Geider
0ecd06ff3c Read the certificate setting from the provider instead of mirroring it 2026-07-30 14:06:19 +02:00
Roland Geider
3a57479585 Scope the self-signed setting to one host and apply without a restart 2026-07-30 13:57:41 +02:00
Roland Geider
41378988d0 Merge branch 'master' into feat/allow-self-signed-certs
# Conflicts:
#	lib/core/app_settings_notifier.dart
#	lib/core/app_settings_notifier.g.dart
#	lib/core/http_overrides.dart
#	lib/features/auth/widgets/auth_card.dart
#	lib/main.dart
#	test/features/account/widgets/settings_test.dart
2026-07-30 13:20:33 +02:00
Roland Geider
fb43a9fdd2 Allow setting the meal when logging individual ingredients 2026-07-30 12:30:02 +02:00
Roland Geider
24c3a93d97 Filter out empty logs
Closes #1293
2026-07-30 11:38:57 +02:00
Roland Geider
9e446e0b94 Allow users to submit issues to github with full stackstrace and sync debug info 2026-07-29 17:23:09 +02:00
Roland Geider
718fa05d1b Add sync diagnostics to the "submit to github" error dialog 2026-07-29 17:06:05 +02:00
Roland Geider
30f44ad471 Show more sync information on the sync status dialog
Also, make it stateful so it shows live data for sync queue size, etc.
2026-07-29 16:50:14 +02:00
Roland Geider
d72a0ccf93 Allow users to force-reconnect to the powersync service 2026-07-29 16:22:30 +02:00
Roland Geider
4f4b32e61d Make exerciseObj in SlotEntry hydration-safe 2026-07-29 14:46:54 +02:00
Roland Geider
e1a613d712 Merge branch 'feat/weight-chart-range' into feature/health-sync
# Conflicts:
#	lib/features/measurements/widgets/helpers.dart
2026-07-28 22:48:32 +02:00
Roland Geider
f13ef5f630 Merge branch 'master' into feat/weight-chart-range
# Conflicts:
#	lib/features/weight/widgets/weight_overview.dart
2026-07-28 22:41:46 +02:00
Roland Geider
45aeda7ac0 Merge branch 'master' into feature/health-sync
# Conflicts:
#	lib/l10n/app_de.arb
#	lib/l10n/app_es.arb
#	lib/l10n/app_fr.arb
2026-07-28 22:39:59 +02:00
Roland Geider
0cf4111c8d Set fixed size for logo
This was causing tests to fail due to the screen size and the sharding behaviour
in CI
2026-07-28 17:05:07 +02:00
Roland Geider
3e1c86d318 Merge remote-tracking branch 'origin/master' into dependabot/pub/powersync-2.3.2 2026-07-28 16:12:53 +02:00
Roland Geider
4a632189d3 Fix flaky test 2026-07-28 15:30:09 +02:00
Roland Geider
b5847b4f84 Adapt the code to changes in powersync 2.3.2 2026-07-28 15:18:55 +02:00
Roland Geider
47764efd7e Merge pull request #1288 from wger-project/feature/better-handling-of-powersync-url
More intelligent powersync service URL handling
2026-07-28 15:13:50 +02:00
Roland Geider
3ee512fd6c More intelligent powersync service URL handling
When the server-provided powersync URL is not reachable, try using $server-url/ps/.
This should help with self-hosted instances where SITE_URL points to localhost
or other similar misconfigurations

See https://github.com/wger-project/wger/issues/2432
2026-07-28 15:06:34 +02:00
Matz Hilven
b7a0d4893c Hydrate the exercise when copying a past log in gym mode
Not copying an exercise that isn't there keeps the crash away, but gym
mode then holds a log with no exercise, which would bite the next reader.

The past logs widget already knows the exercise from the set config, so
pass it down to setLog, which assigns it through the exercise setter so
that exerciseId stays consistent.

The notifier test worked around the old behaviour by setting exerciseObj
on every fixture, with a comment explaining that copyWith needs it. That
was the bug, written down, so it's gone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XzxNFoPMxsFPxHD3P2Ma3w
2026-07-28 00:11:08 +02:00
Matz Hilven
1b199bd06e Fix crash when copying a log with no hydrated exercise
Log.exerciseObj was declared late and is only ever assigned when
hydrating the logs of a routine's sessions. Logs read from the database
are built through drift's row class and only carry exerciseId, so
copyWith threw a LateInitializationError when it unconditionally read
the field. Copying a past log in gym mode does exactly that.

Make the field nullable behind a getter that throws a descriptive error,
add exerciseObjOrNull for callers that legitimately handle logs straight
from the database, and only carry the exercise over when there is one.

Hydrating the exercise in watchLogsByExerciseDrift instead would mean
joining its translations, images, muscles and equipment for every log,
which most callers don't need.

The log page tests mocked the query with the test routine's logs, which
are hydrated, which is why this was never caught. They now return logs
without an exercise, like the real query does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XzxNFoPMxsFPxHD3P2Ma3w
2026-07-28 00:07:43 +02:00
Roland Geider
ffc21b00fe Merge branch 'feature/1130-workout-timer' 2026-07-24 13:59:40 +02:00
Roland Geider
44c111376d Allow to configure showing and hiding the workout duration 2026-07-24 13:55:03 +02:00
Roland Geider
ac3b463304 Some cleanup 2026-07-24 13:40:41 +02:00
Roland Geider
b277e81088 Detect a sync stream that is blocked on the network path
This might help debugging when an ad-blocker, vpn or similar interferes with
the connections to the sync service

See #1271
2026-07-23 14:56:29 +02:00
Roland Geider
ed623f9108 Improve PowerSync sync diagnostics and token expiry handling 2026-07-23 13:58:06 +02:00
Arya
2f60553a99 Add elapsed workout timer and update workout start time handling 2026-07-23 17:13:02 +05:30
Roland Geider
938001b152 Optimistically set the online status
This avoids having the app register as "offline" after bringing it back from
the background
2026-07-17 21:31:29 +02:00
Roland Geider
db98af0ac7 Make sure the code can work with nullable routines in workout logs 2026-07-17 18:25:22 +02:00
Roland Geider
a9e2950bf5 Add some more tests 2026-07-17 18:05:52 +02:00
Roland Geider
d8408aa75d Convert HealthSyncState to freezed 2026-07-17 18:05:51 +02:00
Roland Geider
6d08c0afa6 Notify the user with a snackbar when health permissions are denied 2026-07-17 18:05:51 +02:00
Roland Geider
3bea05e7c2 Read health data with an overlap window to catch backdated records 2026-07-17 18:05:51 +02:00
Roland Geider
7ebb97c462 Fix source default, hide health settings section when unavailable 2026-07-17 18:05:51 +02:00
Roland Geider
f0a088eb0e Round imported health values to match backend and lowercase external ids 2026-07-17 18:05:51 +02:00
Roland Geider
b6c83ff37f Rename files so they match the ones they test 2026-07-17 17:38:50 +02:00
pankaj-basnet
432d9f1dde feat(measurements): add category form test , update categories screen test 2026-07-14 12:42:21 +05:45
pankaj-basnet
5c129bbb7d test(measurements): add GroupMeasurementEntryForm widget tests and addGroupEntries notifier unit tests 2026-07-13 15:49:47 +05:45
pankaj-basnet
e81bb990ea test(measurements): add unit tests for chart rendering, aggregation, metric routing, and composite group cards (#1251)
Validates MeasurementBarChartWidgetFl rendering, aggregatePerDay logic, buildChartForMetricType routing, and CategoriesCard group composition for multi-value metrics like blood pressure.
2026-07-13 09:51:54 +05:45
Roland Geider
3fc33e1acc Add multi-value measurements to the test data 2026-07-11 00:37:10 +02:00
Roland Geider
cbb960bdef Filter out sub-categories, fix off-by-one index 2026-07-11 00:31:35 +02:00
Roland Geider
066d6430d8 Refactor the data model for multi-value categories
Measurement categories can optionally point to another category, In practice, this
will just be something like blood pressure since these values only make sense in a
pair. Others can be interesting while combined (heart rate and steps), but are valid
on their own.
2026-07-10 16:18:48 +02:00
Roland Geider
8aac3da7a8 Add workaround for swift package manager for the health package 2026-07-10 15:46:42 +02:00
Roland Geider
42507844d2 Cleanup, translations and small tests 2026-07-09 17:12:51 +02:00
Roland Geider
bad4993226 Merge branch 'feature/health-sync' into feat/healthsync
# Conflicts:
#	lib/database/powersync/tables/measurements.dart
#	lib/features/measurements/models/measurement_category.dart
#	lib/features/measurements/widgets/helpers.dart
2026-07-09 16:10:54 +02:00