Repository: dimagi/commcare-android
Pull request #3124: - Restricted demo user from sending firebase otp
Author: login: jaypanchal-13
Labels: name: skip-integration-tests
description: Skip android tests.
Created: 2025-05-22T12:53:34Z | Merged: 2025-05-28T06:46:25Z

## Technical Summary
https://dimagi.atlassian.net/browse/CCCT-1210

## Feature Flag
Improvements


## 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


Diff:
diff --git a/app/res/navigation/nav_graph_personalid.xml b/app/res/navigation/nav_graph_personalid.xml
index 236954a0e9..7961f044ce 100644
--- a/app/res/navigation/nav_graph_personalid.xml
+++ b/app/res/navigation/nav_graph_personalid.xml
@@ -18,6 +18,10 @@
             android:id="@+id/action_personalid_biometric_config_to_personalid_message"
             app:destination="@id/personalid_message_display"
             app:popUpTo="@id/personalid_biometric_config" />
+        <action
+            android:id="@+id/action_personalid_biometric_config_to_personalid_name"
+            app:destination="@id/personalid_name"
+            app:popUpTo="@id/personalid_biometric_config" />
     </fragment>
 
     <fragment
@@ -140,7 +144,7 @@
             app:destination="@id/personalid_message_display" />
         <action
             android:id="@+id/action_personalid_phone_fragment_to_personalid_biometric_config"
-            app:destination="@id/personalid_biometric_config" />
+            app:destination="@id/personalid_biometric_config"/>
         <action
             android:id="@+id/action_personalid_phone_fragment_self"
             app:destination="@id/personalid_phone_fragment" />
diff --git a/app/res/values-pt/strings.xml b/app/res/values-pt/strings.xml
index 719522c435..b71603355f 100644
--- a/app/res/values-pt/strings.xml
+++ b/app/res/values-pt/strings.xml
@@ -446,6 +446,7 @@
     <string name="connect_verify_phone_resend">Não recebeu o seu código? Reenviar</string>
     <string name="connect_verify_phone_error">Erro ao verificar o código SMS</string>
     <string name="connect_verify_phone_resend_code">Reenviar código</string>
+    <string name="connect_verify_skip_phone_number">Vejo que é um utilizador de demonstração, por isso vamos saltar o OTP</string>
     <string name="connect_verify_phone_resend_wait">Não recebeu o seu código? Reenviar em %d s</string>
     <string name="connect_verify_phone_change">mudar</string>
     <string name="connect_verify_phone_verify">Verificar código</string>
diff --git a/app/res/values-sw/strings.xml b/app/res/values-sw/strings.xml
index 91b6b2c2e3..0e3aa4cb92 100644
--- a/app/res/values-sw/strings.xml
+++ b/app/res/values-sw/strings.xml
@@ -577,6 +577,7 @@
     <string name="connect_verify_phone_label_deactivate">Ili kuzima akaunti yako, tafadhali weka msimbo uliotumwa kwa SMS kwa nambari yako msingi ya simu.</string>
     <string name="connect_verify_phone_error">Hitilafu katika kuthibitisha nambari ya SMS</string>
     <string name="connect_verify_phone_resend_code">Tuma tena Msimbo</string>
+    <string name="connect_verify_skip_phone_number">Ninaona wewe ni mtumiaji wa onyesho kwa hivyo tutaruka OTP</string>
     <string name="connect_messaging_title">Kutuma ujumbe</string>
     <string name="connect_messaging_channel_list_title">Vituo</string>
     <string name="connect_messaging_channel_list_unconsented">Kituo ambacho hakijaidhinishwa</string>
diff --git a/app/res/values-ti/strings.xml b/app/res/values-ti/strings.xml
index 63d6b8548d..654ce2cf76 100644
--- a/app/res/values-ti/strings.xml
+++ b/app/res/values-ti/strings.xml
@@ -434,6 +434,7 @@
     <string name="connect_verify_phone_resend">ኮድካ ኣይተቐበልካን ዲኻ? ዳግማይ ስደድ</string>
     <string name="connect_verify_phone_error">ኮድ ኤስኤምኤስ ኣብ ምርግጋጽ ጌጋ</string>
     <string name="connect_verify_phone_resend_code">ዳግማይ ምልኣኽ ኮድ</string>
+    <string name="connect_verify_skip_phone_number">ዲሞ ተጠቃሚ ምዃንካ ይርእየካ ኣለኹ ስለዚ OTP ክንዝልፎ ኢና።</string>
     <string name="connect_verify_phone_resend_wait">ኮድካ ኣይተቐበልካን ዲኻ? ኣብ %d s ዳግማይ ስደድ</string>
     <string name="connect_verify_phone_change">ቁፅሪ ተሌፎን ቐይር።</string>
     <string name="connect_verify_phone_verify">ኮድ ኣረጋግፅ።</string>
diff --git a/app/res/values/strings.xml b/app/res/values/strings.xml
index 4d2b19b8bd..e752c4fd76 100644
--- a/app/res/values/strings.xml
+++ b/app/res/values/strings.xml
@@ -528,6 +528,7 @@
     <string name="connect_verify_phone_resend">Didn\'t receive your code? Resend</string>
     <string name="connect_verify_phone_error">Error verifying SMS code</string>
     <string name="connect_verify_phone_resend_code">Resend Code</string>
+    <string name="connect_verify_skip_phone_number">I see you\'re a demo user, so we\'ll skip the OTP</string>
 
     <string name="connect_verify_phone_resend_wait">Didn\'t receive your code? Resend in %d s</string>
     <string name="connect_verify_phone_change">Change</string>
diff --git a/app/src/org/commcare/AppUtils.java b/app/src/org/commcare/AppUtils.java
index 775e9f367d..45d8c2564d 100644
--- a/app/src/org/commcare/AppUtils.java
+++ b/app/src/org/commcare/AppUtils.java
@@ -1,7 +1,5 @@
 package org.commcare;
 
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
 import android.text.TextUtils;
 
 import org.commcare.android.database.app.models.UserKeyRecord;
@@ -27,7 +25,6 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashSet;
 import java.util.Set;
 
diff --git a/app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java b/app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java
index d9d8be6328..88d7842e02 100644
--- a/app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java
+++ b/app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java
@@ -8,14 +8,9 @@
 import android.view.ViewGroup;
 import android.widget.Toast;
 
-import androidx.annotation.NonNull;
-import androidx.biometric.BiometricManager;
-import androidx.biometric.BiometricPrompt;
-import androidx.fragment.app.Fragment;
-import androidx.navigation.NavDirections;
-import androidx.navigation.Navigation;
-
 import org.commcare.activities.connect.PersonalIdActivity;
+import org.commcare.activities.connect.viewmodel.PersonalIdSessionDataViewModel;
+import org.commcare.android.database.connect.models.PersonalIdSessionData;
 import org.commcare.connect.ConnectConstants;
 import org.commcare.connect.PersonalIdManager;
 import org.commcare.connect.database.ConnectDatabaseHelper;
@@ -28,7 +23,17 @@
 
 import java.util.Locale;
 
+import androidx.annotation.NonNull;
+import androidx.biometric.BiometricManager;
+import androidx.biometric.BiometricPrompt;
+import androidx.fragment.app.Fragment;
+import androidx.lifecycle.ViewModelProvider;
+import androidx.navigation.NavDirections;
+import androidx.navigation.Navigation;
+import androidx.navigation.fragment.NavHostFragment;
+
 import static android.app.Activity.RESULT_OK;
+import static org.commcare.utils.ViewUtils.showSnackBarWithOk;
 
 /**
  * Fragment that handles biometric or PIN verification for Connect ID authentication.
@@ -40,6 +45,8 @@ public class PersonalIdBiometricConfigFragment extends Fragment {
     private BiometricPrompt.AuthenticationCallback biometricCallback;
     private static final String KEY_ATTEMPTING_FINGERPRINT = "attempting_fingerprint";
     private ScreenPersonalidVerifyBinding binding;
+    private PersonalIdSessionDataViewModel personalIdSessionDataViewModel;
+    private PersonalIdSessionData personalIdSessionData;
 
     public PersonalIdBiometricConfigFragment() {
         // Required empty public constructor
@@ -57,6 +64,8 @@ public void onCreate(Bundle savedInstanceState) {
         if (savedInstanceState != null) {
             isAttemptingFingerprint = savedInstanceState.getBoolean(KEY_ATTEMPTING_FINGERPRINT);
         }
+        personalIdSessionDataViewModel = new ViewModelProvider(requireActivity()).get(PersonalIdSessionDataViewModel.class);
+        personalIdSessionData = personalIdSessionDataViewModel.getPersonalIdSessionData();
     }
 
     @Override
@@ -243,7 +252,15 @@ private void navigateForward(boolean enrollmentFailed) {
             boolean isConfigured = fingerprint == BiometricsHelper.ConfigurationStatus.Configured ||
                     pin == BiometricsHelper.ConfigurationStatus.Configured;
             if (isConfigured) {
-                Navigation.findNavController(binding.connectVerifyFingerprintButton).navigate(navigateToOtpScreen());
+                if (Boolean.FALSE.equals(personalIdSessionData.getDemoUser())) {
+                    NavHostFragment.findNavController(this).navigate(navigateToOtpScreen());
+                } else {
+                    View view = getView();
+                    if (view != null) {
+                        showSnackBarWithOk(view, getString(R.string.connect_verify_skip_phone_number),
+                                v -> NavHostFragment.findNavController(this).navigate(navigateToNameScreen()));
+                    }
+                }
             }
         }
     }
@@ -261,4 +278,8 @@ private NavDirections navigateToOtpScreen() {
         return PersonalIdBiometricConfigFragmentDirections.actionPersonalidBiometricConfigToPersonalidOtpPage(
                 ((PersonalIdActivity)requireActivity()).primaryPhone);
     }
+
+    private NavDirections navigateToNameScreen() {
+        return PersonalIdBiometricConfigFragmentDirections.actionPersonalidBiometricConfigToPersonalidName();
+    }
 }
diff --git a/app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java b/app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java
index 21c3d64b48..e68017301e 100644
--- a/app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java
+++ b/app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java
@@ -37,6 +37,7 @@
 import org.jetbrains.annotations.Nullable;
 
 import java.util.HashMap;
+import androidx.navigation.fragment.NavHostFragment;
 
 public class PersonalIdPhoneFragment extends Fragment {
 
diff --git a/app/src/org/commcare/utils/ViewUtils.java b/app/src/org/commcare/utils/ViewUtils.java
new file mode 100644
index 0000000000..d4cdfd0acc
--- /dev/null
+++ b/app/src/org/commcare/utils/ViewUtils.java
@@ -0,0 +1,21 @@
+package org.commcare.utils;
+
+import android.view.View;
+
+import com.google.android.material.snackbar.Snackbar;
+
+public class ViewUtils {
+    /**
+     * Displays a SnackBar with the given message and an "OK" button.
+     * The SnackBar will remain visible indefinitely until the "OK" button is pressed.
+     *
+     * @param view            The view to find a parent from. This view is used to create the SnackBar.
+     * @param message         The message text to show in the SnackBar.
+     * @param okClickListener The callback to be invoked when the "OK" button is clicked.
+     */
+    public static void showSnackBarWithOk(View view, String message, View.OnClickListener okClickListener) {
+        Snackbar.make(view, message, Snackbar.LENGTH_INDEFINITE)
+                .setAction("OK", okClickListener)
+                .show();
+    }
+}


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🧹 Nitpick comments (4)</summary><blockquote>

<details>
<summary>app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java (2)</summary><blockquote>

`8-8`: **Unused import added**

The `android.util.Log` import is added but never used in the code.


```diff
-import android.util.Log;
```

---

`219-221`: **Inconsistency: Unused navigation method**

The `navigateToBiometricSetup()` method is no longer used since the navigation logic was updated in `onConfigurationSuccess()`.


```diff
-    private NavDirections navigateToBiometricSetup() {
-        return PersonalIdPhoneFragmentDirections.actionPersonalidPhoneFragmentToPersonalidBiometricConfig();
-    }
```

</blockquote></details>
<details>
<summary>app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java (2)</summary><blockquote>

`250-254`: **Improve code formatting in conditional navigation logic.**

The conditional navigation logic is functionally correct, but the formatting could be improved for better readability.

```diff
-                if (!isDemoUser){
+                if (!isDemoUser) {
                     NavHostFragment.findNavController(this).navigate(navigateToOtpScreen());
-                }else {
-                    showSnackBarWithOk(getView(), getString(R.string.connect_verify_skip_phone_number), v -> NavHostFragment.findNavController(this).navigate(navigateToNameScreen()));
+                } else {
+                    showSnackBarWithOk(
+                        getView(),
+                        getString(R.string.connect_verify_skip_phone_number),
+                        v -> NavHostFragment.findNavController(this).navigate(navigateToNameScreen())
+                    );
                 }
```

---

`250-254`: **Check for potential view nullability.**

The call to `getView()` assumes the view is non-null, which should be the case during normal execution flow. However, it might be worth adding a null check for robustness.

