Skip to content

fix: remove telemetry/analytics code entirely - #75

Merged
Devasy merged 1 commit into
mainfrom
fix/remove-telemetry-code
Aug 27, 2026
Merged

fix: remove telemetry/analytics code entirely#75
Devasy merged 1 commit into
mainfrom
fix/remove-telemetry-code

Conversation

@Devasy

@Devasy Devasy commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

Third round on F-Droid MR 40630. #74 made analyticsEnabled default to false and 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:

  • Deleted ApiService entirely — sendHeartbeat, trackEvent, reportUsage, backupData, userAppId, and the Railway _baseUrl constant are all gone.
  • Deleted settings_screen.dart — an orphaned duplicate of profile_screen.dart, never instantiated from any route, and the only other caller of trackEvent/backupData.
  • Removed the analyticsEnabled setting and the Privacy toggle from SettingsProvider/profile_sections.dart — nothing left to toggle.
  • Removed the ApiService provider registration and the gated call block from main.dart.

No code path anywhere in the reachable app touches the Railway backend. http and uuid stay in pubspec.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 in readiness_manager_test.dart (date-boundary logic in health-data mocks, nothing to do with this change)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes
    • Removed the dedicated Settings screen, including backup, import/export, weight-unit, and increment controls.
    • Removed privacy settings for anonymous usage-data sharing from the Profile screen.
    • Removed automatic usage analytics, app-open tracking, heartbeat reporting, and remote backup functionality.
    • Removed the related analytics preference from app settings.

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>
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6d5f853f-661e-435f-9937-895b329bf475

📥 Commits

Reviewing files that changed from the base of the PR and between 3716b60 and 1964e90.

📒 Files selected for processing (6)
  • workout-logger/lib/main.dart
  • workout-logger/lib/screens/profile_screen.dart
  • workout-logger/lib/screens/settings_screen.dart
  • workout-logger/lib/screens/widgets/profile_sections.dart
  • workout-logger/lib/services/api_service.dart
  • workout-logger/lib/services/settings_provider.dart
💤 Files with no reviewable changes (6)
  • workout-logger/lib/services/api_service.dart
  • workout-logger/lib/screens/settings_screen.dart
  • workout-logger/lib/services/settings_provider.dart
  • workout-logger/lib/screens/widgets/profile_sections.dart
  • workout-logger/lib/screens/profile_screen.dart
  • workout-logger/lib/main.dart

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The application removes ApiService, startup analytics reporting, the profile privacy section, analytics preference state, and the standalone settings screen with backup and import/export controls.

Changes

Application analytics removal

Layer / File(s) Summary
Remove API service and startup analytics
workout-logger/lib/main.dart, workout-logger/lib/services/api_service.dart
The composition root no longer provides or reads ApiService. Startup heartbeat, event tracking, and usage reporting are removed. The ApiService implementation is deleted.

Profile privacy and preference removal

Layer / File(s) Summary
Remove privacy controls and analytics state
workout-logger/lib/screens/profile_screen.dart, workout-logger/lib/screens/widgets/profile_sections.dart, workout-logger/lib/services/settings_provider.dart
PrivacySection is removed from the profile screen and its implementation is deleted. SettingsProvider no longer stores or updates analyticsEnabled.

Standalone settings removal

Layer / File(s) Summary
Delete settings and data-transfer screen
workout-logger/lib/screens/settings_screen.dart
SettingsScreen and its state are deleted, including remote backup, JSON export, JSON import, merge handling, unit controls, and increment preference controls.

Merge Risk: ⚪ Minimal · up to 1964e

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)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: complete removal of telemetry and analytics code.
Docstring Coverage ✅ Passed 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…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.83%. Comparing base (f2bdbab) to head (1964e90).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Devasy
Devasy merged commit b865da0 into main Aug 27, 2026
4 checks passed
@Devasy
Devasy deleted the fix/remove-telemetry-code branch August 27, 2026 17:44
Devasy added a commit that referenced this pull request Aug 28, 2026
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>
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.

1 participant