Skip to content

MM-541 savings account details doesnt render properly the values in the button table#3082

Open
Naman-kr404 wants to merge 2 commits intoopenMF:developmentfrom
Naman-kr404:MM-541-savings-account-details-doesnt-render-properly-the-values-in-the-button-table
Open

MM-541 savings account details doesnt render properly the values in the button table#3082
Naman-kr404 wants to merge 2 commits intoopenMF:developmentfrom
Naman-kr404:MM-541-savings-account-details-doesnt-render-properly-the-values-in-the-button-table

Conversation

@Naman-kr404
Copy link
Contributor

@Naman-kr404 Naman-kr404 commented Jan 18, 2026

Fixes - Jira-#541

Savings account details doesn't render properly the values in the button/table

Before
saving details previous

After
saving detail after

Summary by CodeRabbit

  • Style
    • Improved the layout flexibility of the savings account details card component, allowing it to expand as needed while maintaining appropriate spacing.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

📝 Walkthrough

Walkthrough

A Compose UI layout modifier was updated on the SavingsAccountDetailsScreen, changing a fixed height constraint to a minimum height constraint on the MifosLabelValueCard component within AccountDetailsGrid.

Changes

Cohort / File(s) Summary
UI Layout Adjustment
feature/savings-account/src/commonMain/kotlin/org/mifos/mobile/feature/savingsaccount/savingsAccountDetails/SavingsAccountDetailsScreen.kt
Replaced .height() with .defaultMinSize(minHeight = ...) modifier on MifosLabelValueCard; added defaultMinSize import. Changes fixed height constraint to minimum height while preserving weight(1f)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • therajanmaurya
  • Nagarjuna0033

Poem

🐰 A height becomes a minimum dream,
Fixed constraints now more lenient seem,
Cards dance with newfound flexibility,
The UI layout sings with agility! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.35% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the issue (MM-541) and describes the main problem being fixed: improper rendering of values in the savings account details table.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
feature/loan-application/src/commonMain/kotlin/org/mifos/mobile/feature/loan/application/confirmDetails/ConfirmDetailsViewModel.kt (1)

287-292: Add a localized fallback for empty/technical server messages.

status.message can be blank or too technical, which can lead to an empty/non-localized subtitle. Consider falling back to the existing tip when the message is blank to preserve UX consistency.

💡 Suggested fix
+import mifos_mobile.feature.loan_application.generated.resources.feature_apply_loan_status_failure_tip
...
-                        subtitle = status.message,
+                        subtitle = status.message.takeIf { it.isNotBlank() }
+                            ?: getString(Res.string.feature_apply_loan_status_failure_tip),
feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/thirdPartyTransfer/TptViewModel.kt (1)

8-8: Potential typo in license URL.

Same issue as in the strings file - the URL references mobile-mobile but should likely be mifos-mobile.

- * See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
+ * See https://github.com/openMF/mifos-mobile/blob/master/LICENSE.md
core/designsystem/src/commonMain/kotlin/org/mifos/mobile/core/designsystem/component/MifosTextField.kt (1)

157-166: Inconsistent supportingText behavior compared to MifosOutlinedTextField.

MifosOutlinedTextField (lines 98-107) conditionally renders supportingText only when errorText is non-null, but MifosTextField always renders it with an empty string fallback. This could cause layout differences between the two components.

🔧 Suggested fix for consistency
-        supportingText = config.errorText.let {
-            {
-                Text(
-                    modifier = Modifier.testTag("errorTag"),
-                    text = it ?: "",
-                    style = MifosTypography.bodySmall,
-                    color = KptTheme.colorScheme.error,
-                )
-            }
-        },
+        supportingText = config.errorText?.let {
+            {
+                Text(
+                    modifier = Modifier.testTag("errorTag"),
+                    text = it,
+                    style = MifosTypography.bodySmall,
+                    color = KptTheme.colorScheme.error,
+                )
+            }
+        },
🤖 Fix all issues with AI agents
In `@cmp-android/src/main/res/values-es/strings.xml`:
- Line 488: The string resource key "seleted_qr_image" is misspelled and must be
renamed to "selected_qr_image" everywhere; update the base strings.xml entry and
all localized variants that currently declare the "seleted_qr_image" key to use
"selected_qr_image" instead, preserving each locale's translated value ("Imagen
QR seleccionada" in Spanish) and ensuring you also update any references in code
or XML that reference the old key (search for usages of seleted_qr_image and
replace with selected_qr_image).

In `@feature/settings/src/commonMain/composeResources/values-te/strings.xml`:
- Line 101: The resource key feature_settings_appinfo_mifos_electonic_banking
contains a typo ("electonic") and must be renamed to
feature_settings_appinfo_mifos_electronic_banking across all locales and code;
update the key in every locale file (all 18 string XMLs) and then update all
references/imports/usages in Kotlin (e.g., where AppInfoScreen.kt imports or
accesses the resource) to the new key so builds and lookups remain consistent;
ensure you run a project-wide search/replace for
feature_settings_appinfo_mifos_electonic_banking and update any generated
R/Resource usages or string resource accessors accordingly.

