fix: remove telemetry/analytics code entirely - #75
Conversation
F-Droid re-review flagged the app as still "defaulting to the Railway endpoint" and persisting a UUID, even though analyticsEnabled already defaults to false and gates every automatic call (PR #74). Rather than keep relitigating a gated-but-present capability, remove it outright: - Delete ApiService (sendHeartbeat, trackEvent, reportUsage, backupData, userAppId, the Railway _baseUrl) entirely. - Delete settings_screen.dart, an orphaned duplicate of profile_screen.dart that was the only other caller of trackEvent/backupData and was never instantiated from any route. - Remove the analyticsEnabled setting and the Privacy toggle from SettingsProvider/profile_sections.dart — nothing left to toggle. - Remove the ApiService provider registration and the gated call block from main.dart's AppInitializer. No network code touching the Railway backend remains anywhere in the reachable app. http and uuid stay in pubspec.yaml — both used elsewhere (gemini_ai_service.dart, workout_provider.dart, etc.). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe application removes ChangesApplication analytics removal
Profile privacy and preference removal
Standalone settings removal
Merge Risk: ⚪ Minimal · up to The PR removes the telemetry code and its settings without introducing any supplied merge-blocking concern; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
+ Coverage 38.54% 38.83% +0.29%
==========================================
Files 85 83 -2
Lines 14070 13946 -124
==========================================
- Hits 5423 5416 -7
+ Misses 8647 8530 -117 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Brings in the telemetry/analytics removal (#73, #74, #75) that r2.1.0 picked up from main, which this branch had diverged from. Two conflicts, both where the removed telemetry sat next to new SQLite work: - main.dart: kept the health-data sync kicked off after init, dropped the adjacent api.sendHeartbeat()/trackEvent()/reportUsage() calls. - test_harness: kept the HealthDataSyncService provider, dropped the ApiService one. ApiService is gone with this merge, so the comment justifying the unconditional Hive.initFlutter() no longer held. The call is still required — the cutover flag lives in that Hive settings box and has to be readable before the backend is resolved — so the comment now says that instead. flutter analyze clean; 948 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Summary
Third round on F-Droid MR 40630. #74 made
analyticsEnableddefault tofalseand gate every automatic call — confirmed working by the reviewer on 2026-08-24 ("This resolves my previous Tracking block"). A re-review of the same pinned commit three days later reversed to BLOCKED with language that doesn't reflect the guard clause (posted a reply asking the reviewer to confirm which commit they checked: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/40630#note_3747429598).Rather than keep relitigating a gated-but-present capability, this removes it outright:
ApiServiceentirely —sendHeartbeat,trackEvent,reportUsage,backupData,userAppId, and the Railway_baseUrlconstant are all gone.settings_screen.dart— an orphaned duplicate ofprofile_screen.dart, never instantiated from any route, and the only other caller oftrackEvent/backupData.analyticsEnabledsetting and the Privacy toggle fromSettingsProvider/profile_sections.dart— nothing left to toggle.ApiServiceprovider registration and the gated call block frommain.dart.No code path anywhere in the reachable app touches the Railway backend.
httpanduuidstay inpubspec.yaml— both still used elsewhere (gemini_ai_service.dart,workout_provider.dart, etc.).Test plan
flutter analyze— clean (pre-existing unrelated issues only, in untracked WIP files from another branch)flutter test— full suite passes except one pre-existing, unrelated failure inreadiness_manager_test.dart(date-boundary logic in health-data mocks, nothing to do with this change)🤖 Generated with Claude Code
Summary by CodeRabbit