Skip to content

QA-8698 Hide Delivery Progress And Warnings In The Learn App - #3964

Open
OrangeAndGreen wants to merge 1 commit into
commcare_2.65from
QA-8698-learn-app-delivery-status
Open

OrangeAndGreen wants to merge 1 commit into
commcare_2.65from
QA-8698-learn-app-delivery-status

Conversation

@OrangeAndGreen

@OrangeAndGreen OrangeAndGreen commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

QA-8698

Product Description

When a user revisits the learn app after proceeding to delivery, App Home for the learn app no longer shows the delivery app's "Daily Visits" progress or visit-limit warnings (not started, max visits, daily limit, per-unit). Ended, suspended and relearn-task messages still show.

Technical Summary

The home screen chose its Connect card content from the job status alone, without checking whether the seated app is the job's learn or delivery app. The card now checks ConnectAppRecord.getIsLearning() for the seated app, and getCardMessageText gains an overload that leaves out the delivery-only warnings.

Safety Assurance

Safety story

What gives confidence:

  • The delivery app's behaviour is unchanged: the existing overload passes true, and the delivery dashboard still uses it.
  • The new tests fail without the fix and pass with it; HomeConnectTileTest, HomeConnectJobProgressTest, ConnectJobRecordCardMessageTest and ConnectDeliveryDashboardFragmentTest pass.

Automated test coverage

  • HomeConnectTileTest: the daily visits row and a delivery warning are hidden in the learn app and shown in the delivery app for a job in delivery.
  • ConnectJobRecordCardMessageTest: without delivery warnings, a capped job reports nothing and an ended job still reports it.

🤖 Generated with Claude Code

The home screen chose its Connect card content from the job status alone,
so a job's learn app showed the delivery app's daily visits and visit-limit
warnings once the job moved to delivery (QA-8698).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@OrangeAndGreen OrangeAndGreen self-assigned this Oct 9, 2026
@OrangeAndGreen

Copy link
Copy Markdown
Contributor Author

Suggested Review Order

  • app/src/org/commcare/android/database/connect/models/ConnectJobRecord.java — new overload that drops delivery-only warnings
  • app/src/org/commcare/activities/StandardHomeActivityUIController.java — learn app check for the card message and daily visits row
  • app/unit-tests/src/org/commcare/android/database/connect/models/ConnectJobRecordCardMessageTest.kt — covers the overload
  • app/unit-tests/src/org/commcare/activities/HomeConnectTileTest.kt — learn vs. delivery app on the home screen

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6dc3bd71-9172-43c5-b0b8-d7aba54e2933

📥 Commits

Reviewing files that changed from the base of the PR and between 861d0bb and 44cb947.


📒 Files selected for processing (4)
  • app/src/org/commcare/activities/StandardHomeActivityUIController.java
  • app/src/org/commcare/android/database/connect/models/ConnectJobRecord.java
  • app/unit-tests/src/org/commcare/activities/HomeConnectTileTest.kt
  • app/unit-tests/src/org/commcare/android/database/connect/models/ConnectJobRecordCardMessageTest.kt


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.41%. Comparing base (f4b6c1b) to head (44cb947).
⚠️ Report is 7 commits behind head on commcare_2.65.

Additional details and impacted files
@@                 Coverage Diff                 @@
##             commcare_2.65    #3964      +/-   ##
===================================================
+ Coverage            37.32%   37.41%   +0.09%     
- Complexity            6864     6880      +16     
===================================================
  Files                 1034     1034              
  Lines                61094    61102       +8     
  Branches              7472     7476       +4     
===================================================
+ Hits                 22802    22863      +61     
+ Misses               35637    35577      -60     
- Partials              2655     2662       +7     

☔ 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.

@OrangeAndGreen
OrangeAndGreen marked this pull request as ready for review October 9, 2026 17:13
@OrangeAndGreen
OrangeAndGreen requested review from a team and conroy-ricketts and removed request for a team October 9, 2026 17:14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thoughts on checking whether the current seated app is a deliver app from getCardMessageText() directly (as opposed to passing in a new function parameter)?

Also, does this make the status == STATUS_DELIVERING check inside getCardMessageText() redundant?

Comment on lines +246 to +247
String appId = CommCareApplication.instance().getCurrentApp().getUniqueId();
ConnectAppRecord record = ConnectJobUtils.getAppRecord(appId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could extract these two lines into a reusable helper function since we need to get the seated app record in two different places in this class now.

Taking it a step further, we could also create a new function inside ConnectJobUtils that grabs the currently seated app's record for us. It looks like ConnectJobUtils.getJobForSeatedApp() is very similar and it could reuse a helper like that.

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