In
`@feature/share-application/src/commonMain/kotlin/org/mifos/mobile/feature/share/application/fillApplication/FillApplicationViewModel.kt`:
- Around line 655-658: The subtitle currently concatenates response.message
directly, which can render the literal "null" (because DataState.Error.message
is exception.message.toString()) and uses a hardcoded ", " separator; update the
assignment in FillApplicationViewModel.kt to use a localized format string via
getString (e.g., Res.string.feature_apply_share_status_failure_with_tip) that
accepts the error message and product name, and pass response.message.takeIf {
it != "null" } ?: "" (or similar null/placeholder-safe value) and
state.shareProductName so translators control punctuation/order and the literal
"null" is never shown.
♻️ Duplicate comments (1)
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosHiddenTextRow.kt (1)

95-100: Duplicate of the theme-provider check above.

🟡 Minor comments (24)
feature/accounts/src/commonMain/composeResources/values-es/strings.xml-56-58 (1)

56-58: Fix typo in Spanish label ("Icon de Filtro").
Likely intended “Icono de Filtro”.

🐛 Proposed fix
-    <string name="feature_transaction_filter_icon_description">Icon de Filtro</string>
+    <string name="feature_transaction_filter_icon_description">Icono de Filtro</string>
cmp-navigation/src/commonMain/composeResources/values-es/strings.xml-9-9 (1)

9-9: Fix license header repository link.
The URL points to openMF/mobile-mobile, which looks like a typo for this repo (openMF/mifos-mobile). Please update to avoid a broken/stale link.

✅ Suggested fix
-    See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
+    See https://github.com/openMF/mifos-mobile/blob/master/LICENSE.md
feature/client-charge/src/commonMain/composeResources/values-es/strings.xml-35-38 (1)

35-38: Align “due” vs “outstanding” translations to avoid ambiguity (Line 35–38).

Both due and outstanding are translated as “Pendiente,” which makes two distinct labels indistinguishable. Consider aligning due with the existing amount_due (“Vencido”) or using another distinct term.

💡 Suggested adjustment
-    <string name="due">Pendiente</string>
+    <string name="due">Vencido</string>
feature/home/src/commonMain/composeResources/values-es/strings.xml-48-49 (1)

48-49: Standardize “Ahorro” vs “Ahorros” terminology.

“Cuentas de Ahorros” conflicts with “Cuenta de Ahorro” below. Consider aligning the plural to “Cuentas de Ahorro” (and review related strings if you want full consistency).

💡 Suggested tweak
-    <string name="feature_home_saving_accounts">Cuentas de Ahorros</string>
+    <string name="feature_home_saving_accounts">Cuentas de Ahorro</string>

Also applies to: 57-58

feature/home/src/commonMain/composeResources/values-es/strings.xml-67-67 (1)

67-67: Fix casing in Spanish sentence.

“Por Favor” should be “Por favor”.

💡 Suggested tweak
-    <string name="feature_server_error">Ocurrió un error. Por Favor intenta más tarde.</string>
+    <string name="feature_server_error">Ocurrió un error. Por favor intenta más tarde.</string>
feature/third-party-transfer/src/commonMain/composeResources/values-es/strings.xml-9-9 (1)

9-9: Potential typo in license URL.

The URL references mobile-mobile but should likely be mifos-mobile to match the repository name.

-    See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
+    See https://github.com/openMF/mifos-mobile/blob/master/LICENSE.md
feature/savings-account/src/commonMain/composeResources/values-es/strings.xml-78-78 (1)

78-78: Incorrect translation: "loan products" should be "savings products".

The string name indicates this is for savings products (feature_savings_savings_product_empty), but the Spanish text says "productos de préstamo" (loan products). This should refer to savings products instead.

Proposed fix
-    <string name="feature_savings_savings_product_empty">Actualmente los productos de préstamo no están disponibles</string>
+    <string name="feature_savings_savings_product_empty">Actualmente los productos de ahorro no están disponibles</string>
feature/savings-account/src/commonMain/composeResources/values-es/strings.xml-91-91 (1)

91-91: Inconsistent translation: withdraw action says "update".

The string name feature_savings_withdraw_request_withdraw suggests a withdrawal action, but the translation "Solicitar actualización" means "Request update". This appears to be a copy-paste error from the update workflow. Consider using "Solicitar retiro" (Request withdrawal) instead.

Proposed fix
-    <string name="feature_savings_withdraw_request_withdraw">Solicitar actualización</string>
+    <string name="feature_savings_withdraw_request_withdraw">Solicitar retiro</string>
feature/savings-account/src/commonMain/composeResources/values-es/strings.xml-9-9 (1)

9-9: Typo in repository URL.

The URL references mobile-mobile but should likely be mifos-mobile to match the actual repository name.

Proposed fix
-    See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
+    See https://github.com/openMF/mifos-mobile/blob/master/LICENSE.md
feature/transfer-process/src/commonMain/composeResources/values-es/strings.xml-9-9 (1)

9-9: Typo in license URL.

The URL contains mobile-mobile which should likely be mifos-mobile to match the actual repository name.

-    See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
+    See https://github.com/openMF/mifos-mobile/blob/master/LICENSE.md
feature/transfer-process/src/commonMain/composeResources/values-es/strings.xml-13-13 (1)

13-13: Remove the unused transferred_successfully string key.

transferred_successfully is defined but never used in this module—only transfer_successful (line 27) is imported and used in the code. Remove line 13 to eliminate dead code and maintenance burden.

feature/loan-account/src/commonMain/composeResources/values-es/strings.xml-9-9 (1)

9-9: Typo in license header URL: mobile-mobile should be mifos-mobile.

The repository name in the license URL appears incorrect based on the PR's repository.

Proposed fix
-    See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
+    See https://github.com/openMF/mifos-mobile/blob/master/LICENSE.md
feature/settings/src/commonMain/composeResources/values-ur/strings.xml-161-162 (1)

161-162: Trim leading space in Urdu “Contact Us” string.

The value starts with a leading space, which can misalign the rendered text.

🔧 Proposed fix
-    <string name="feature_settings_faq_contact_us"> ہم سے رابطہ کریں</string>
+    <string name="feature_settings_faq_contact_us">ہم سے رابطہ کریں</string>
feature/settings/src/commonMain/composeResources/values/strings.xml-89-90 (1)

89-90: Remove the trailing space in the logout tip.

The current value ends with an extra space, which can render awkwardly in UI and complicate string comparisons.

🔧 Proposed fix
-    <string name="feature_settings_action_logout_tip">Are You Sure You Want To Logout? </string>
+    <string name="feature_settings_action_logout_tip">Are You Sure You Want To Logout?</string>
feature/settings/src/commonMain/composeResources/values-es/strings.xml-85-96 (1)

85-96: Add missing Spanish translations for logout description/action.

feature_settings_logout_description and feature_settings_logout_action are used by the logout dialog but aren’t defined here, so Spanish users will see English text in that section.

🌍 Suggested additions (please validate with localization)
     <string name="feature_settings_action_logout">Salir</string>
     <string name="feature_settings_action_logout_tip">Cerrar sesión en todos los dispositivos</string>
+    <string name="feature_settings_logout_description">Cerrar sesión finalizará tu sesión actual y todas las sesiones activas por motivos de seguridad. Tendrás que iniciar sesión de nuevo para acceder a tu cuenta.</string>
+    <string name="feature_settings_logout_action">Volver al inicio</string>
cmp-android/src/main/res/values-es/strings.xml-533-552 (1)

533-552: translatable="false" on translated language names is contradictory.

The languages string-array has translatable="false" but contains Spanish translations like "Inglés", "Español", "Francés". If language display names should be localized (showing "English" in English, "Inglés" in Spanish), remove translatable="false". If they should remain constant, use consistent names across all locales.

feature/auth/src/commonMain/composeResources/values-es/strings.xml-51-56 (1)

51-56: Minor Spanish accent marks missing.

Several words are missing accent marks which affects proper Spanish orthography:

  • Line 51: invalidoinválido
  • Line 53: ID invalido de correoCorreo electrónico inválido (also awkward phrasing)
  • Line 56: digitosdígitos
feature/qr/src/commonMain/composeResources/values-es/strings.xml-9-9 (1)

9-9: Same license URL typo as auth file.

The URL references mobile-mobile instead of mifos-mobile.

Suggested fix
-    See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
+    See https://github.com/openMF/mifos-mobile/blob/master/LICENSE.md
feature/auth/src/commonMain/composeResources/values-es/strings.xml-81-81 (1)

81-81: Inconsistent accent on "Electrónico".

Line 26 uses "Correo Electrónico" (correct), but line 81 uses "Correo Electronico" (missing accent). Maintain consistency.

Suggested fix
-    <string name="feature_signup_email_label">Correo Electronico</string>
+    <string name="feature_signup_email_label">Correo Electrónico</string>
feature/auth/src/commonMain/composeResources/values-es/strings.xml-9-9 (1)

9-9: Typo in license URL.

The URL references mobile-mobile instead of mifos-mobile.

Suggested fix
-    See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
+    See https://github.com/openMF/mifos-mobile/blob/master/LICENSE.md
cmp-android/src/main/res/values-es/strings.xml-12-15 (1)

12-15: Contradictory translatable="false" on translated strings.

These strings have translatable="false" but contain Spanish translations. If a string should not be translated, it should remain in the base language (English) and not appear in locale-specific files, or the attribute should be removed.

Suggested fix: Remove the attribute to allow translation
-    <string name="app_name" translatable="false">Mifos Móvil</string>
-    <string name="feature_about_app_name" translatable="false">Mifos Móvil</string>
+    <string name="app_name">Mifos Móvil</string>
+    <string name="feature_about_app_name">Mifos Móvil</string>
     <string name="login">Ingresar</string>
-    <string name="toast_welcome" translatable="false">Bienvenido %1$s</string>
+    <string name="toast_welcome">Bienvenido %1$s</string>
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MFStepProcess.kt-49-50 (1)

49-50: Stale or misleading TODO comment.

The comment says "use DesignToken, currently it throws error," yet DesignToken is actively used in this function (lines 57, 77, 90). Either remove this TODO if it's no longer relevant, or clarify which specific token usage causes the error.

🧹 Suggested fix
-    // TODO use DesignToken, currently it throws error
     var barHeight by remember { mutableStateOf(0.dp) }
core/ui/src/commonMain/composeResources/values-es/strings.xml-16-44 (1)

16-44: Fix minor Spanish typos/formatting for consistency.
These are small UX text issues (accent, capitalization, trailing space).

✏️ Proposed fix
-    <string name="something_went_wrong">Ocurrio un error</string>
+    <string name="something_went_wrong">Ocurrió un error</string>
@@
-    <string name="password_strength_level_1">débil</string>
+    <string name="password_strength_level_1">Débil</string>
@@
-    <string name="minimum_characters_requirement">Mínimo de caracteres: %1$d </string>
+    <string name="minimum_characters_requirement">Mínimo de caracteres: %1$d</string>
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/PasswordStrengthIndicator.kt-208-215 (1)

208-215: Align GOOD/VERY_STRONG colors with the main indicator.
In PasswordStrengthIndicator, GOOD uses primary and VERY_STRONG uses magenta, but this mapping is swapped here. If that’s unintentional, align them or centralize the mapping to prevent drift.

💡 Possible alignment (match PasswordStrengthIndicator)
-        PasswordStrengthState.GOOD -> Color.Magenta
-        PasswordStrengthState.STRONG -> strongColor
-        PasswordStrengthState.VERY_STRONG -> KptTheme.colorScheme.primary
+        PasswordStrengthState.GOOD -> KptTheme.colorScheme.primary
+        PasswordStrengthState.STRONG -> strongColor
+        PasswordStrengthState.VERY_STRONG -> Color.Magenta
🧹 Nitpick comments (24)
feature/passcode/src/commonMain/composeResources/values-es/strings.xml (1)

14-25: Unify formal vs. informal tone across Spanish strings.

These strings mix usted (“Introduzca”) with (“Ingresa”, “inténtalo”), which reads inconsistent in UX. Consider standardizing to one register across the file.

feature/accounts/src/commonMain/composeResources/values-es/strings.xml (1)

48-52: Consider plural‑safe wording for filter count.
If %1$s is a number, “Seleccionada” may be grammatically off for plural; consider neutral phrasing or plural resources.

feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/fillApplication/FillApplicationViewModel.kt (1)

583-598: Trim server message and broaden punctuation check before appending “.”
If response.message has trailing whitespace or ends with “?”/“…” the current logic can yield awkward punctuation/spacing. Consider trimming and checking a wider punctuation set.

