Skip to content

Conversation

@praveenperera
Copy link
Contributor

@praveenperera praveenperera commented Dec 23, 2025

Summary

  • Remove duplicate "Received from" section for received transactions
  • Restructure ReceivedTransactionDetails to match iOS layout
  • Show Confirmations and Block Number as separate rows at the top (for confirmed transactions)
  • Show "Received At" with address and copy button below

Test plan

  • Open a confirmed received transaction and verify "More Details" shows: Confirmations, Block Number, then Received At with address
  • Open a pending received transaction and verify "More Details" only shows: Received At with address and copy button
  • Verify sent transactions are unchanged (Sent to with block/confirmations, fee details, etc.)
  • Compare with iOS to confirm visual parity

Summary by CodeRabbit

  • Bug Fixes
    • Reorganized transaction details display for improved clarity.
    • Confirmed transactions now more prominently display confirmation count and block number.
    • Enhanced "Sent to" section for sent transactions with clearer visual organization.
    • Streamlined layout to reduce clutter in transaction detail views.

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Warning

Rate limit exceeded

@praveenperera has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 47 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b38198e and c1816ca.

📒 Files selected for processing (2)
  • android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/ReceivedTransactionDetails.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/TransactionDetailsWidget.kt

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This pull request restructures transaction details UI presentation across two Kotlin files. Changes include relocating confirmation and block number displays earlier in the layout flow for confirmed transactions, adding a loading indicator for confirmations, reorganizing the "Sent to" section to render only for sent transactions, and adjusting spacer and divider positioning accordingly.

Changes

Cohort / File(s) Summary
Transaction Details UI Refactoring
android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/ReceivedTransactionDetails.kt, android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/TransactionDetailsWidget.kt
Reorganizes confirmed transaction display by moving "Confirmations" and "Block Number" sections earlier in the UI flow. Adds CircularProgressIndicator for loading states, applies NumberFormat for formatted number display. Restructures "Sent to" section to render conditionally for sent transactions only. Adjusts layout of dividers, spacers, and network fee positioning within conditional branches. Removes redundant block/confirmation display logic and outdated imports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Suggested labels

android

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 primary change: restructuring received transaction details in the Android app to match iOS layout parity.

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

@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

🧹 Nitpick comments (1)
android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/TransactionDetailsWidget.kt (1)

88-93: Consider using NumberFormat for consistency with received transactions.

The confirmations count uses .toString() here, while ReceivedTransactionDetails.kt (line 61) uses NumberFormat.getNumberInstance().format() to add thousand separators. For large confirmation counts (e.g., 10,000+), the formatted version improves readability.

