Skip to content

Remove unused DOTS tracker feature#3732

Open
avazirna wants to merge 4 commits into
masterfrom
remove-dots-entry-activity
Open

Remove unused DOTS tracker feature#3732
avazirna wants to merge 4 commits into
masterfrom
remove-dots-entry-activity

Conversation

@avazirna

@avazirna avazirna commented May 22, 2026

Copy link
Copy Markdown
Contributor

Product Description

This PR removes the DOTS (Directly Observed Therapy) tracker feature, as it is no longer in use. The feature was originally developed for the UATBC project to track medication intake by program beneficiaries. Since it is obsolete, the associated functionality and related screens have been removed from the application. The main screen that were part of this feature include:

Calendar Day period Medication intake
dots_calendar dot_period dots_medication_intake

Technical Summary

Retires DotsEntryActivity and its supporting classes/resources. The activity was launchable only via the org.commcare.dalvik.action.DotsEntry intent action, declared exported="false" so only same-app callers could
fire it — and no in-tree caller fires that action. Neither commcare-android nor the libs/commcare-core submodule contains any reference to the action string or to the deleted classes outside the DOTS files themselves. Last substantive change to any of these sources was a 2025-09 lint pass; no feature work in years.

Safety Assurance

Safety story

  • Static verification on the branch tip: git grep for every removed class name, every removed resource ID, and the intent action string org.commcare.dalvik.action.DotsEntry returns zero matches in both app/ and the libs/commcare-core submodule.
  • Commit ordering keeps the manifest valid at every intermediate step (manifest dropped first, then classes, then resources — never a manifest pointing at a missing class).
  • Data impact: none expected. The activity serialized state into its own bundle key (DOTS_DATA); since nothing on master launches it, there are no in-flight payloads to migrate.

Labels and Review

  • Manual QA: not required — feature is unreachable on master.
  • RELEASES.md: no update needed (no behavior change).
  • Risk: low (pure deletion, statically verified).
  • Reviewers: ping someone familiar with the historical DOTS tracker
    and the XForm intent-callout dispatch path.

avazirna and others added 3 commits May 19, 2026 18:29
Drops the activity declaration and the
org.commcare.dalvik.action.DotsEntry intent-filter so the DOTS tracker
is no longer launchable. This is the first step in retiring the
unused DOTS feature; the Java sources and resources are removed in
follow-up commits.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Removes DotsEntryActivity, DotsHomeView, DotsDetailView, DotsData, and
DotsEditListener. The activity is no longer registered in the
manifest, and no other code in app/ or commcare-core references these
classes. The orphaned DOTS layouts/drawables/colors are cleaned up in
the next commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Removes the layouts (dots_detail, dotsday, dotsdose, dotsdoses,
compact_dot_entry), drawables (dots_dose_border, dots_rect_back), and
the dotscolors values file that were used only by the now-deleted DOTS
tracker. No remaining code references these resources.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@avazirna avazirna self-assigned this May 22, 2026
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request removes the DOTS (Directly Observed Therapy Short-course) medication tracking feature entirely from the CommCare Android application. The removal includes deregistering the DotsEntryActivity from the manifest and eliminating the DotsHomeView UI component that displayed a calendar grid of medication days. The feature removal also extends across the codebase to eliminate the supporting data model (DotsData), listener interface (DotsEditListener), detail editing view (DotsDetailView), and all associated layout XML and drawable resources.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove unused DOTS tracker feature' directly and clearly summarizes the main change—a wholesale removal of the unreachable DOTS tracker activity and supporting classes/resources.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description check ✅ Passed The PR description comprehensively covers all required template sections with clear rationale, safety verification, and risk assessment.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-dots-entry-activity

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

@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.06%. Comparing base (9df8218) to head (66dbb08).
⚠️ Report is 125 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3732      +/-   ##
============================================
+ Coverage     23.66%   24.06%   +0.39%     
- Complexity     3997     4009      +12     
============================================
  Files           924      920       -4     
  Lines         56194    55539     -655     
  Branches       6654     6543     -111     
============================================
+ Hits          13301    13366      +65     
+ Misses        41196    40461     -735     
- Partials       1697     1712      +15     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@avazirna avazirna marked this pull request as ready for review June 5, 2026 16:34
@avazirna avazirna requested a review from ctsims June 5, 2026 16:47
@avazirna

avazirna commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@ctsims I've been planning to remove this feature for some time. Any concerns with this removal?

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