♻️ Suggested tweak
-                        subtitle = buildString {
-                            val serverMessage = response.message.takeIf { it.isNotBlank() }
+                        subtitle = buildString {
+                            val serverMessage = response.message.trim().takeIf { it.isNotBlank() }
                             if (serverMessage != null) {
-                                append(serverMessage)
-                                if (!serverMessage.endsWith(".") && !serverMessage.endsWith("!")) {
+                                append(serverMessage)
+                                if (serverMessage.last() !in listOf('.', '!', '?')) {
                                     append(".")
                                 }
                                 append(" ")
                             }
                             append(
                                 getString(
                                     Res.string.feature_apply_savings_status_failure_tip,
                                     state.fieldOfficerName,
                                 ),
                             )
                         },
feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/thirdPartyTransfer/TptViewModel.kt (1)

476-478: Consider using val instead of var for state properties.

In a data class representing immutable state, using var for accountOptionsTemplate, fromAccountOptions, and toAccountOptions breaks the immutability contract. State updates should create new instances via copy() rather than mutating existing properties.

♻️ Suggested fix
-    var accountOptionsTemplate: AccountOptionsTemplate = AccountOptionsTemplate(),
-    var fromAccountOptions: List<AccountOption> = emptyList(),
-    var toAccountOptions: List<AccountOption> = emptyList(),
+    val accountOptionsTemplate: AccountOptionsTemplate = AccountOptionsTemplate(),
+    val fromAccountOptions: List<AccountOption> = emptyList(),
+    val toAccountOptions: List<AccountOption> = emptyList(),
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/FaqItemHolder.kt (1)

63-70: Consider unifying typography source within the component.

The question text still uses MifosTypography, while the answer text now uses KptTheme.typography. If the intent is a full migration, aligning both to KptTheme will avoid mixed typography sources.

♻️ Suggested tweak
-                style = MifosTypography.bodyMedium,
+                style = KptTheme.typography.bodyMedium,
feature/savings-account/src/commonMain/composeResources/values-es/strings.xml (1)

97-102: Inconsistent indentation and trailing whitespace.

Line 98 has extra indentation compared to the rest of the file, and there are unnecessary blank lines before the closing tag.

Proposed fix
     <string name="feature_savings_no_accounts_found">No se encontraron Cuentas de Ahorros</string>
-        <string name="feature_generic_error_server">Error del servidor. No se puede completar la operación. Por favor, inténtalo de nuevo.</string>
-    
-    
-        
-    </resources>
+    <string name="feature_generic_error_server">Error del servidor. No se puede completar la operación. Por favor, inténtalo de nuevo.</string>
+</resources>
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/BeneficiaryCard.kt (1)

63-75: Inconsistent migration from DesignToken to KptTheme.

The migration appears incomplete within this file:

  • Line 63: Migrated to KptTheme.spacing.md
  • Line 71: Still uses DesignToken.sizes.iconExtraLarge
  • Line 75: Still uses DesignToken.padding.medium

Additionally, the semantic change from DesignToken.padding.large to KptTheme.spacing.md ("large" → "md") may alter the actual spacing value. Please verify this is intentional.

Consider completing the migration for consistency, or if partial migration is intentional, add a comment explaining the approach.

♻️ Suggested consistent migration
                     modifier = Modifier
                         .clip(CircleShape)
-                        .size(DesignToken.sizes.iconExtraLarge)
+                        .size(KptTheme.sizes.iconExtraLarge)  // if available in KptTheme
                         .background(Color.LightGray),
                     bitmap = null,
                 )
-                Spacer(modifier = Modifier.width(DesignToken.padding.medium))
+                Spacer(modifier = Modifier.width(KptTheme.spacing.sm))  // or appropriate KptTheme equivalent
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosDashboardCard.kt (1)

108-109: Remove commented-out code.

These commented lines appear to be remnants from the migration process. Either complete the migration to use KptTheme.colorScheme.secondary or remove the comments to avoid confusion.

🧹 Remove dead code
                         Text(
                             text = stringResource(loanAccount),
                             style = MifosTypography.bodySmall,
-//                            color = KptTheme.colorScheme.secondary.copy(alpha = 0.7f),
                             color = AppColors.customWhite.copy(alpha = 0.5f),
                         )
                         Text(
                             text = stringResource(savingsAccount),
                             style = MifosTypography.bodySmall,
-//                            color = KptTheme.colorScheme.secondary,
                             color = AppColors.customWhite.copy(alpha = 0.5f),
                         )

Also applies to: 132-133

feature/settings/src/commonMain/composeResources/values-te/strings.xml (1)

14-14: Remove non-translatable string from locale file.

Strings marked translatable="false" should only be defined in the default values/strings.xml, not in locale-specific files. This entry is redundant here.

♻️ Suggested fix
-    <string name="password_key" translatable="false">Password</string>
feature/beneficiary/src/commonMain/kotlin/org/mifos/mobile/feature/beneficiary/beneficiaryDetail/BeneficiaryDetailScreen.kt (1)

165-166: Consider handling or documenting the empty else branch.

The empty else branch could silently ignore new ScreenUiState subtypes if added in the future. If the when is meant to be exhaustive, consider removing else and handling all sealed subtypes explicitly, or add a comment explaining why this is intentional.

feature/loan-account/src/commonMain/composeResources/values-es/strings.xml (1)

103-103: String key repayment_schedule is inconsistent with the feature_loan_* naming convention used throughout this file.

However, this key is actively referenced in code (RepaymentScheduleScreen.kt). If renamed to feature_loan_repayment_schedule, you'll also need to update the import and usage in the RepaymentScheduleScreen.kt file, plus all locale files. The consistent naming across all locales suggests this may be intentional design for a top-level screen string rather than a detail section string.

core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosOutlineDropDown.kt (3)

93-97: Consider differentiating focused vs unfocused border colors.

Both focusedBorderColor and unfocusedBorderColor are set to the same value (KptTheme.colorScheme.secondaryContainer). This removes the visual distinction when the dropdown gains focus, which may impact usability and accessibility.

If this is intentional design, no action needed. Otherwise, consider using a more prominent color (e.g., primary) for focusedBorderColor.


105-113: Shape mismatch between border and container.

The border uses KptTheme.shapes.medium (line 108) while the container uses KptTheme.shapes.large (line 113). This inconsistency could cause visual misalignment where the border doesn't properly follow the container's corners.

Consider using the same shape for both:

♻️ Proposed fix
             .border(
                 width = DesignToken.strokes.thin,
                 color = KptTheme.colorScheme.secondaryContainer,
-                shape = KptTheme.shapes.medium,
+                shape = KptTheme.shapes.large,
             ),

45-45: Remove duplicate @OptIn annotation.

ExperimentalMaterial3Api::class appears twice in the @OptIn annotation.

♻️ Proposed fix
-@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3Api::class)
+@OptIn(ExperimentalMaterial3Api::class)
cmp-android/src/main/res/values-es/strings.xml (2)

