Skip to content

Release: join a study flow, analytics identity fixes - #264

Merged
dz4va merged 33 commits into
mainfrom
release-AJ-650-join_a_study
Jun 2, 2026
Merged

Release: join a study flow, analytics identity fixes#264
dz4va merged 33 commits into
mainfrom
release-AJ-650-join_a_study

Conversation

@dz4va

@dz4va dz4va commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • Added container version to the Firestore app event payload in DefaultAppEventPayloadHandler.
  • Added World Bank Study ID confirmation UI, including confirm dialog layout, button/background drawables, and study
    ID display.
  • Added pseudo ID caching so cr_user_id is generated and preserved locally.
  • Added custom-domain intent handling and app link support for curiousreader://app and supported HTTPS domains.
  • Refactored Android manifest deep link data tags for cleaner scheme/host declarations.
  • Added study_user_id support to app launch analytics.
  • Added joined_study Firebase analytics event.
  • Added analytics unit tests for custom events, app launch study ID behavior, and joined-study payload behavior.
  • Replaced the enrollment toast with a custom success dialog.
  • Removed app_info.version from the joined_study event payload because it was erroring.
  • Stopped overwriting cr_user_id with the incoming study ID from app links.
  • Preserved study_user_id separately from cr_user_id.
  • Made study enrollment write-once so later app links do not reopen the modal or overwrite the stored study ID.
  • Fixed Play Store deferred deeplink parsing so language, source, and campaign_id are extracted separately.
  • Added singleTop / documentLaunchMode="never" launch behavior to avoid duplicate MainActivity instances from repeated
    app links.
  • Added scroll handling for long study confirmation messages.
  • Added multiple CI-generated debug APK artifacts.
  • Bumped release version to 2.34.3 and updated version code.

How to test

  • Open testing release

Ref: AJ-650

Summary by CodeRabbit

  • New Features

    • Added study enrollment flow with confirmation and success dialogs for users enrolling in studies.
    • Introduced user ID confirmation dialog with visual confirmation feedback.
    • Enhanced app link support for multiple domains including new study-related endpoints.
    • Added analytics tracking for study enrollment events.
  • Chores

    • Updated app version to 2.34.3.
    • Refactored app link handling and deferred deep-link language parsing.
  • Tests

    • Added test coverage for study enrollment analytics and user ID tracking.

Rajesh1041 and others added 30 commits May 10, 2026 10:57
MR-72 Update DefaultAppEventPayloadHandler.java
fix: [MR-84] added container version to firestore payload
Add ID confirmation dialog UI and improve project configuration
- Persist confirmed study_user_id after successful study enrollment
- Store the study ID alongside the existing pseudoId using a dedicated preference key
- Append study_user_id only to app_launch Firebase event parameters when available
- Leave unenrolled app_launch events unchanged by omitting study_user_id
- Add unit coverage for app_launch events with and without a persisted study_user_id
- Restore the existing language_selected analytics test invocation so the test class passes
feat: add study user id to app launch analytics
feat: replace toast with custom success dialog
refactor:  Disabling cr_user_id modification!
…nk language handling

- Preserve the original cr_user_id while storing study_user_id separately.
- Make study enrollment write-once so later app links do not reopen the modal or overwrite the saved phone-number ID.
- Fix Play Store deferred deeplink parsing so language, source, and campaign ID are extracted independently.
@dz4va dz4va self-assigned this Jun 2, 2026
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds study enrollment functionality triggered by deep-link intents, enabling users to confirm and register with a study via study_user_id and optional consent fields. The flow includes a confirmation dialog with animated button, success notification, analytics event tracking with study user ID enrichment, and updated deep-link intent filters for multiple app domains.

Changes

Study Enrollment with Intent Handling and Analytics

