5kmrun-bg / 5kmrun-bg/fivekmrun-app
Follow-ups left over from #229 (strava_client migration)
- Linguagem predominante
- Dart
- Estrelas
- 8
- Forks
- 7
- Merge médio
- 2d 8h
- PRs com merge (30d)
- 30
Descrição
#229 migrated `strava_client` off the git fork onto pub.dev 2.3.1 and kept the
scope to the mechanical package swap. This tracks what it deliberately left
behind, plus two things found while verifying it.
## 1. Reconcile the hand-rolled token refresh with 2.3.x's built-in one
Deferred from #229, flagged in #221.
`strava_client` 2.3.0 added automatic token refresh, which overlaps with the
app's own `_isTokenExpired()` / `_assureAuthenticated()` logic in
`lib/state/strava_resource.dart` (see lines ~98, ~110, ~215, ~258).
The existing logic still works — it just occasionally forces an unnecessary
re-auth prompt instead of letting the package refresh transparently. So this
is a UX papercut and dead weight, not a defect.
Worth deciding deliberately whether to drop the hand-rolled path or keep it as
a belt-and-braces fallback, rather than leaving two mechanisms silently
overlapping.
## 2. Drop the `app_links` dependency_overrides pin
`pubspec.yaml` carries:
```yaml
dependency_overrides:
app_links: ">=7.0.0 <7.1.0"
```
`strava_client` 2.3.1 wants `app_links ^7.1.1`, but that floor requires Dart
>=3.12.0 — ahead of what this project's Flutter version ships. 7.0.0 satisfies
everything `strava_client` actually uses (the deep-link URI stream).
Remove the override once the Flutter/Dart floor moves past 3.12, and let
`app_links` resolve normally. Worth re-checking whenever `FLUTTER_VERSION` is
bumped.
## 3. Archive `etabakov/strava_flutter`
From #221's acceptance criteria, deferred in #229 because it's an action on an
external repo. Do it once this release is confirmed stable in the stores. The
fork was byte-identical to its upstream parent, so nothing is lost.
## 4. Document the clean-build requirement (found during verification)
Building iOS incrementally on a tree that predates #229 fails with:
```
'FlutterWebAuth2Plugin' has different definitions in different modules
Definition of 'FlutterWebAuth2Plugin' must be imported from module
'flutter_web_auth_2.Swift' before it is required
```
Cause: `flutter_web_auth_2` went 4.x -> 5.x and the stale module headers under
`build/ios/` conflict with the new ones. Fix is a clean rebuild:
```
flutter clean && rm -rf ios/Pods ios/.symlinks && flutter pub get && pod install
```
CI is unaffected (fresh checkout), so this only bites locally — and the error
message gives no hint at the cause. Worth a note in the README or the Flutter
upgrade notes.
## 5. `isEligibleWeeklyRun` conditions are not independently pinned
#229 added good fixture-driven tests for `isEligibleWeeklyRun`, but two of its
conditions can be deleted with the suite still green:
- removing `activity.manual == false` — the `run_manual_treadmill` fixture has
`manual: true` **and** `start_latlng: null`, so GPS still rejects it
- removing either latlng check — `run_no_gps` has both `start_latlng` and
`end_latlng` empty, so the other check still rejects it
The assertions are correct; the fixtures just fail for overlapping reasons.
Pinning each condition independently needs two more fixtures: a manual run
*with* GPS, and a run with a start latlng but no end latlng.
Low priority — the behaviour is right today, it's the regression net that has
holes.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.