14-16: Translation inconsistencies with feature/auth strings.

The same string keys have different translations across modules:

  • toast_welcome: "Bienvenido %1$s" (here) vs "Hola %1$s" (auth module)
  • login_failed: Different phrasing between files
  • no_internet_connection: "Sin conexión a Internet" vs "Sin conexión a internet" (capitalization)

Consider aligning translations to ensure consistent user experience.


218-218: Trailing space before closing tag.

Minor formatting issue - there's a trailing space before the closing </string> tag.

Suggested fix
-    <string name="no_beneficiary_found_please_add">Actualmente no tiene ningún beneficiario. Por favor, agréguelo.</string> 
+    <string name="no_beneficiary_found_please_add">Actualmente no tiene ningún beneficiario. Por favor, agréguelo.</string>
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/NoInternet.kt (1)

64-68: Hard-coded "Retry" string should use a string resource.

For i18n/l10n consistency (especially given the PR includes localization additions for Spanish/Telugu/Urdu), consider extracting "Retry" to a string resource.

🌐 Suggested fix
-            FilledTonalButton(onClick = { retry.invoke() }) {
-                Text(text = "Retry")
+            FilledTonalButton(onClick = { retry.invoke() }) {
+                Text(text = stringResource(Res.string.retry))
             }
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/navigation/MifosBottomBar.kt (1)

31-43: Redundant .background() modifier.

The containerColor parameter on line 32 already sets the surface background for BottomAppBar. The additional .background(KptTheme.colorScheme.surface) modifier on line 42 is redundant and can be removed.

Also, consider removing or addressing the commented-out shadow code (lines 37-41) to avoid dead code accumulation.

♻️ Suggested cleanup
     BottomAppBar(
         containerColor = KptTheme.colorScheme.surface,
         contentColor = KptTheme.colorScheme.onSurface,
         windowInsets = windowInsets,
         modifier = modifier
-            .fillMaxWidth()
-//            .shadow(
-//                elevation = DesignToken.elevation.elevation,
-//                spotColor = Color(0xFF5D5D5D),
-//                ambientColor = Color.Black,
-//            )
-            .background(KptTheme.colorScheme.surface),
+            .fillMaxWidth(),
         tonalElevation = 0.dp,
     ) {
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosDropDownPayFromComponent.kt (1)

174-180: Consider using the semantically correct text color for tertiary surfaces.

KptTheme.colorScheme.onPrimary is used for text displayed on a tertiary background (see line 198). Typically, onTertiary would be the semantically appropriate color for text on tertiary surfaces to ensure proper contrast and theme consistency.

💡 Suggested semantic color usage
         Text(
             text = accountNumber,
             style = MifosTypography.titleMediumEmphasized,
-            color = KptTheme.colorScheme.onPrimary,
+            color = KptTheme.colorScheme.onTertiary,
         )
         Spacer(modifier = Modifier.height(KptTheme.spacing.xs))
         Text(
             text = balance,
             style = MifosTypography.bodySmall,
-            color = KptTheme.colorScheme.onPrimary,
+            color = KptTheme.colorScheme.onTertiary,
         )
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosDropDownTextField.kt (1)

58-60: Simplify the boolean expression.

expanded = true && isEnabled is equivalent to expanded = isEnabled. The true && is redundant.

♻️ Suggested simplification
     LaunchedEffect(key1 = isPressed) {
-        if (isPressed) expanded = true && isEnabled
+        if (isPressed) expanded = isEnabled
     }

The same redundant pattern exists at line 134 in MifosDropDownDoubleTextField.

core/designsystem/src/commonMain/kotlin/org/mifos/mobile/core/designsystem/component/MifosBottomSheet.kt (1)

74-77: Attach the preview height modifier to a composable.
Modifier.height(...) is currently unused, so the preview won’t reflect the intended height. Consider applying it to the Box (or using a Spacer).

♻️ Proposed fix
-        content = {
-            Box {
-                Modifier.height(DesignToken.sizes.boxDp100)
-            }
-        },
+        content = {
+            Box(modifier = Modifier.height(DesignToken.sizes.boxDp100)) {
+            }
+        },
core/designsystem/src/commonMain/kotlin/org/mifos/mobile/core/designsystem/component/MifosButton.kt (1)

241-242: Track the TODO with a follow-up issue.
This TODO references a known error path; linking it to a task will help ensure it doesn’t get lost.

If you want, I can draft a short issue description for this follow-up.

core/designsystem/src/commonMain/kotlin/org/mifos/mobile/core/designsystem/component/scrollbar/AppScrollbars.kt (1)

185-185: Track the TODO for KptTheme shapes.
Please add a follow-up task/issue to resolve the KptTheme shape error or document the workaround. I can help investigate a safe KptTheme-based fallback if needed.

core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/TransactionScreenItem.kt (1)

75-82: Inconsistent spacing token usage.

The code mixes KptTheme.spacing (lines 75, 82) with DesignToken.spacing (line 78). Consider using one approach consistently for maintainability.

♻️ Suggested consistency fix
-                    .padding(KptTheme.spacing.sm),
+                    .padding(DesignToken.spacing.small),
             )
 
             Spacer(modifier = Modifier.width(DesignToken.spacing.medium))
 
             Column(
                 modifier = Modifier.weight(1f),
-                verticalArrangement = Arrangement.spacedBy(KptTheme.spacing.xs),
+                verticalArrangement = Arrangement.spacedBy(DesignToken.spacing.extraSmall),
             )

Or alternatively, migrate all to KptTheme.spacing:

-            Spacer(modifier = Modifier.width(DesignToken.spacing.medium))
+            Spacer(modifier = Modifier.width(KptTheme.spacing.md))

<string name="please_wait">Espere por favor...</string>
<string name="message">mensaje</string>
<string name="no_image_selected_or_something_went_wrong">No se ha seleccionado ninguna imagen o algo ha salido mal</string>
<string name="seleted_qr_image">Imagen QR seleccionada</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Search for the typo in all XML files
rg -n "seleted_qr_image" --type xml

# Also search for the correct spelling to see if it's used elsewhere
rg -n "selected_qr_image" --type xml

# Check the base strings file
fd "strings.xml$" -not -path "*/values-*" | head -20

Repository: openMF/mifos-mobile

Length of output: 2809


🏁 Script executed:

# Search for code references to both key names
rg "seleted_qr_image" --type java --type kt
rg "selected_qr_image" --type java --type kt

# Also check Compose files
rg "seleted_qr_image" --type rs
rg "selected_qr_image" --type rs

Repository: openMF/mifos-mobile

Length of output: 170


🏁 Script executed:

# Search for code references without file type restrictions
rg "seleted_qr_image" --type-list | head -5
rg "seleted_qr_image" 
rg "selected_qr_image"

Repository: openMF/mifos-mobile

Length of output: 2909


🏁 Script executed:

# Search for code references to the key name - looking for R.string or string resource references
rg "seleted_qr_image|selected_qr_image" | grep -E "\.(kt|java|xml|compose)" | grep -v "string name=" | head -20

Repository: openMF/mifos-mobile

Length of output: 45


🏁 Script executed:

# Search for string references in code (looking for R.string pattern)
rg "R\.string\." | grep -i "qr\|selected"

# Also search for context.getString or stringResource patterns
rg "getString.*qr|stringResource.*qr" -i

# Find Kotlin/Java source files in cmp-android QR-related code
fd "\.kt$|\.java$" cmp-android | xargs grep -l "qr\|QR" -i | head -10
</parameter>

Repository: openMF/mifos-mobile

Length of output: 2468


🏁 Script executed:

# Search for code that references the QR image string
rg "seleted_qr_image" --no-heading

# Check if the feature/qr module is the current active code
rg "selected_qr_image" --no-heading

# Look for any activity or fragment that uses QR image functionality
fd "\.kt$" feature/qr | head -5

Repository: openMF/mifos-mobile

Length of output: 2910


Key name typo: "seleted_qr_image" should be "selected_qr_image".

This typo exists in the base file cmp-android/src/main/res/values/strings.xml and is inherited by all translations including the Spanish variant at this location. Fix the key name in the base file and all language variants for consistency. Note: The newer feature/qr module uses the correct spelling "selected_qr_image".

🤖 Prompt for AI Agents
In `@cmp-android/src/main/res/values-es/strings.xml` at line 488, The string
resource key "seleted_qr_image" is misspelled and must be renamed to
"selected_qr_image" everywhere; update the base strings.xml entry and all
localized variants that currently declare the "seleted_qr_image" key to use
"selected_qr_image" instead, preserving each locale's translated value ("Imagen
QR seleccionada" in Spanish) and ensuring you also update any references in code
or XML that reference the old key (search for usages of seleted_qr_image and
replace with selected_qr_image).

<string name="feature_settings_appinfo_mobile">మొబైల్</string>
<string name="feature_settings_appinfo_logo_content_description">మిఫోస్ చిత్రం</string>
<string name="feature_settings_appinfo_app_name">మిఫోస్ మొబైల్</string>
<string name="feature_settings_appinfo_mifos_electonic_banking">మిఫోస్ ఎలక్ట్రానిక్ బ్యాంకింగ్</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== Checking all strings.xml files for this key ==="
rg -n "feature_settings_appinfo_mifos_elect" --type xml

echo ""
echo "=== Checking code references ==="
rg -n "feature_settings_appinfo_mifos_elect" --type kotlin

Repository: openMF/mifos-mobile

Length of output: 3792


Typo in string resource key must be fixed across all locale files and code: "electonic" → "electronic".

The key feature_settings_appinfo_mifos_electonic_banking has a typo missing the 'r' in "electronic". This misspelling is consistent across all 18 locale files (default, en, ar, te, gu, hi, hu, kn, mr, ms, pt, si, sw, es, fr, de, in, ur) and referenced in the Kotlin code at AppInfoScreen.kt (import and usage). The string values themselves are correctly translated, but the resource key name needs to be corrected everywhere.

🤖 Prompt for AI Agents
In `@feature/settings/src/commonMain/composeResources/values-te/strings.xml` at
line 101, The resource key feature_settings_appinfo_mifos_electonic_banking
contains a typo ("electonic") and must be renamed to
feature_settings_appinfo_mifos_electronic_banking across all locales and code;
update the key in every locale file (all 18 string XMLs) and then update all
references/imports/usages in Kotlin (e.g., where AppInfoScreen.kt imports or
accesses the resource) to the new key so builds and lookups remain consistent;
ensure you run a project-wide search/replace for
feature_settings_appinfo_mifos_electonic_banking and update any generated
R/Resource usages or string resource accessors accordingly.

Comment on lines 655 to 658
subtitle = "${response.message}, ${getString(
Res.string.feature_apply_share_status_failure_tip,
state.shareProductName,
),
)}",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find DataState definition
find . -type f -name "*.kt" | xargs rg -l "sealed.*DataState|data class Error"