Layer / File(s) Summary
Study enrollment intent flow and lifecycle
app/src/main/java/org/curiouslearning/container/MainActivity.java
MainActivity adds onNewIntent() override and handleIncomingIntent() method to parse study_user_id enrollment links, manage duplicate enrollment via instance flags, dismiss language dialogs, show a confirmation dialog with animated confirm button, persist study user ID and consent, log a joined-study analytics event, reload for selected language, and show a timed success notification. Language popup display is suppressed while confirmation/success UI is active. Deferred deep-link language parsing and dropdown sizing logic are refactored.
Enrollment confirmation and success UI
app/src/main/res/layout/dialog_confirm_id.xml, app/src/main/res/layout/dialog_enrollment_success.xml, app/src/main/res/drawable/bg_button_confirm.xml, app/src/main/res/drawable/bg_dialog.xml, app/src/main/res/drawable/bg_id_field.xml, app/src/main/res/values/strings.xml
New layout resources define a confirmation dialog with scrollable message and ID display container, a success dialog with centered celebration emoji, button/dialog/field background shapes with gradients and rounded corners, and new string resources for confirmation prompt, placeholder, and button labels.
Analytics for study enrollment and app launch enrichment
app/src/main/java/org/curiouslearning/container/firebase/AnalyticsUtils.java, app/src/test/java/org/curiouslearning/container/AnalyticsUtilsCustomEventsTest.java
AnalyticsUtils adds APP_CACHED_PREFS and STUDY_USER_ID constants, a new logJoinedStudyEvent() public method with sanitizeStudyUserId() helper, and addStudyUserIdForAppLaunch() helper to enrich app_launch events from cached preferences. Test coverage verifies event payload/user properties and ID sanitization, including cases with and without cached study user ID.
Deep-link intent filters and referrer parsing
app/src/main/AndroidManifest.xml, app/src/main/java/org/curiouslearning/container/installreferrer/InstallReferrerManager.java
AndroidManifest.xml updates MainActivity to use singleTop launch mode and never documentLaunchMode, adds intent filter data entries with https scheme for feedthemonsterdev, feedthemonster, and curiousreader domains. InstallReferrerManager refactors deferred deep-link parsing to extract the language query parameter and pass it via onReferrerReceived().
Event payload enrichment and version bump
app/src/main/java/org/curiouslearning/container/core/subapp/handler/DefaultAppEventPayloadHandler.java, app/build.gradle
DefaultAppEventPayloadHandler injects container_version from BuildConfig.VERSION_NAME into payload data maps and updates normalizeCollection() to explicitly map "summary_data" to the COLLECTION_SUMMARY constant. Summary update log message now includes the document ID. app/build.gradle bumps versionCode to 85 and versionName to 2.34.3.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • curiouslearning/CRcontainer#261: Modifies MainActivity's handleIncomingIntent and confirm dialog flow for study_user_id enrollment with AnalyticsUtils.STUDY_USER_ID and joined-study analytics.
  • curiouslearning/CRcontainer#254: Adds deep-link intent handling for study_user_id/confirmation_message/study_consent with confirmation-dialog state gating and onNewIntent in MainActivity.
  • curiouslearning/CRcontainer#259: Replaces cr_user_id_confirmed analytics event with joined_study event in MainActivity and AnalyticsUtils implementation.

Suggested reviewers

  • Rajesh1041
  • miguelccodev

🐰 A rabbit hops through the deep links with glee,
Study IDs confirmed, enrollment flows free,
Analytics enriched with IDs cached in place,
Success dialogs celebrate at a quick pace, 🎉
Intent filters dance, languages align—
Version bumps up, and everything's fine!

