Skip to content

fix(statistics): mobility backfill keeps unfetched days; visible 0% home stay - #691

Merged
Zeroupper merged 3 commits into
testfrom
fix/distance-from-location
Sep 18, 2026
Merged

Zeroupper merged 3 commits into
testfrom
fix/distance-from-location

Conversation

@Zeroupper

@Zeroupper Zeroupper commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Mobility card fixes only. Distance is computed in mobility_features and was always 0 there - fixed at the source in carp-dk/flutter-plugins#1306; nothing app-side needed once carp_context_package picks up mobility_features 6.2.1.

  • backfill no longer clears days it did not fetch (CAWS filters by upload time, so a lagging upload blanked yesterday)
  • a measured 0% home stay draws a faint track, distinguishable from "no measurement"
  • "km travelled" removed from the mobility card - it duplicates the distance card

@Zeroupper
Zeroupper force-pushed the fix/distance-from-location branch from b67ed3b to 222b4b1 Compare September 16, 2026 11:54
@Zeroupper Zeroupper changed the title fix(statistics): distance from location fixes, visible 0% home stay fix(statistics): mobility backfill keeps unfetched days; visible 0% home stay Sep 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The mobility card can still render with empty mobility content when only distance data exists.

Pull request overview

Fixes mobility backfill retention, clarifies measured 0% home stay, and removes duplicated distance from the mobility card.

Changes:

  • Preserve mobility days omitted from partial backfills.
  • Render a faint track for measured 0% home stay.
  • Remove duplicate distance display and update dependencies/localizations.
  • Update the mobility-card visibility predicate to avoid empty cards when only distance data exists.
File summaries
File Summary
test/data_backfill_test.dart Adds backfill retention coverage.
pubspec.lock Updates mobility_features to 6.2.1.
lib/view_models/cards/mobility_data_model.dart Preserves uncovered mobility days.
lib/ui/cards/mobility_card.dart Updates visualization and removes distance display.
assets/lang/es.json Removes obsolete distance translation.
assets/lang/en.json Removes obsolete distance translation.
assets/lang/da.json Removes obsolete distance translation.
Review details

Suppressed comments (1)

lib/ui/cards/mobility_card.dart:74

  • Removing the distance feature leaves hasData counting day.distance > 0 (mobility_data_model.dart:14). A day that only has a distance reading will therefore still render this card, but it now shows -, 0 places, and an empty home-stay bar while the distance is shown in the separate card. Please update the mobility-card visibility predicate to require a displayed mobility feature (places or homeStay), while keeping hasDistanceData for the distance card.
              _feature('${_day.places}', locale.translate('cards.mobility.places')),
  • Files reviewed: 6/7 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Zeroupper Zeroupper self-assigned this Sep 17, 2026
@Zeroupper
Zeroupper merged commit 0ff5825 into test Sep 18, 2026
3 checks passed
@Zeroupper
Zeroupper deleted the fix/distance-from-location branch September 18, 2026 07:56
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.

2 participants