-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commcare 2.59.3 Backmerge #3349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…droid into commcare_2.59 Updated manifest to 2.59.3
📝 WalkthroughWalkthrough
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Fragment as ConnectJobsListsFragment
participant Utils as ConnectJobUtils
participant Store as Job Store
User->>Fragment: Trigger failure navigation
Fragment->>Utils: getCompositeJobs(status = STATUS_ALL_JOBS)
note right of Fragment: Changed from -1 to STATUS_ALL_JOBS
Utils->>Store: Query jobs (all statuses)
Store-->>Utils: Jobs list
Utils-->>Fragment: Composite jobs
Fragment-->>User: Display failure jobs list
sequenceDiagram
autonumber
participant App
participant Upgrader as ConnectDatabaseUpgrader
participant DB as SQLiteDatabase
App->>Upgrader: upgradeSeventeenEighteen()
Upgrader->>DB: beginTransaction()
Upgrader->>DB: Recreate PersonalIdCredential table
Upgrader->>DB: setTransactionSuccessful()
note right of Upgrader: Newly added call
Upgrader->>DB: endTransaction()
Upgrader-->>App: Upgrade step complete
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/AndroidManifest.xml(1 hunks)app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java(1 hunks)app/src/org/commcare/models/database/connect/ConnectDatabaseUpgrader.java(1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.530Z
Learning: PR #3048 "Phase 4 Connect PR" introduces a substantial feature called "Connect" to the CommCare Android app, which includes messaging, job management, delivery tracking, payment processing, authentication flows, and learning modules. It follows a modern architecture using Navigation Components with three navigation graphs, segregated business logic in Manager classes, and proper database persistence.
📚 Learning: 2025-07-29T14:11:36.386Z
Learnt from: OrangeAndGreen
PR: dimagi/commcare-android#3248
File: app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java:0-0
Timestamp: 2025-07-29T14:11:36.386Z
Learning: In ConnectJobsListsFragment.java error handling for JSON parsing, if the JSONObject obj is null when passed to handleCorruptJob(), the team prefers to let the code crash rather than adding defensive null checks. This follows the fail-fast philosophy used throughout the Connect feature to catch programming errors immediately rather than masking them.
Applied to files:
app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java
📚 Learning: 2025-05-08T11:08:18.530Z
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.530Z
Learning: PR #3048 "Phase 4 Connect PR" introduces a substantial feature called "Connect" to the CommCare Android app, which includes messaging, job management, delivery tracking, payment processing, authentication flows, and learning modules. It follows a modern architecture using Navigation Components with three navigation graphs, segregated business logic in Manager classes, and proper database persistence.
Applied to files:
app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java
📚 Learning: 2025-05-09T10:57:41.073Z
Learnt from: Jignesh-dimagi
PR: dimagi/commcare-android#3093
File: app/res/navigation/nav_graph_connect_messaging.xml:41-45
Timestamp: 2025-05-09T10:57:41.073Z
Learning: In the CommCare Android codebase, the navigation graph for Connect messaging (`nav_graph_connect_messaging.xml`) intentionally uses `channel_id` as the argument name in the connectMessageFragment, despite using `channelId` in other parts of the same navigation graph. This naming difference is by design in the refactored code.
Applied to files:
app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java
📚 Learning: 2025-07-29T14:10:58.243Z
Learnt from: OrangeAndGreen
PR: dimagi/commcare-android#3248
File: app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java:0-0
Timestamp: 2025-07-29T14:10:58.243Z
Learning: In ConnectJobsListsFragment.java, the team intentionally uses different error handling strategies: JSONException should throw RuntimeException to crash the app (fail-fast for data contract violations), while IOException should be logged and allow graceful continuation (for network/stream issues). This follows the established Connect module pattern of treating different exception types differently based on their nature.
Applied to files:
app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java
📚 Learning: 2025-04-18T20:13:29.655Z
Learnt from: OrangeAndGreen
PR: dimagi/commcare-android#3040
File: app/src/org/commcare/android/database/connect/models/ConnectJobDeliveryFlagRecord.java:39-55
Timestamp: 2025-04-18T20:13:29.655Z
Learning: In the CommCare Android Connect feature, the JSON object passed to `ConnectJobDeliveryFlagRecord.fromJson()` method should never be null based on the implementation design.
Applied to files:
app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java
🧬 Code graph analysis (1)
app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java (1)
app/src/org/commcare/connect/database/ConnectJobUtils.java (1)
ConnectJobUtils(25-383)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Lint Code Base
🔇 Additional comments (2)
app/src/org/commcare/models/database/connect/ConnectDatabaseUpgrader.java (1)
639-645: Thanks for marking the transaction successful.
Line 645 now callsdb.setTransactionSuccessful(), preventing the drop-and-recreate from being rolled back. 👍app/src/org/commcare/fragments/connect/ConnectJobsListsFragment.java (1)
104-104: Good swap to the explicit status constant.
UsingConnectJobRecord.STATUS_ALL_JOBSon Line 104 makes the intent clear and keeps the call aligned withConnectJobUtils. Looks good.
app/AndroidManifest.xml
Outdated
| android:versionCode="106" | ||
| android:versionName="2.60"> | ||
| android:versionName="2.59.3"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep master’s versionName from regressing.
Line 5 drops the user-visible version from 2.60 back to 2.59.3. Master already advertised 2.60, so any build produced from this branch after the merge would claim to be 2.59.3 despite containing post-2.60 changes. Please keep the higher version (or bump forward) on master and manage the 2.59.3 tagging solely in the release branch.
- android:versionName="2.59.3">
+ android:versionName="2.60">🤖 Prompt for AI Agents
In app/AndroidManifest.xml around lines 4-5, the change regresses the
user-visible android:versionName from 2.60 to 2.59.3; restore the higher
versionName (set it back to 2.60 or bump to a newer appropriate patch like
2.60.x) so master never advertises a lower version, and if you change
versionName also ensure android:versionCode remains monotonically increasing for
Play store semantics; keep the 2.59.3 tag/state only in the release branch.
3fb0042 to
04c0a20
Compare
No description provided.