Skip to content

Conversation

@pm-dimagi
Copy link
Contributor

Product Description

QA-7928
The issue was Payment is setting to null on calling updatePaymentConfirmationTile before so the api was not marking the payment as recieved

Technical Summary

Feature Flag

Safety Assurance

Safety story

Automated test coverage

QA Plan

Labels and Review

  • Do we need to enhance the manual QA test coverage ? If yes, the "QA Note" label is set correctly
  • Does the PR introduce any major changes worth communicating ? If yes, the "Release Note" label is set and a "Release Note" is specified in PR description.
  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@pm-dimagi pm-dimagi changed the base branch from master to Beta_2.58_474459 July 18, 2025 12:15
@pm-dimagi pm-dimagi added the skip-integration-tests Skip android tests. label Jul 18, 2025
@pm-dimagi
Copy link
Contributor Author

@damagatchi retest this please

@coderabbitai
Copy link

coderabbitai bot commented Jul 18, 2025

Caution

Review failed

Failed to post review comments.

📝 Walkthrough

Walkthrough

This change introduces a comprehensive set of new features and refactors for the "Connect" module in the application. Major additions include new activities (ConnectActivity, ConnectMessagingActivity), fragments for job management, messaging, delivery, learning progress, and payment confirmation, as well as multiple new RecyclerView adapters and data models. The update implements messaging channels, consent flows, delivery and learning progress tracking, payment confirmation workflows, and integrates Firebase Cloud Messaging (FCM) for notifications. Supporting utilities, helpers, and database access layers are added or extended to manage Connect-specific data and operations. The AndroidManifest, string resources, layouts, and Proguard configuration are updated accordingly. Several methods and responsibilities are refactored out of PersonalIdManager into new Connect-specific helpers.

Sequence Diagram(s)

Connect Messaging Notification Handling

sequenceDiagram
    participant FCM as Firebase Cloud Messaging
    participant Service as CommCareFirebaseMessagingService
    participant Util as FirebaseMessagingUtil
    participant UI as ConnectMessagingActivity

    FCM->>Service: onMessageReceived(RemoteMessage)
    Service->>Util: handleNotification(context, data, notification)
    Util->>Util: Parse action from payload
    alt action = CCC_MESSAGE
        Util->>UI: Start ConnectMessagingActivity with channelId
        UI->>UI: Validate channel, consent, encryption key
        UI->>UI: Navigate to message fragment or consent dialog
    else other actions
        Util->>Util: Handle other notification types
    end
Loading

Connect Job Progress Update Flow

sequenceDiagram
    participant User as User
    participant UI as StandardHomeActivity
    participant Helper as ConnectJobHelper
    participant API as Server API
    participant DB as Local Database

    User->>UI: Triggers sync
    UI->>Helper: updateConnectJobProgress()
    Helper->>API: Fetch job progress
    API-->>Helper: Job progress data
    Helper->>DB: Update job record
    Helper-->>UI: Notify progress update
    UI->>UI: Refresh Connect progress UI
Loading

Connect Messaging Channel Consent Flow

sequenceDiagram
    participant UI as ConnectMessageChannelListFragment
    participant User as User
    participant BottomSheet as ConnectMessageChannelConsentBottomSheet
    participant Manager as MessageManager
    participant API as Server API

    User->>UI: Selects messaging channel
    UI->>BottomSheet: Show consent dialog
    User->>BottomSheet: Accept consent
    BottomSheet->>Manager: updateChannelConsent()
    Manager->>API: Update consent status
    API-->>Manager: Success/Failure
    Manager-->>BottomSheet: Callback
    alt Success
        BottomSheet->>UI: Navigate to message fragment
    else Failure
        BottomSheet->>UI: Show error/toast
    end
Loading

Possibly related PRs

  • dimagi/commcare-android#3245: Both PRs modify menu_connect.xml and messaging menu item logic, updating menu item IDs and references in ConnectActivity.java.
  • dimagi/commcare-android#3198: Both PRs introduce the ConnectJobFragment base class and refactor Connect-related fragments to use a non-null active job instance.
  • dimagi/commcare-android#3163: Both PRs add the same new activities (ConnectMessagingActivity, ConnectActivity) and receiver (PaymentAcknowledgeReceiver) to the AndroidManifest.xml.

Suggested labels

skip-integration-tests

Suggested reviewers

  • shubham1g5
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pm_qa_7928

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@pm-dimagi pm-dimagi merged commit 15b53d7 into Beta_2.58_474459 Jul 18, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-integration-tests Skip android tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants