Repository navigation
QA-8698 Hide Delivery Progress And Warnings In The Learn App - #3964
OrangeAndGreen wants to merge 1 commit into
Conversation
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>
Suggested Review Order
|
|
Warning Review limit reachedYou'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. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
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 @@
## 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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?
| String appId = CommCareApplication.instance().getCurrentApp().getUniqueId(); | ||
| ConnectAppRecord record = ConnectJobUtils.getAppRecord(appId); |
There was a problem hiding this comment.
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.
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, andgetCardMessageTextgains an overload that leaves out the delivery-only warnings.Safety Assurance
Safety story
What gives confidence:
true, and the delivery dashboard still uses it.HomeConnectTileTest,HomeConnectJobProgressTest,ConnectJobRecordCardMessageTestandConnectDeliveryDashboardFragmentTestpass.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