```diff
                } else {
-                    showSnackBarWithOk(getView(), getString(R.string.connect_verify_skip_phone_number), v -> NavHostFragment.findNavController(this).navigate(navigateToNameScreen()));
+                    View view = getView();
+                    if (view != null) {
+                        showSnackBarWithOk(view, getString(R.string.connect_verify_skip_phone_number), 
+                            v -> NavHostFragment.findNavController(this).navigate(navigateToNameScreen()));
+                    } else {
+                        // Fallback if view is null
+                        NavHostFragment.findNavController(this).navigate(navigateToNameScreen());
+                    }
                }
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 2f8a062b89e74a99dc5ba4dc3dd2c30006710c83 and 4d9b65ca85f9ec55f2a3aa734ff97f22b29d321c.

</details>

<details>
<summary>📒 Files selected for processing (9)</summary>

* `app/res/navigation/nav_graph_personalid.xml` (3 hunks)
* `app/res/values-pt/strings.xml` (1 hunks)
* `app/res/values-sw/strings.xml` (1 hunks)
* `app/res/values-ti/strings.xml` (1 hunks)
* `app/res/values/strings.xml` (1 hunks)
* `app/src/org/commcare/AppUtils.java` (2 hunks)
* `app/src/org/commcare/android/database/connect/models/ConnectUserRecord.java` (1 hunks)
* `app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java` (6 hunks)
* `app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java` (4 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: Lint Code Base

</details>

<details>
<summary>🔇 Additional comments (16)</summary><blockquote>

<details>
<summary>app/src/org/commcare/android/database/connect/models/ConnectUserRecord.java (1)</summary>

`137-139`: **Good addition of a getter for the isDemo field.**

The implementation correctly exposes the existing `isDemo` field for use by other components that will check for demo user status.

</details>
<details>
<summary>app/res/values/strings.xml (1)</summary>

`531-531`: **Well-placed string resource for demo user flow.**

This string resource is appropriately positioned among other phone verification strings and provides a clear message to demo users about skipping the phone verification process.

</details>
<details>
<summary>app/src/org/commcare/AppUtils.java (1)</summary>

`208-220`: **Good utility method for persistent notification with acknowledgment.**

The `showSnackBarWithOk` method is well-documented and provides a reusable way to display important messages that require user acknowledgment. This is a good approach for the demo user flow where you want to ensure the user is aware of skipped verification steps.

</details>
<details>
<summary>app/res/values-sw/strings.xml (1)</summary>

`580-580`: **Appropriate Swahili translation for demo user message.**

The Swahili translation is consistent with the English version and properly communicates that phone verification will be skipped for demo users.

</details>
<details>
<summary>app/res/values-ti/strings.xml (1)</summary>

`437-437`: **String resource for demo user flow looks good**

This new string resource adds support for skipping phone verification for demo users in the Tigrinya language.

</details>
<details>
<summary>app/res/navigation/nav_graph_personalid.xml (3)</summary>

`13-16`: **LGTM - Added demo user flag parameter**

Adding this boolean parameter to the biometric config fragment allows properly determining when a user is in demo mode.

---

`25-28`: **LGTM - Added navigation to name screen**

This new navigation action supports the demo user flow by allowing direct navigation from biometric config to the name screen, bypassing phone verification.

---

`151-151`: **Code cleanup - removed trailing space**

Minor formatting improvement by removing an unnecessary trailing space.

</details>
<details>
<summary>app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java (2)</summary>

`172-172`: **LGTM - Passing demo user flag to configuration success handler**

Good implementation - passing the demo user flag from the session data to the success handler allows proper routing of demo users.

---

`186-189`: **Improved navigation with Safe Args**

The updated navigation implementation properly uses the Navigation Component's Safe Args pattern, which is more type-safe than the previous approach. The demo user flag is correctly passed to the destination fragment.

</details>
<details>
<summary>app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java (6)</summary>

`3-5`: **Appropriate use of static imports.**

The imports are correctly added to support the new functionality, with `showSnackBarWithOk` being statically imported from `AppUtils` for cleaner code.

---

`19-19`: **Well-handled navigation import.**

The addition of `NavHostFragment` import supports the updated navigation logic in the fragment.

---

`44-44`: **Good initialization of demo user flag.**

The boolean field is properly initialized with a default value of `false`, which aligns with the expected behavior where most users are not demo users.

---

`63-63`: **Correct argument extraction.**

The code properly extracts the `isDemoUser` flag from the fragment arguments using the generated `PersonalIdBiometricConfigFragmentArgs` class, ensuring the demo user state is maintained throughout the navigation flow.

---

`272-274`: **Well-structured navigation method.**

The new `navigateToNameScreen()` method follows the same pattern as other navigation methods in the class, maintaining code consistency.

---

`250-254`: <details>
<summary>✅ Verification successful</summary>

**Verify the snackbar message for demo users.**

The implementation correctly skips phone verification for demo users, but we should verify that the message string `R.string.connect_verify_skip_phone_number` clearly communicates this to users.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check the actual text of the string resource for the skip phone number message
rg "connect_verify_skip_phone_number" --type xml
```

Length of output: 671

---



</details>

**Snackbar message clarity verified**

The string resource reads “I see you’re a demo user so we’ll skip the phone check,” which clearly informs demo users that phone verification is skipped. No changes needed.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-22T12:56:05Z
user: login: shubham1g5
body: @jaypanchal-13 can we add a small video in the PR depicting the flow you have build just to get an overall feel of UX here. 

@shubham1g5 right now code is not testable as some api work is pending before this flow starts. So will not be able to take video of this flow
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-22T13:06:17Z
user: login: Jignesh-dimagi
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-22T14:04:47Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T04:58:39Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T05:20:24Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T05:28:11Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T07:21:05Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T07:21:22Z
user: login: Jignesh-dimagi
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T07:22:50Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T07:23:50Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T07:30:35Z
user: login: pm-dimagi
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T09:58:35Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T10:07:45Z
user: login: Jignesh-dimagi
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T11:53:44Z
user: login: coderabbitai[bot]
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T11:53:50Z
user: login: shubham1g5
state: DISMISSED
author_association: CONTRIBUTOR
submitted_at: 2025-05-27T11:38:16Z
user: login: jaypanchal-13
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-27T13:32:43Z
user: login: shubham1g5
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-28T06:37:51Z

Review comments:
diff_hunk: @@ -10,6 +10,10 @@
         android:name="org.commcare.fragments.personalId.PersonalIdBiometricConfigFragment"
         android:label="fragment_personalid_biometric_config"
         tools:layout="@layout/screen_personalid_verify">