🔎 Proposed change for consistent number formatting
+import java.text.NumberFormat
+
 if (numberOfConfirmations != null) {
     Text(
-        numberOfConfirmations.toString(),
+        NumberFormat.getNumberInstance().format(numberOfConfirmations),
         color = sub,
         fontSize = 14.sp,
     )
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a88eb8 and b38198e.

📒 Files selected for processing (2)
  • android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/ReceivedTransactionDetails.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/TransactionDetailsWidget.kt
🧰 Additional context used
📓 Path-based instructions (1)
android/app/src/main/java/org/bitcoinppl/cove/**/*.kt

⚙️ CodeRabbit configuration file

android/app/src/main/java/org/bitcoinppl/cove/**/*.kt: ⚠️ CRITICAL FFI/Threading Policy - READ FIRST:

  • NEVER suggest moving Rust FFI calls to background threads (withContext(Dispatchers.IO))

  • Rust FFI calls are SYNCHRONOUS and FAST - they complete in microseconds

  • The Rust core uses Tokio runtime internally and handles all async operations

  • Database operations (redb) are optimized and do NOT block the UI thread

  • ONLY suggest Dispatchers.IO with profiling evidence showing >16ms UI blocking

  • If you see a Rust FFI call on the main thread, DO NOT FLAG IT - this is correct

  • Ignore generated bindings code in android/app/src/main/java/org/bitcoinppl/cove_core/**

  • Verify correct functionality and logic consistency.

  • Check for idiomatic Kotlin usage and performance best practices.

FFI Resource Management:

  • Always verify that UniFFI objects implementing AutoCloseable call .close() before being nulled
  • Example: Mnemonic must call .close() to trigger zeroization of sensitive data
  • Use DisposableEffect for cleanup in Compose, never just null references

Compose Best Practices:

  • LaunchedEffect should be keyed to actual dependencies, not Unit
  • Set loading states at the beginning of LaunchedEffect blocks

Files:

  • android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/ReceivedTransactionDetails.kt
  • android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/TransactionDetailsWidget.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Greptile Review
  • GitHub Check: test (ubuntu-latest)
  • GitHub Check: test (macos-latest)
  • GitHub Check: compile-android
  • GitHub Check: compile-ios
  • GitHub Check: ktlint
  • GitHub Check: clippy
🔇 Additional comments (5)
android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/TransactionDetailsWidget.kt (2)

61-77: LGTM! Clean restructuring of the sent transaction path.

The dedicated "Sent to" section for sent transactions is well-structured and maintains the existing functionality while improving code organization.


154-160: LGTM! Proper separation of concerns.

Delegating received transaction details to a dedicated component maintains clean code organization and aligns with the PR objective to restructure the received transaction UI.

android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/ReceivedTransactionDetails.kt (3)

50-89: Excellent implementation of iOS parity for confirmed transactions!

The new structure perfectly matches the PR objectives:

  • Confirmations and Block Number are displayed as separate rows at the top for confirmed transactions
  • The loading indicator (lines 67-72) provides good UX feedback while confirmations are being fetched
  • NumberFormat usage ensures large confirmation counts are readable with thousand separators
  • The conditional at line 51 ensures pending transactions skip this block entirely

The implementation is clean, well-structured, and maintains visual consistency.


91-135: LGTM! Well-implemented address display with copy functionality.

The "Received At" section correctly appears for all received transactions (both confirmed and pending), and the copy-to-clipboard functionality with visual feedback is intuitive and user-friendly.


138-143: LGTM! Proper LaunchedEffect usage.

The effect is correctly keyed to isCopied (following the coding guidelines to key on actual dependencies), and the 5-second auto-reset provides good user feedback without lingering too long.

@greptile-apps
Copy link

greptile-apps bot commented Dec 23, 2025

Greptile Summary

Restructured received transaction details to match iOS layout by moving confirmations and block number above the address section, and removed the duplicate "Received from" label (now "Received At").

Key Changes:

  • For confirmed received transactions, confirmations and block number now display as separate rows at the top
  • Address section now uses "Received At" label with copy button
  • Sent transaction layout remains unchanged with "Sent to" section
  • Removed duplicate "Received from" section that was causing layout inconsistency
  • Cleaned up unused imports (Icons, Check, Box, CoveColor, etc.)

Issue Found:

  • Block number could display empty text if blockNumberFmt() returns null for a confirmed transaction (line 82-83 in ReceivedTransactionDetails.kt)

Confidence Score: 4/5

  • This PR is safe to merge with one minor issue to address
  • The refactoring successfully achieves iOS parity and improves code organization by separating sent/received transaction logic. The changes are well-structured and remove duplicate UI elements. One logical issue exists where block number could display empty text for edge cases, but this is non-critical and easy to fix.
  • Pay attention to ReceivedTransactionDetails.kt for the null block number handling

Important Files Changed

Filename Overview
android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/ReceivedTransactionDetails.kt Restructured to show confirmations and block number before address; potential issue with null block number handling
android/app/src/main/java/org/bitcoinppl/cove/flows/SelectedWalletFlow/TransactionDetails/TransactionDetailsWidget.kt Cleanly separated sent/received transaction logic; removed duplicate "Received from" section

Sequence Diagram

sequenceDiagram
    participant User
    participant TransactionDetailsWidget
    participant ReceivedTransactionDetails
    participant TransactionDetails
    
    User->>TransactionDetailsWidget: View transaction details
    
    alt Transaction is Sent
        TransactionDetailsWidget->>TransactionDetails: isSent()
        TransactionDetails-->>TransactionDetailsWidget: true
        TransactionDetailsWidget->>TransactionDetails: addressSpacedOut()
        TransactionDetailsWidget->>TransactionDetails: blockNumberFmt()
        TransactionDetailsWidget->>TransactionDetailsWidget: Display "Sent to" section
        TransactionDetailsWidget->>TransactionDetailsWidget: Display network fee details
        TransactionDetailsWidget->>TransactionDetailsWidget: Display total spent
    else Transaction is Received
        TransactionDetailsWidget->>TransactionDetails: isSent()
        TransactionDetails-->>TransactionDetailsWidget: false
        TransactionDetailsWidget->>ReceivedTransactionDetails: Render received details
        
        alt Transaction is Confirmed
            ReceivedTransactionDetails->>TransactionDetails: isConfirmed()
            TransactionDetails-->>ReceivedTransactionDetails: true
            ReceivedTransactionDetails->>ReceivedTransactionDetails: Display confirmations
            ReceivedTransactionDetails->>TransactionDetails: blockNumberFmt()
            ReceivedTransactionDetails->>ReceivedTransactionDetails: Display block number
        end
        
        ReceivedTransactionDetails->>TransactionDetails: addressSpacedOut()
        ReceivedTransactionDetails->>ReceivedTransactionDetails: Display "Received At" with copy button
        
        User->>ReceivedTransactionDetails: Click copy button
        ReceivedTransactionDetails->>TransactionDetails: address().string()
        ReceivedTransactionDetails->>ReceivedTransactionDetails: Copy to clipboard
        ReceivedTransactionDetails-->>User: Show "Copied" feedback
    end
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@praveenperera praveenperera changed the base branch from master to android-fix-exports December 23, 2025 03:53
Base automatically changed from android-fix-exports to master December 23, 2025 04:23
Remove duplicate "Received from" section that was incorrectly appearing
for received transactions. Restructure ReceivedTransactionDetails to
match iOS layout: show Confirmations and Block Number as separate rows
at the top (for confirmed transactions), then "Received At" with address
and copy button below.

Previously Android was showing the address twice and using a combined
"block | confirmations" row at the bottom, which didn't match iOS.
@praveenperera praveenperera force-pushed the androi-parity-txn-details branch from b38198e to c1816ca Compare December 23, 2025 04:48
@praveenperera praveenperera merged commit 6b57a5c into master Dec 23, 2025
9 checks passed
@praveenperera praveenperera deleted the androi-parity-txn-details branch December 23, 2025 15:56
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