Skip to content

chore: Update docs of recent transaction screen#3090

Merged
niyajali merged 3 commits intoopenMF:developmentfrom
Aryan-Baglane:docs-recent-transaction-screen
Jan 23, 2026
Merged

chore: Update docs of recent transaction screen#3090
niyajali merged 3 commits intoopenMF:developmentfrom
Aryan-Baglane:docs-recent-transaction-screen

Conversation

@Aryan-Baglane
Copy link
Contributor

@Aryan-Baglane Aryan-Baglane commented Jan 22, 2026

Fixes - 439

updated the documentation of feature/recent-transaction-screen

Didn't create a Jira ticket, click here to create new.

Please Add Screenshots If there are any UI changes.

Before After

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the static analysis check ./gradlew check or ci-prepush.sh to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

Summary by CodeRabbit

  • New Features

    • Recent Transaction feature now includes network connectivity awareness, automatically refreshing data when transitioning between online and offline states.
    • Integrated user preferences into the Recent Transaction experience for improved personalization.
  • Documentation

    • Added comprehensive documentation for Recent Transaction UI components.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

This pull request establishes the recent transactions feature module by introducing dependency injection configuration, navigation API extensions, network-aware state management in the ViewModel, and documentation comments. The ViewModel is enhanced to monitor network connectivity and coordinate data fetching based on online/offline status.

Changes

Cohort / File(s) Summary
Dependency Injection
feature/recent-transaction/src/commonMain/kotlin/org/mifos/mobile/feature/recent/transaction/di/RecentTransactionModule.kt
Added new Koin module recentTransactionModule that registers RecentTransactionViewModel as a viewModel dependency. Includes documentation comment describing the module's purpose.
Navigation Configuration
feature/recent-transaction/src/commonMain/kotlin/org/mifos/mobile/feature/recent/transaction/navigation/RecentTransactionNavGraph.kt
Introduced NavController.navigateToRecentTransactionScreen() extension and NavGraphBuilder.recentTransactionDestination() function to configure navigation routing with slide transitions and callback wiring for back navigation and transaction details navigation.
ViewModel Network Integration
feature/recent-transaction/src/commonMain/kotlin/org/mifos/mobile/feature/recent/transaction/viewmodel/RecentTransactionViewModel.kt
Extended constructor with NetworkMonitor and UserPreferencesRepository dependencies. Added network status observation on initialization, new ReceiveNetworkResult action, and logic to trigger account fetching and transaction loading based on connectivity state changes.
UI Documentation
feature/recent-transaction/src/commonMain/kotlin/org/mifos/mobile/feature/recent/transaction/screen/RecentTransactionScreen.kt
Added KDoc documentation blocks for public composable functions (RecentTransactionScreen, RecentTransactionScreenContent, TransactionFilterSheetContent, FilterOptionChip) without modifying function signatures.

Sequence Diagram(s)

sequenceDiagram
    participant VM as RecentTransactionViewModel
    participant NM as NetworkMonitor
    participant UR as UserPreferencesRepository
    participant UI as RecentTransactionScreen

    VM->>NM: Observe network status (on init)
    loop Network Status Changes
        NM->>VM: Emit online/offline state
        VM->>VM: ReceiveNetworkResult action
        alt Status is Online
            VM->>UR: Fetch accounts & load transactions
            UR->>VM: Return data
            VM->>UI: Update UI state
        else Status is Offline
            VM->>UI: Update network status in UI
        end
    end
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly Related PRs

Suggested Reviewers

  • Nagarjuna0033
  • Arinyadav1
  • revanthkumarJ

Poem

🐰 A network-aware feature hops into view,
With DI bindings and nav routes so true,
The ViewModel listens for online/offline calls,
And gracefully handles connectivity's ups and falls!
Documentation blooms as the module takes flight,
Our recent transactions now work left and right! 🌿✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The PR title claims to only update documentation, but the changeset includes significant functional additions: new DI module registration, navigation functions, ViewModel constructor changes, and new action types. Update the PR title to reflect the primary functional changes, such as 'feat: Add recent transaction navigation and network-aware ViewModel' or revise the PR scope to match the documentation-only intent.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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: 0

Caution

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

⚠️ Outside diff range comments (1)
feature/recent-transaction/src/commonMain/kotlin/org/mifos/mobile/feature/recent/transaction/viewmodel/RecentTransactionViewModel.kt (1)

146-180: Keep filter state consistent when dismissing/clearing filters.
DismissFilter clears filterAccount, while ClearFilter does not. Since hasActiveFilters depends on filterAccount, this can disable “Clear All” when an account filter is still active, and keep it enabled after clearing. Consider moving the reset to ClearFilter and leaving DismissFilter unchanged.

🔧 Suggested fix
 is RecentTransactionAction.DismissFilter -> updateState {
     it.copy(
         dialogState = null,
-        filterAccount = null,
     )
 }
 ...
 is RecentTransactionAction.ClearFilter -> {
     val firstAccount = state.accounts.firstOrNull()
     updateState {
         it.copy(
             selectedAccount = firstAccount,
             filterType = TransactionFilterType.ALL,
             dialogState = null,
+            filterAccount = null,
         )
     }
     loadTransactionsAfterFilter()
 }

@niyajali niyajali changed the title Docs Update - recent transaction screen chore: Update docs of recent transaction screen Jan 23, 2026
@niyajali niyajali merged commit be41804 into openMF:development Jan 23, 2026
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.

2 participants