Repository: openMF/mifos-mobile

Length of output: 5331


🏁 Script executed:

#!/bin/bash
# Search for DataState.Error definition more broadly
rg -n "class Error.*DataState|sealed class DataState" --type kotlin

Repository: openMF/mifos-mobile

Length of output: 286


🏁 Script executed:

#!/bin/bash
# Read the specific lines in question
head -n 660 feature/share-application/src/commonMain/kotlin/org/mifos/mobile/feature/share/application/fillApplication/FillApplicationViewModel.kt | tail -n 20

Repository: openMF/mifos-mobile

Length of output: 1217


🏁 Script executed:

#!/bin/bash
# Read the DataState definition to check message nullability
cat core/common/src/commonMain/kotlin/org/mifos/mobile/core/common/DataState.kt

Repository: openMF/mifos-mobile

Length of output: 1199


🏁 Script executed:

#!/bin/bash
# Check if there are similar error message concatenation patterns in the codebase
rg -n "response\.message.*getString|exception\.message.*getString" --type kotlin -A 2

Repository: openMF/mifos-mobile

Length of output: 680


🏁 Script executed:

#!/bin/bash
# Check how other parts of the codebase handle error messages
rg -n "DataState\.Error" feature/share-application/src/commonMain/kotlin/org/mifos/mobile/feature/share/application/fillApplication/FillApplicationViewModel.kt -A 10 | head -60

