Skip to content

Conversation

@Arinyadav1
Copy link
Contributor

@Arinyadav1 Arinyadav1 commented Nov 5, 2025

Fixes - Jira-#610

IMG_4970.MOV

Summary by CodeRabbit

  • Bug Fixes

    • Selecting a loan account now properly opens the loan account summary screen instead of remaining on the current view.
  • Refactor

    • Loan accounts route now renders the screen and dialog components in swapped roles to adjust how the view is presented.

@coderabbitai
Copy link

coderabbitai bot commented Nov 5, 2025

Walkthrough

Swapped which UI component is rendered in the client loan accounts view (Dialog and Screen invocations exchanged and their parameters adjusted), and wired the clientLoanAccountsDestination's navigateToViewAccount callback to navController::navigateToLoanAccountSummaryScreen instead of a no-op.

Changes

Cohort / File(s) Summary
UI Component Reordering
feature/client/.../ClientLoanAccountsScreen.kt
Replaced the first ClientLoanAccountsDialog(...) call with ClientLoanAccountsScreen(...) and the second ClientLoanAccountsScreen(...) call with ClientLoanAccountsDialog(...); the Screen variant now receives navController, Dialog is invoked without it.
Navigation Callback Wiring
feature/client/.../ClientNavigation.kt
clientLoanAccountsDestination's navigateToViewAccount callback changed from an empty lambda to navController::navigateToLoanAccountSummaryScreen, enabling navigation to the loan account summary on selection.

Sequence Diagram

sequenceDiagram
    participant User
    participant UI as ClientLoanAccounts (Screen/Dialog)
    participant NavDest as clientLoanAccountsDestination
    participant Router as navController

    User->>UI: Selects loan account
    rect rgb(250,220,200)
      Note over NavDest: Before: navigateToViewAccount = no-op
    end
    rect rgb(200,250,220)
      Note over NavDest: After: navigateToViewAccount -> navController::navigateToLoanAccountSummaryScreen
      UI->>NavDest: navigateToViewAccount(accountId)
      NavDest->>Router: navigateToLoanAccountSummaryScreen(accountId)
      Router->>User: Open Loan Account Summary screen
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Pay attention to ClientLoanAccountsScreen.kt to confirm navController is passed to the intended UI variant and no UI state/props were miswired.
  • Verify clientLoanAccountsDestination change in ClientNavigation.kt uses the correct navigation target and preserves existing behavior for other destinations.

Poem

🐰 I swapped a screen, then hopped away,
A dialog moved where screens once lay.
A route that slept now springs to roam,
I nudge the user gently home. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ 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 accurately describes the main change: connecting the loan account item list to the loan account detail page by wiring navigation callbacks.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ff8683d and 23b1d2c.

📒 Files selected for processing (2)
  • feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientLoanAccounts/ClientLoanAccountsScreen.kt (1 hunks)
  • feature/client/src/commonMain/kotlin/com/mifos/feature/client/navigation/ClientNavigation.kt (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientLoanAccounts/ClientLoanAccountsScreen.kt
  • feature/client/src/commonMain/kotlin/com/mifos/feature/client/navigation/ClientNavigation.kt

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.

@therajanmaurya therajanmaurya merged commit da5da5e into openMF:development Nov 19, 2025
2 checks passed
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.

3 participants