Skip to content

Conversation

@praveenperera
Copy link
Contributor

@praveenperera praveenperera commented Jan 23, 2026

Summary by CodeRabbit

  • Improvements
    • Enhanced transaction content display with improved loading state visibility during wallet scanning operations.
    • Refined wallet screen responsiveness with optimized scroll behavior.
    • Better handling of wallet state transitions for improved transaction visibility.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

This change refactors SelectedWalletScreen.kt to introduce a hasTransactions condition that gates transaction-related content rendering. It consolidates wallet content into a reusable composable block and conditionally applies overscroll customization based on transaction availability.

Changes

Cohort / File(s) Summary
Transaction Rendering Refactor
android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/SelectedWalletScreen.kt
Introduces hasTransactions condition derived from WalletLoadState.SCANNING and WalletLoadState.LOADED. Restructures wallet content into a reusable composable block and applies conditional CompositionLocalProvider wrapping to disable overscroll customization when transactions are unavailable. Extends SCANNING and LOADED branches to render loading state or TransactionsCardView with appropriate flags (isScanning, isFirstScan). Adds imports for LocalOverscrollFactory and CompositionLocalProvider.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly Related PRs

Suggested Labels

android

Poem

🐰 A rabbit hops with glee so bright,
Transactions flow, the UI's right,
With content blocks that dance and sway,
Overscroll fades when none to display!
Pull-to-refresh, a smoother way.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ 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%. 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 'Android: Disable overscroll on empty wallet state' directly aligns with the main change: disabling overscroll customization when there are no transactions by wrapping content in CompositionLocalProvider with null overscroll factory.

✏️ 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.

@praveenperera praveenperera changed the title Disable overscroll on empty wallet state (Android) Android: Disable overscroll on empty wallet state Jan 23, 2026
@praveenperera
Copy link
Contributor Author

@greptile-apps review pr

@greptile-apps
Copy link

greptile-apps bot commented Jan 23, 2026

Greptile Overview

Greptile Summary

This PR disables the overscroll effect on Android when the wallet has no transactions, improving the UX of the empty wallet state.

Key changes:

  • Added LocalOverscrollFactory and CompositionLocalProvider imports
  • Introduced a hasTransactions boolean that checks if there are any transactions or unsigned transactions in the current wallet state
  • Refactored the UI content into a composable lambda function
  • Conditionally wraps the content with CompositionLocalProvider(LocalOverscrollFactory provides null) when there are no transactions, disabling the overscroll bounce effect
  • When transactions exist, the content renders normally with default overscroll behavior enabled

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is minimal, well-scoped, and uses the standard Compose API for disabling overscroll. The logic correctly determines when to disable overscroll (empty state) vs. enable it (has transactions). The refactoring into a content lambda is clean and doesn't affect existing functionality.
  • No files require special attention

Important Files Changed

Filename Overview
android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/SelectedWalletScreen.kt Disabled overscroll effect on empty wallet state by wrapping content in CompositionLocalProvider with LocalOverscrollFactory set to null

Sequence Diagram

sequenceDiagram
    participant User
    participant SelectedWalletScreen
    participant WalletManager
    participant CompositionLocalProvider
    participant Content

    User->>SelectedWalletScreen: View wallet screen
    SelectedWalletScreen->>WalletManager: Check loadState
    WalletManager-->>SelectedWalletScreen: Return loadState (LOADING/SCANNING/LOADED)
    
    alt hasTransactions = true
        SelectedWalletScreen->>Content: Render with default overscroll
        Content-->>User: Display transactions with overscroll enabled
    else hasTransactions = false
        SelectedWalletScreen->>CompositionLocalProvider: Set LocalOverscrollFactory to null
        CompositionLocalProvider->>Content: Render with disabled overscroll
        Content-->>User: Display empty state without overscroll effect
    end
Loading

Base automatically changed from fix-paste-words-bugs to master January 23, 2026 02:53
@praveenperera praveenperera enabled auto-merge (squash) January 23, 2026 02:55
@praveenperera praveenperera force-pushed the pr/android-empty-wallet-overscroll branch from aa9824a to 648b194 Compare January 23, 2026 17:40
@greptile-apps
Copy link

greptile-apps bot commented Jan 23, 2026

Automatic reviews are disabled for this repository.

@praveenperera praveenperera merged commit ad6f75c into master Jan 23, 2026
9 checks passed
@praveenperera praveenperera deleted the pr/android-empty-wallet-overscroll branch January 23, 2026 17:53
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