+        <argument
+            android:name="isDemoUser"
+            app:argType="boolean"
+            android:defaultValue="false" />
path: app/res/navigation/nav_graph_personalid.xml
user: login: shubham1g5
body: the fragment should be able to access any user info directly from [this session object](https://github.com/dimagi/commcare-android/blob/master/app/src/org/commcare/android/database/connect/models/PersonalIdSessionData.kt) (This is our new approach vs passing as arguments as before)
created_at: 2025-05-22T12:55:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -446,6 +446,7 @@
     <string name="connect_verify_phone_resend">Não recebeu o seu código? Reenviar</string>
     <string name="connect_verify_phone_error">Erro ao verificar o código SMS</string>
     <string name="connect_verify_phone_resend_code">Reenviar código</string>
+    <string name="connect_verify_skip_phone_number">Veo que eres un usuario de demostración, así que omitiremos la verificación del teléfono</string>
path: app/res/values-pt/strings.xml
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Incorrect language in Portuguese string resource file**

The added string resource is in Spanish ("Veo que eres un usuario de demostración...") instead of Portuguese, despite being in the Portuguese (pt) strings file.


This needs to be replaced with the proper Portuguese translation for consistency with the rest of the file.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In app/res/values-pt/strings.xml at line 449, the string resource is incorrectly
written in Spanish instead of Portuguese. Replace the Spanish text with the
correct Portuguese translation to maintain language consistency in this
Portuguese strings file.
```

</details>

<!-- This is an auto-generated reply by CodeRabbit -->
created_at: 2025-05-22T12:56:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -242,7 +247,11 @@ private void navigateForward(boolean enrollmentFailed) {
             boolean isConfigured = fingerprint == BiometricsHelper.ConfigurationStatus.Configured ||
                     pin == BiometricsHelper.ConfigurationStatus.Configured;
             if (isConfigured) {
-                navigateToOtpScreen();
+                if (!isDemoUser){
+                    NavHostFragment.findNavController(this).navigate(navigateToOtpScreen());
+                }else {
+                    showSnackBarWithOk(getView(), getString(R.string.connect_verify_skip_phone_number), v -> NavHostFragment.findNavController(this).navigate(navigateToNameScreen()));
+                }
path: app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java
user: login: shubham1g5
body: code formatting and indentation is off here.  (Look at our readme in case you need help in setting up out code style)
created_at: 2025-05-22T12:58:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -528,6 +528,7 @@
     <string name="connect_verify_phone_resend">Didn\'t receive your code? Resend</string>
     <string name="connect_verify_phone_error">Error verifying SMS code</string>
     <string name="connect_verify_phone_resend_code">Resend Code</string>
+    <string name="connect_verify_skip_phone_number">I see you\'re a demo user so we\'ll skip the phone check</string>
path: app/res/values/strings.xml
user: login: shubham1g5
body: `phone check` doesn't make much sense for user,  just say `OTP` instead  ? Also there should be a `,` after `demo user` 
created_at: 2025-05-22T13:03:14Z
author_association: CONTRIBUTOR
diff_hunk: @@ -167,7 +169,7 @@ private void onContinueClicked() {
             protected void onSuccess(PersonalIdSessionData sessionData) {
                 personalIdSessionDataViewModel.setPersonalIdSessionData(sessionData);
                 if (personalIdSessionDataViewModel.getPersonalIdSessionData().getToken() != null) {
-                    onConfigurationSucesss();
+                    onConfigurationSuccess(personalIdSessionDataViewModel.getPersonalIdSessionData().getDemoUser());
path: app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java
user: login: Jignesh-dimagi
body: @jaypanchal-13 No need to pass the `demoUser` value to Biometric fragment as an argument because PersonalIdBiometricConfigFragment has access of the `PersonalIdSessionDataViewModel`
created_at: 2025-05-22T13:36:42Z
author_association: CONTRIBUTOR
diff_hunk: @@ -56,6 +60,7 @@ public void onCreate(Bundle savedInstanceState) {
         if (savedInstanceState != null) {
             isAttemptingFingerprint = savedInstanceState.getBoolean(KEY_ATTEMPTING_FINGERPRINT);
         }
+        isDemoUser = PersonalIdBiometricConfigFragmentArgs.fromBundle(getArguments()).getIsDemoUser();
path: app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java
user: login: Jignesh-dimagi
body: @jaypanchal-13 Plese retrieve isDemoUser value from `PersonalIdSessionDataViewModel`
created_at: 2025-05-22T13:37:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -181,8 +183,9 @@ protected void onFailure(PersonalIdApiErrorCodes failureCode) {
     }
 
 
-    private void onConfigurationSucesss() {
-        Navigation.findNavController(binding.personalidPhoneContinueButton).navigate(navigateToBiometricSetup());
+    private void onConfigurationSuccess(Boolean demoUser) {
+        NavDirections action = PersonalIdPhoneFragmentDirections.actionPersonalidPhoneFragmentToPersonalidBiometricConfig().setIsDemoUser(demoUser);
+        NavHostFragment.findNavController(this).navigate(action);
path: app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java
user: login: Jignesh-dimagi
body: @jaypanchal-13 We can revert these changes
created_at: 2025-05-22T13:38:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -201,4 +204,18 @@ public static boolean notOnLatestCCVersion() {
     public static String getLoggedInUserName() {
         return CommCareApplication.instance().getSession().getLoggedInUser().getUsername();
     }
+
+    /**
+     * Displays a SnackBar with the given message and an "OK" button.
+     * The SnackBar will remain visible indefinitely until the "OK" button is pressed.
+     *
+     * @param view            The view to find a parent from. This view is used to create the SnackBar.
+     * @param message         The message text to show in the SnackBar.
+     * @param okClickListener The callback to be invoked when the "OK" button is clicked.
+     */
+    public static void showSnackBarWithOk(View view, String message, View.OnClickListener okClickListener) {
+        Snackbar.make(view, message, Snackbar.LENGTH_INDEFINITE)
+                .setAction("OK", okClickListener)
+                .show();
+    }
path: app/src/org/commcare/AppUtils.java
user: login: Jignesh-dimagi
body: @jaypanchal-13 AppUtils is for commcare apps, you can create ViewUtils and use it.
created_at: 2025-05-22T13:45:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -528,6 +528,7 @@
     <string name="connect_verify_phone_resend">Didn\'t receive your code? Resend</string>
     <string name="connect_verify_phone_error">Error verifying SMS code</string>
     <string name="connect_verify_phone_resend_code">Resend Code</string>
+    <string name="connect_verify_skip_phone_number">I see you\'re a demo user so we\'ll skip the phone check</string>
path: app/res/values/strings.xml
user: login: jaypanchal-13
body: Updated
created_at: 2025-05-23T04:58:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -201,4 +204,18 @@ public static boolean notOnLatestCCVersion() {
     public static String getLoggedInUserName() {
         return CommCareApplication.instance().getSession().getLoggedInUser().getUsername();
     }
+
+    /**
+     * Displays a SnackBar with the given message and an "OK" button.
+     * The SnackBar will remain visible indefinitely until the "OK" button is pressed.
+     *
+     * @param view            The view to find a parent from. This view is used to create the SnackBar.
+     * @param message         The message text to show in the SnackBar.
+     * @param okClickListener The callback to be invoked when the "OK" button is clicked.
+     */
+    public static void showSnackBarWithOk(View view, String message, View.OnClickListener okClickListener) {
+        Snackbar.make(view, message, Snackbar.LENGTH_INDEFINITE)
+                .setAction("OK", okClickListener)
+                .show();
+    }
path: app/src/org/commcare/AppUtils.java
user: login: jaypanchal-13
body: Updated
created_at: 2025-05-23T05:20:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -167,7 +169,7 @@ private void onContinueClicked() {
             protected void onSuccess(PersonalIdSessionData sessionData) {
                 personalIdSessionDataViewModel.setPersonalIdSessionData(sessionData);
                 if (personalIdSessionDataViewModel.getPersonalIdSessionData().getToken() != null) {
-                    onConfigurationSucesss();
+                    onConfigurationSuccess(personalIdSessionDataViewModel.getPersonalIdSessionData().getDemoUser());
path: app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java
user: login: jaypanchal-13
body: @Jignesh-dimagi In my current latest code there is no access of `PersonalIdSessionDataViewModel` in `PersonalIdBiometricConfigFragment ` should I create it?
created_at: 2025-05-23T05:28:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -56,6 +60,7 @@ public void onCreate(Bundle savedInstanceState) {
         if (savedInstanceState != null) {
             isAttemptingFingerprint = savedInstanceState.getBoolean(KEY_ATTEMPTING_FINGERPRINT);
         }
+        isDemoUser = PersonalIdBiometricConfigFragmentArgs.fromBundle(getArguments()).getIsDemoUser();
path: app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java
user: login: jaypanchal-13
body: @Jignesh-dimagi  Okay
created_at: 2025-05-23T07:21:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -181,8 +183,9 @@ protected void onFailure(PersonalIdApiErrorCodes failureCode) {
     }
 
 
-    private void onConfigurationSucesss() {
-        Navigation.findNavController(binding.personalidPhoneContinueButton).navigate(navigateToBiometricSetup());
+    private void onConfigurationSuccess(Boolean demoUser) {
+        NavDirections action = PersonalIdPhoneFragmentDirections.actionPersonalidPhoneFragmentToPersonalidBiometricConfig().setIsDemoUser(demoUser);
+        NavHostFragment.findNavController(this).navigate(action);
path: app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java
user: login: jaypanchal-13
body: @Jignesh-dimagi Okay
created_at: 2025-05-23T07:21:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -167,7 +169,7 @@ private void onContinueClicked() {
             protected void onSuccess(PersonalIdSessionData sessionData) {
                 personalIdSessionDataViewModel.setPersonalIdSessionData(sessionData);
                 if (personalIdSessionDataViewModel.getPersonalIdSessionData().getToken() != null) {
-                    onConfigurationSucesss();
+                    onConfigurationSuccess(personalIdSessionDataViewModel.getPersonalIdSessionData().getDemoUser());
path: app/src/org/commcare/fragments/personalId/PersonalIdPhoneFragment.java
user: login: Jignesh-dimagi
body: @jaypanchal-13 Yeah sure, this way you can have all configuration from server and use for decision.
created_at: 2025-05-23T07:22:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -10,6 +10,10 @@
         android:name="org.commcare.fragments.personalId.PersonalIdBiometricConfigFragment"
         android:label="fragment_personalid_biometric_config"
         tools:layout="@layout/screen_personalid_verify">
+        <argument
+            android:name="isDemoUser"
+            app:argType="boolean"
+            android:defaultValue="false" />
path: app/res/navigation/nav_graph_personalid.xml
user: login: jaypanchal-13
body: @shubham1g5 now will be using `PersonalIdSessionDataViewModel` as Jignesh suggested so there will be no need of adding argument
created_at: 2025-05-23T07:23:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -242,7 +247,11 @@ private void navigateForward(boolean enrollmentFailed) {
             boolean isConfigured = fingerprint == BiometricsHelper.ConfigurationStatus.Configured ||
                     pin == BiometricsHelper.ConfigurationStatus.Configured;
             if (isConfigured) {
-                navigateToOtpScreen();
+                if (!isDemoUser){
+                    NavHostFragment.findNavController(this).navigate(navigateToOtpScreen());
+                }else {
+                    showSnackBarWithOk(getView(), getString(R.string.connect_verify_skip_phone_number), v -> NavHostFragment.findNavController(this).navigate(navigateToNameScreen()));
+                }
path: app/src/org/commcare/fragments/personalId/PersonalIdBiometricConfigFragment.java
user: login: jaypanchal-13
body: @shubham1g5  added commcare style in AS and formated this
created_at: 2025-05-23T07:30:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -134,6 +134,10 @@ public String getPin() {
         return pin;
     }
 
+    public boolean getIsDemo() {
path: app/src/org/commcare/android/database/connect/models/ConnectUserRecord.java
user: login: pm-dimagi
body: jay is this required
created_at: 2025-05-23T09:58:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -134,6 +134,10 @@ public String getPin() {
         return pin;
     }
 
+    public boolean getIsDemo() {
path: app/src/org/commcare/android/database/connect/models/ConnectUserRecord.java
user: login: jaypanchal-13
body: @pm-dimagi No clearing it
created_at: 2025-05-23T10:07:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -446,6 +446,7 @@
     <string name="connect_verify_phone_resend">Não recebeu o seu código? Reenviar</string>
     <string name="connect_verify_phone_error">Erro ao verificar o código SMS</string>
     <string name="connect_verify_phone_resend_code">Reenviar código</string>
+    <string name="connect_verify_skip_phone_number">Veo que eres un usuario de demostración, así que omitiremos la verificación del teléfono</string>
path: app/res/values-pt/strings.xml
user: login: Jignesh-dimagi
body: @jaypanchal-13 Can you please check this?

Yes
created_at: 2025-05-23T11:53:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -446,6 +446,7 @@
     <string name="connect_verify_phone_resend">Não recebeu o seu código? Reenviar</string>
     <string name="connect_verify_phone_error">Erro ao verificar o código SMS</string>
     <string name="connect_verify_phone_resend_code">Reenviar código</string>
+    <string name="connect_verify_skip_phone_number">Veo que eres un usuario de demostración, así que omitiremos la verificación del teléfono</string>
path: app/res/values-pt/strings.xml
user: login: coderabbitai[bot]
body: > Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

<!-- This is an auto-generated mute comment by CodeRabbit -->
created_at: 2025-05-23T11:53:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -3,6 +3,9 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.text.TextUtils;
+import android.view.View;
+
+import com.google.android.material.snackbar.Snackbar;
path: app/src/org/commcare/AppUtils.java
user: login: shubham1g5
body: should not be needed. 
created_at: 2025-05-27T11:37:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -3,6 +3,9 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.text.TextUtils;
+import android.view.View;
+
+import com.google.android.material.snackbar.Snackbar;
path: app/src/org/commcare/AppUtils.java
user: login: jaypanchal-13
body: ok
created_at: 2025-05-27T13:32:42Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-05-22T12:56:01Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

<details>
<summary>📝 Walkthrough</summary>

## Walkthrough

The changes introduce support for a "demo user" flow in the Personal ID feature. A boolean argument `isDemoUser` is added to the navigation graph and propagated through the relevant fragments. The `PersonalIdBiometricConfigFragment` now checks this flag: if the user is a demo user, phone number verification is skipped, a snackbar message is shown, and navigation proceeds directly to the name entry screen. Supporting methods and navigation actions are updated accordingly. Additionally, a utility method for displaying a persistent snackbar is added, and new localized string resources for the skip message are included in multiple languages.

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant PersonalIdPhoneFragment
    participant PersonalIdBiometricConfigFragment
    participant AppUtils
    participant NameScreen

    User->>PersonalIdPhoneFragment: Continue with phone
    PersonalIdPhoneFragment->>PersonalIdBiometricConfigFragment: Navigate (with isDemoUser flag)
    PersonalIdBiometricConfigFragment->>PersonalIdBiometricConfigFragment: onCreate (reads isDemoUser)
    PersonalIdBiometricConfigFragment->>PersonalIdBiometricConfigFragment: navigateForward()
    alt isDemoUser == false
        PersonalIdBiometricConfigFragment->>OTPFragment: Navigate to OTP screen
    else isDemoUser == true
        PersonalIdBiometricConfigFragment->>AppUtils: showSnackBarWithOk()
        User->>AppUtils: Tap "OK"
        AppUtils->>PersonalIdBiometricConfigFragment: Callback
        PersonalIdBiometricConfigFragment->>NameScreen: Navigate to Name screen
    end
```

## Suggested labels

`cross requested`, `skip-integration-tests`

## Suggested reviewers

- OrangeAndGreen
- shubham1g5

</details>

<!-- walkthrough_end -->

<!-- announcements_start -->

> [!NOTE]
> <details>
> <summary>⚡️ AI Code Reviews for VS Code, Cursor, Windsurf</summary>
> 
> CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
> Learn more [here](http://coderabbit.ai/ide).
> 
> </details>

---

> [!NOTE]
> <details>
> <summary>⚡️ Faster reviews with caching</summary>
> 
> CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure `Review - Disable Cache` at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the `Data Retention` setting under your Organization Settings.
> Enjoy the performance boost—your workflow just got faster.
> 
> </details>

<!-- announcements_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIbEIp4MSilZnxIbERKSAAzChZ7Mlp4DCIc+H8BNEz+XG5oyAB3KvtsAWZ1Gno5dMy+ITRZbkwGWDQvMABGAGZ0ZFtIDEcBLKmJgCYAFg0YWA8RzFIUZH8vaiiCMN2jhw9cKgYAayjqSFhcWsQOAHovouY0IjwLQRKqIeCYDTkXBfAR5BqZL4AYWR0EmawmAAZtu50txaGcUBgJPgvFJjvFEuISpAUmkMpRkLl8pkMEVqQAxcokSrVADy0CskAAFLzyGBoPA2NZQQ18BRaABKSBsRCIAHSbEIZD7EoeVCg/AMcGdRrqWCXDzRACSzF4+CkbAwuEQ9WyJGo2H8OVORE1HnmSkQDAS3HE+CwxQYXmwgfQjF2jy8SFC2TlkFOyy8yEw9H8EngJAaCgwYKUVDDJYANC0RrNIFIEtlZMVSvBssrMNgxpAAIoAQTCIQUDfVCxIdGQZFGGAYJEduGrShoFHaGBbKHb/yEaZ1pHJQS5ClY2DXDGo8HD9fBfhIkSqHgw+BoiGrZAcCWpuCuCUQD3TKlvI4ClCJgKH8MQvFkasc2LbJylXUovxeL8PDQbg7V4Y0PDzAsGgZV40CkSBljIWYwSIcgunvehLxQvwkD/SIpF8fB2zo3cSG2AA5NI0FoIoK27BxhFEcQiKXbQs34PhJW4SJ53PS9EG4UQ20SbMvTtfMlFoDQjH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-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=dimagi/commcare-android&utm_content=3124):

- 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](https://www.coderabbit.ai/contact-us/support) 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](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR
user: login: shubham1g5
created_at: 2025-05-27T11:36:07Z
body: > right now code is not testable as some api work is pending before this flow starts. So will not be able to take video of this flow

wil you not be able to mimick `demo` user by just hardcoding it to `true` locally ?
author_association: CONTRIBUTOR
user: login: jaypanchal-13
created_at: 2025-05-27T11:55:27Z
body: > > right now code is not testable as some api work is pending before this flow starts. So will not be able to take video of this flow
> 
> wil you not be able to mimick `demo` user by just hardcoding it to `true` locally ?

author_association: CONTRIBUTOR
user: login: jaypanchal-13
created_at: 2025-05-27T13:23:09Z
body: > > > right now code is not testable as some api work is pending before this flow starts. So will not be able to take video of this flow
> > 
> > 
> > wil you not be able to mimick `demo` user by just hardcoding it to `true` locally ?

@shubham1g5  here is the video
https://drive.google.com/file/d/16ozLTGxfH5Y51ayx3ihnEp0u5kMBS3Nl/view?usp=sharing
author_association: CONTRIBUTOR
user: login: shubham1g5
created_at: 2025-05-27T14:37:29Z
body: thanks @jaypanchal-13 for the video! It looks good to me and you can proceed with the merge on this. 
author_association: CONTRIBUTOR