🚥 Pre-merge checks | ✅ 4 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Tests & Lint & Coverage ⚠️ Warning testLogJoinedStudyEvent has failing assertion on app_info.version (line 177) not set by implementation. No linting configured/checked. No 70% coverage threshold enforced. Remove app_info.version assertion from test (matches PR's removal of field). Add linting plugin to build.gradle. Enforce 70% coverage threshold via Jacoco.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the primary changes: implementing a study enrollment flow and fixing analytics identity tracking, both major objectives evident in the changeset.
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.

✏️ 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 release-AJ-650-join_a_study

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 and usage tips.

coderabbitai[bot]
coderabbitai Bot previously requested changes Jun 2, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/java/org/curiouslearning/container/MainActivity.java`:
- Line 257: Move the RecyclerView initialization (initRecyclerView()) to execute
before handling any incoming intents so that any intent-driven loadApps() calls
cannot observe or touch apps.webApps before the adapter/list is ready;
specifically, call initRecyclerView() prior to handleIncomingIntent(getIntent())
in MainActivity (ensure initRecyclerView() runs before any code paths that call
loadApps(), including observer callbacks triggered by incoming intent language
data) and adjust other spots where loadApps() may run (the loadApps()/apps
observer regions around the lines noted) to guarantee the RecyclerView and its
adapter are initialized first.
- Around line 329-342: The current check requires study_consent=="true" to start
enrollment, which blocks links that only include study_user_id; change the logic
in the block that handles newIdRaw (around variables newIdRaw, studyConsent,
newId, handledStudyEnrollmentLink) so that enrollment proceeds whenever newId is
present (set handledStudyEnrollmentLink = true and show the confirmation flow
when newId is non-empty), and only treat studyConsent as an optional flag —
i.e., if "true".equals(studyConsent) then record/store/log consent (or set the
consent-related state), otherwise continue enrollment without blocking; leave
cachePseudoId() and prefs.contains("pseudoId") behavior as-is.

In `@app/src/main/res/layout/dialog_confirm_id.xml`:
- Around line 7-13: Replace the hard-coded fixed width on the ConstraintLayout
by making it responsive: change the ConstraintLayout's android:layout_width from
"320dp" to a fluid value (e.g., "match_parent" or "wrap_content" with side
margins) and add a cap using android:maxWidth="320dp" (and keep the existing
android:layout_margin/padding) so the dialog can shrink on small viewports but
never exceed 320dp; update the ConstraintLayout attributes
(android:layout_width, android:maxWidth, android:layout_margin or start/end
margins) accordingly.

In `@app/src/main/res/layout/dialog_enrollment_success.xml`:
- Around line 17-25: Replace the lone emoji TextView with two accessible
elements: keep the decorative emoji TextView but set its text via layout (or
keep) and mark it decorative with android:contentDescription="`@null`" and
android:importantForAccessibility="no"; add a new TextView (or replace text)
that uses a localized string resource (e.g. `@string/enrollment_success`) for the
success copy and ensure it is reachable by accessibility (no null
contentDescription) and set android:accessibilityLiveRegion="polite" so TalkBack
announces it; also confirm MainActivity’s auto-dismiss behavior still allows the
announcement (e.g. MainActivity should not immediately clear focus or close the
dialog before the live region announces).

In `@app/src/main/res/values/strings.xml`:
- Around line 17-20: The copy currently refers to “Curious Reader User ID” but
the flow writes `study_user_id`; update the string resources to use “study ID”
terminology instead: change confirm_id_message to ask “Would you like to set
your study ID to the following value?”, change confirm_id_placeholder from
"[phone]" to a neutral "[study ID]" (or appropriate example), and keep
confirm_id_button_text/confirm_id_button_description as-is; ensure the new
wording aligns with `study_user_id` and does not imply overwriting `cr_user_id`.

In
`@app/src/test/java/org/curiouslearning/container/AnalyticsUtilsCustomEventsTest.java`:
- Around line 158-186: The test testLogJoinedStudyEvent is asserting that the
event Bundle contains "app_info.version" but AnalyticsUtils.logJoinedStudyEvent
no longer populates that key; update the test to remove the assertion
assertEquals("2.34.3", b.getString("app_info.version")) (and any related
expectations) so it no longer expects that key, leaving the other assertions and
verifications for AnalyticsUtils.logJoinedStudyEvent,
FirebaseAnalytics.logEvent, and setUserProperty intact; alternatively, if you
prefer to keep the assertion, modify AnalyticsUtils.logJoinedStudyEvent to
include "app_info.version" in the Bundle before calling
FirebaseAnalytics.logEvent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e893af02-68ff-42ab-ac7e-fc55eda0a136

📥 Commits

Reviewing files that changed from the base of the PR and between ab6b654 and 6cfca19.

📒 Files selected for processing (14)
  • app/build.gradle
  • app/fastlane/debug_apks/app-debug.apk
  • app/src/main/AndroidManifest.xml
  • app/src/main/java/org/curiouslearning/container/MainActivity.java
  • app/src/main/java/org/curiouslearning/container/core/subapp/handler/DefaultAppEventPayloadHandler.java
  • app/src/main/java/org/curiouslearning/container/firebase/AnalyticsUtils.java
  • app/src/main/java/org/curiouslearning/container/installreferrer/InstallReferrerManager.java
  • app/src/main/res/drawable/bg_button_confirm.xml
  • app/src/main/res/drawable/bg_dialog.xml
  • app/src/main/res/drawable/bg_id_field.xml
  • app/src/main/res/layout/dialog_confirm_id.xml
  • app/src/main/res/layout/dialog_enrollment_success.xml
  • app/src/main/res/values/strings.xml
  • app/src/test/java/org/curiouslearning/container/AnalyticsUtilsCustomEventsTest.java

+ language.substring(1).toLowerCase();
}
}
handleIncomingIntent(getIntent());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Move initRecyclerView() before any intent-driven loadApps() call.

Line 257 can route a deep link into loadApps() before Line 267 initializes apps. If the incoming intent carries language, the observer can dispatch immediately and hit apps.webApps in loadApps(), so a cold start via deep link can crash before the RecyclerView is ready.

Suggested fix
         InstallReferrerManager installReferrerManager = new InstallReferrerManager(getApplicationContext(),
                 referrerCallback);
         installReferrerManager.checkPlayStoreAvailability();
+        initRecyclerView();
         handleIncomingIntent(getIntent());
         audioPlayer = new AudioPlayer();
         FirebaseApp.initializeApp(this);
@@
-        initRecyclerView();
         Log.d(TAG, "onCreate: Selected language: " + selectedLanguage);

Also applies to: 267-267, 365-377

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/org/curiouslearning/container/MainActivity.java` at line
257, Move the RecyclerView initialization (initRecyclerView()) to execute before
handling any incoming intents so that any intent-driven loadApps() calls cannot
observe or touch apps.webApps before the adapter/list is ready; specifically,
call initRecyclerView() prior to handleIncomingIntent(getIntent()) in
MainActivity (ensure initRecyclerView() runs before any code paths that call
loadApps(), including observer callbacks triggered by incoming intent language
data) and adjust other spots where loadApps() may run (the loadApps()/apps
observer regions around the lines noted) to guarantee the RecyclerView and its
adapter are initialized first.

Comment on lines +329 to +342
String newIdRaw = data.getQueryParameter("study_user_id");
String confirmationMessageRaw = data.getQueryParameter("confirmation_message");
String studyConsent = data.getQueryParameter("study_consent");

// Verify or generate cr_user_id before processing
if (!prefs.contains("pseudoId")) {
cachePseudoId();
}

if (newIdRaw != null && !newIdRaw.isEmpty()) {
String newId = newIdRaw.replaceAll("[^0-9]", "");

if ("true".equals(studyConsent) && !newId.isEmpty()) {
handledStudyEnrollmentLink = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Treat study_consent as optional when starting enrollment.

Line 341 makes study_consent=true mandatory, so links that only carry study_user_id never reach the confirmation dialog. That contradicts the flow described in the PR, where consent is stored/logged when present but should not block enrollment itself.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/org/curiouslearning/container/MainActivity.java` around
lines 329 - 342, The current check requires study_consent=="true" to start
enrollment, which blocks links that only include study_user_id; change the logic
in the block that handles newIdRaw (around variables newIdRaw, studyConsent,
newId, handledStudyEnrollmentLink) so that enrollment proceeds whenever newId is
present (set handledStudyEnrollmentLink = true and show the confirmation flow
when newId is non-empty), and only treat studyConsent as an optional flag —
i.e., if "true".equals(studyConsent) then record/store/log consent (or set the
consent-related state), otherwise continue enrollment without blocking; leave
cachePseudoId() and prefs.contains("pseudoId") behavior as-is.

Comment on lines +7 to +13
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="320dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="24dp"
android:padding="28dp"
android:background="@drawable/bg_dialog">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make the confirmation dialog width responsive.

Lines 8-12 hard-code 320dp plus 24dp margins, which can exceed a 320dp viewport and clip the enrollment UI on small phones or split-screen. Use a width that can shrink with the screen and cap it with a max width instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/res/layout/dialog_confirm_id.xml` around lines 7 - 13, Replace
the hard-coded fixed width on the ConstraintLayout by making it responsive:
change the ConstraintLayout's android:layout_width from "320dp" to a fluid value
(e.g., "match_parent" or "wrap_content" with side margins) and add a cap using
android:maxWidth="320dp" (and keep the existing android:layout_margin/padding)
so the dialog can shrink on small viewports but never exceed 320dp; update the
ConstraintLayout attributes (android:layout_width, android:maxWidth,
android:layout_margin or start/end margins) accordingly.

Comment on lines +17 to +25
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="🎉"
android:textSize="80sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add actual success copy here, not just an emoji.

This dialog only exposes 🎉. Combined with the 2-second auto-dismiss in MainActivity, TalkBack users get no reliable confirmation that enrollment succeeded. Add a localized success message and treat the emoji as decorative.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/res/layout/dialog_enrollment_success.xml` around lines 17 - 25,
Replace the lone emoji TextView with two accessible elements: keep the
decorative emoji TextView but set its text via layout (or keep) and mark it
decorative with android:contentDescription="`@null`" and
android:importantForAccessibility="no"; add a new TextView (or replace text)
that uses a localized string resource (e.g. `@string/enrollment_success`) for the
success copy and ensure it is reachable by accessibility (no null
contentDescription) and set android:accessibilityLiveRegion="polite" so TalkBack
announces it; also confirm MainActivity’s auto-dismiss behavior still allows the
announcement (e.g. MainActivity should not immediately clear focus or close the
dialog before the live region announces).

Comment on lines +17 to +20
<string name="confirm_id_message">Would you like to set your Curious Reader User ID to the following value?</string>
<string name="confirm_id_placeholder">[phone]</string>
<string name="confirm_id_button_text">✔</string>
<string name="confirm_id_button_description">Confirm</string>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use “study ID” terminology in this copy.

These strings say the app is setting the “Curious Reader User ID”, but the new flow writes study_user_id and preserves cr_user_id separately. In an enrollment/consent flow, that wording is misleading.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/res/values/strings.xml` around lines 17 - 20, The copy currently
refers to “Curious Reader User ID” but the flow writes `study_user_id`; update
the string resources to use “study ID” terminology instead: change
confirm_id_message to ask “Would you like to set your study ID to the following
value?”, change confirm_id_placeholder from "[phone]" to a neutral "[study ID]"
(or appropriate example), and keep
confirm_id_button_text/confirm_id_button_description as-is; ensure the new
wording aligns with `study_user_id` and does not imply overwriting `cr_user_id`.

Comment on lines +158 to +186
@Test
public void testLogJoinedStudyEvent() {
FirebaseAnalytics spyFA = Mockito.spy(FirebaseAnalytics.getInstance(context));
try (MockedStatic<FirebaseAnalytics> faStatic = Mockito.mockStatic(FirebaseAnalytics.class)) {
faStatic.when(() -> FirebaseAnalytics.getInstance(context)).thenReturn(spyFA);

AnalyticsUtils.logJoinedStudyEvent(
context,
"12345",
"Nepali",
"2.34.3",
"12345",
"true"
);

ArgumentCaptor<Bundle> captor = ArgumentCaptor.forClass(Bundle.class);
verify(spyFA).logEvent(eq("joined_study"), captor.capture());
Bundle b = captor.getValue();
assertEquals("Nepali", b.getString("cr_language"));
assertEquals("2.34.3", b.getString("app_info.version"));
assertEquals("12345", b.getString("cr_user_id"));
assertEquals("test_source", b.getString("source"));
assertEquals("test_campaign", b.getString("campaign_id"));
assertEquals("12345", b.getString("study_user_id"));
assertEquals("true", b.getString("study_consent"));
verify(spyFA).setUserProperty("source", "test_source");
verify(spyFA).setUserProperty("campaign_id", "test_campaign");
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if logJoinedStudyEvent includes app_info.version in its implementation

rg -A 30 'logJoinedStudyEvent' --type=java -g '!*Test*' | rg -C 5 'app_info.version'

Repository: curiouslearning/CRcontainer

Length of output: 53


Fix testLogJoinedStudyEvent expecting app_info.version when joined_study no longer sets it.
app_info.version isn’t present in non-test Java code around logJoinedStudyEvent, so assertEquals("2.34.3", b.getString("app_info.version")); will fail. Update the test to stop asserting this field (or add app_info.version back to the event payload).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@app/src/test/java/org/curiouslearning/container/AnalyticsUtilsCustomEventsTest.java`
around lines 158 - 186, The test testLogJoinedStudyEvent is asserting that the
event Bundle contains "app_info.version" but AnalyticsUtils.logJoinedStudyEvent
no longer populates that key; update the test to remove the assertion
assertEquals("2.34.3", b.getString("app_info.version")) (and any related
expectations) so it no longer expects that key, leaving the other assertions and
verifications for AnalyticsUtils.logJoinedStudyEvent,
FirebaseAnalytics.logEvent, and setUserProperty intact; alternatively, if you
prefer to keep the assertion, modify AnalyticsUtils.logJoinedStudyEvent to
include "app_info.version" in the Bundle before calling
FirebaseAnalytics.logEvent.

@dz4va
dz4va dismissed coderabbitai[bot]’s stale review June 2, 2026 17:57

Dismissing for now as all of our test cases aren't failing

@dz4va
dz4va merged commit 5f4ed5f into main Jun 2, 2026
1 check passed
@amitsinghsutara
amitsinghsutara deleted the release-AJ-650-join_a_study branch June 18, 2026 04:18
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.

5 participants