Commit Graph

250 Commits

Author SHA1 Message Date
Roland Geider
bdf4fa7174 Treat raw OSErrors as network errors
On iOS, dart:io fails setting TCP_NODELAY on a connection that was
already reset and throws a plain OSError instead of a SocketException.
The reachability probe rethrew it and the app showed an error dialog.

Closes #1397
2026-10-21 09:24:17 +02:00
Roland Geider
104b4ee71b Treat a pre-release server as below its release 2026-09-27 01:06:32 +02:00
Roland Geider
233a3c8312 Regenerate code for freezed 4 and drop field @override 2026-09-26 23:18:36 +02:00
Roland Geider
554a54e31b Finish the material_ui migration 2026-09-26 22:38:40 +02:00
Roland Geider
1b121ff22c Merge branch 'pr-1332-probe' into feat/upgrade-flutter-1316 2026-09-26 22:08:32 +02:00
Roland Geider
5bec45cdaf Ignore pointer scrolls on viewports that have no content dimensions yet
Fixes #1338
2026-09-06 17:26:40 +02:00
Roland Geider
31783745f2 Ask the probe for a body before treating a 403 as a rejection 2026-09-06 16:00:57 +02:00
Roland Geider
25e3e6485e Anchor the access token lifetime to the local clock 2026-09-06 15:51:18 +02:00
Roland Geider
c46763ffd0 Renew an expired access token before the first-time probe 2026-09-06 15:51:18 +02:00
Roland Geider
e701519d8f Keep the session through a failed or transient token refresh 2026-09-06 15:48:13 +02:00
Roland Geider
48dc290224 Renew an expired token instead of dropping the upload 2026-09-06 15:48:13 +02:00
Roland Geider
5c52b3481b Improve semver checks for min server version 2026-09-06 15:26:10 +02:00
Roland Geider
2d9b8cadb6 Reorder imports
dart fix --apply --code=directives_ordering
2026-09-03 20:42:06 +02:00
pankaj-basnet
5ab92f73cb test: align test imports for material_ui package usage 2026-09-01 21:30:57 +05:45
pankaj-basnet
f7930ce68b fix: remove material_ui imports where not needed 2026-09-01 21:12:14 +05:45
pankaj-basnet
fee0079dc9 material ui: post-flutter-3.47 imports, dart fix applied 2026-09-01 21:08:51 +05:45
Roland Geider
9e9f2b1fbf Time out hanging token fetches instead of freezing the sync 2026-08-28 10:48:22 +02:00
Roland Geider
46fb9461b0 Show the default dashboard while the settings load 2026-08-27 23:48:11 +02:00
Roland Geider
3f92631a89 Pre-fill the app version in bug reports 2026-08-27 21:19:10 +02:00
Roland Geider
deddaf7a48 Merge branch 'master' into feature/release-2.7 2026-08-26 13:52:53 +02:00
Roland Geider
db054ca4c1 Trim and consolidate more translation strings 2026-08-26 13:41:16 +02:00
Roland Geider
8b6b16e0a3 Trim and consolidate the new measurement strings 2026-08-26 13:00:35 +02:00
Roland Geider
f135da6d15 Carry the self-signed cert exemption into PowerSync's sync isolate
(Hopefully) finally fixes #116
2026-08-26 12:11:52 +02:00
Roland Geider
70bf59a3ec Test the dashboard calendar 2026-08-26 00:53:17 +02:00
Roland Geider
6096eadb37 Split up auth provider 2026-08-25 14:51:08 +02:00
Roland Geider
f6ff275526 Replace the revalidation listeners instead of stacking them 2026-08-25 14:04:01 +02:00
Roland Geider
a8c54a8944 Render the dashboard weight card through CategoriesCard 2026-08-25 13:42:44 +02:00
Roland Geider
6f23e492bb Pass the 401 through when a refresh could not deliver a new token 2026-08-25 13:32:51 +02:00
Roland Geider
ed65a0e42c Discard a token refresh that outlives its session 2026-08-24 22:56:29 +02:00
Roland Geider
a374ad3e70 Cut the session calendar days in the owner's timezone 2026-08-24 16:38:42 +02:00
Roland Geider
a7e3b5cfdc Link the server's terms of service from the about page 2026-08-22 21:25:18 +02:00
Roland Geider
185e5341ba Merge remote-tracking branch 'origin/master' into feature/release-2.7 2026-08-21 22:37:02 +02:00
Roland Geider
2c26c93d68 Merge remote-tracking branch 'origin/master' into fix/build-phase-ui-side-effects 2026-08-21 18:01:56 +02:00
Roland Geider
095323f29b Merge pull request #1327 from wger-project/feature/better-online-gating
Better online gating
2026-08-21 17:48:01 +02:00
Roland Geider
de758b5dfa Final fixes 2026-08-21 17:42:28 +02:00
Roland Geider
8829c57191 Collapse the PowerSync SDK's repeated log lines 2026-08-21 17:30:50 +02:00
Roland Geider
2a596349df Report reachability from the bottom of the client stack 2026-08-21 16:04:52 +02:00
Roland Geider
a9f2c07914 Surface a missing sync endpoint as its own error category 2026-08-21 16:04:21 +02:00
Roland Geider
a0fd3ad0e2 Make one provider the single Connectivity consumer 2026-08-21 15:29:52 +02:00
Roland Geider
9cb25ad538 Guard the probe pass against a mid-flight invalidation 2026-08-21 15:10:01 +02:00
Roland Geider
74fbb9db95 Coalesce overlapping reachability probes 2026-08-21 14:51:09 +02:00
Roland Geider
2073d462e6 Show a plain outage as disconnected, not as a sync error 2026-08-21 14:46:27 +02:00
Roland Geider
a5daf3c0a8 Keep the screenshot scenes off the real database 2026-08-21 10:01:06 +02:00
Roland Geider
16bc83c306 Allow users setting up calculated categories 2026-08-20 16:53:10 +02:00
Ben Tucker
fe33f693a8 fix(core): make UI side effects and provider reads safe during build
Errors handled while the widget tree is building crashed or wedged the
app in three related ways:

- FlutterError.onError showed dialogs and snackbars synchronously.
  Pushing a route mid-build trips the navigator's !_debugLocked
  assertion, and because the one-dialog guard was set before showDialog
  threw, its release never attached: every later error dialog was then
  silently suppressed while nothing was on screen, leaving a blank,
  unresponsive app until restart. Snackbars crashed outright via the
  messenger's setState.
- The sync status and barcode dialogs did ref.read inside their route
  builders, which run during build. With the provider chain dirty (any
  token refresh dirties wgerBase -> auth), the read flushed it there and
  Riverpod scheduled a scope refresh mid-build. The barcode builder also
  created its search future inline, re-firing the search on every dialog
  rebuild.
- Provider create bodies that widgets watch during build read providers
  synchronously: the dashboard's routine hydration chain crashed on cold
  start right after a token refresh, and TrophyStateNotifier.build()
  has the same shape in the post-login window, where invalidation order
  left networkStatusProvider dirty while its dependents rebuilt.

lib/core/build_safety.dart adds the two idioms as helpers: runAfterFrame
defers UI side effects past the build phase, yieldPastBuild yields
provider create bodies past their synchronous phase (a microtask, not a
timer, since widget tests assert !timersPending at teardown). The error
dialog guard is released when the context is gone or the push fails, the
snackbar helpers re-resolve the messenger inside the callback, the
dialog builders snapshot their providers in the tap handler, and
post-login invalidation runs leaf-first. Regression tests cover each
shape.
2026-08-16 17:29:43 -05:00
Roland Geider
2374e1b0ba Replace flutter_svg_icons with a local SvgIcon widget 2026-08-15 21:52:07 +02:00
Roland Geider
fb88facda9 Report the local sync counters in bug reports 2026-08-15 20:20:19 +02:00
Roland Geider
67ed4d8ca1 Report the local sync counters in bug reports 2026-08-15 18:39:27 +02:00
Roland Geider
9a97202dd4 Cleanup 2026-08-14 17:37:47 +02:00
Roland Geider
6e5555fe2f Mark the probe as in flight before the connectivity lookup 2026-08-14 16:09:32 +02:00