Repository: openMF/mifos-mobile

Length of output: 1671


Prevent "null" string from appearing in error messages and use localized formatting.

The code concatenates response.message directly, but since DataState.Error.message is defined as exception.message.toString(), a null exception message will render as the literal string "null" in the subtitle. Additionally, the hardcoded ", " separator is inappropriate for locale-aware formatting.

♻️ Suggested improvement
-                subtitle = "${response.message}, ${getString(
+                val errorPrefix = response.message.takeIf { it != "null" }?.let { "$it, " } ?: ""
+                subtitle = "$errorPrefix${getString(
                     Res.string.feature_apply_share_status_failure_tip,
                     state.shareProductName,
-                )}",
+                )}",

Alternatively, use a localized format string that accepts both the error message and the tip as parameters:

subtitle = getString(
    Res.string.feature_apply_share_status_failure_with_tip,
    response.message.takeIf { it != "null" } ?: "",
    state.shareProductName,
)

This allows translators to control punctuation and word order.

🤖 Prompt for AI Agents
In
`@feature/share-application/src/commonMain/kotlin/org/mifos/mobile/feature/share/application/fillApplication/FillApplicationViewModel.kt`
around lines 655 - 658, The subtitle currently concatenates response.message
directly, which can render the literal "null" (because DataState.Error.message
is exception.message.toString()) and uses a hardcoded ", " separator; update the
assignment in FillApplicationViewModel.kt to use a localized format string via
getString (e.g., Res.string.feature_apply_share_status_failure_with_tip) that
accepts the error message and product name, and pass response.message.takeIf {
it != "null" } ?: "" (or similar null/placeholder-safe value) and
state.shareProductName so translators control punctuation/order and the literal
"null" is never shown.

@Naman-kr404 Naman-kr404 force-pushed the MM-541-savings-account-details-doesnt-render-properly-the-values-in-the-button-table branch from 4406148 to 0302000 Compare January 25, 2026 15:26
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.

1 participant