Skip to content

feat: redesign about me (dashpay user screen -> dialog) - #1503

Merged
HashEngineering merged 3 commits into
masterfrom
feat/redesign-about-me
Jul 13, 2026
Merged

HashEngineering merged 3 commits into
masterfrom
feat/redesign-about-me

Conversation

@HashEngineering

@HashEngineering HashEngineering commented Jun 28, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Related PR's and Dependencies

Screenshots / Videos

How Has This Been Tested?

  • QA (Mobile Team)

Checklist:

  • I have performed a self-review of my own code and added comments where necessary
  • I have added or updated relevant unit/integration/functional/e2e tests

Summary by CodeRabbit

  • New Features

    • Added a richer in-app DashPay contact experience using a bottom sheet with profile preview, contact request states, activity filtering, and adaptive action flows.
    • Added a new avatar UI with zoomed profile image support, plus deterministic color/letter placeholder fallback.
    • Added a new green filled button style and updated contact notification icons/strings.
  • Bug Fixes

    • Fixed notification payment date handling to use consistent milliseconds timestamps.
    • Improved profile/contact navigation by switching to fragment-based bottom-sheet results and safer dialog transitions.

HashEngineering and others added 2 commits June 16, 2026 13:22
* feat: add ComposeBottomSheet.kt

* feat: add new DashPayUserBottomSheet and connect to Contacts and SearchUserFragment.kt

* fix: avatar was defaulting to letter image

* feat: add coil compose to wallet module

* fix: use NavBarClose and fix background color

* fix: add filter to bottom sheet

* fix: update icons, adjust filter

* fix: update the received request card

* fix: text and refactor

* fix: icons in activity for sent/accept

* fix: replace DashPayUserActivity with DashPayUserBottomSheet in other places

* fix: defer finish() after showing DashPayUserBottomSheet, drop dead code

Calling Activity.finish() immediately after DashPayUserBottomSheet.show()
raced with launchWhenResumed in the sheet's show path, risking an
IllegalStateException or a silently dropped fragment commit. Post the
finish() so the fragment transaction lands first. Also remove now-unused
DashPayUserActivity/Intent imports and commented-out startActivity calls
left behind by the bottom-sheet migration.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix: more minor fixes

* fix: expand if necessary, add scrolling

* fix: don't finish() while DashPayUserBottomSheet is hosted by the activity

The bottom sheet is shown on TransactionResultActivity's own
FragmentManager, so finishing the activity right after show() tore the
sheet down with it - clicking the contact icon just closed the payment
window and revealed the main screen.

Icon click: drop the finish() entirely; dismissing the sheet returns to
the transaction result screen. Close button with contact data: defer
finish() until the sheet is dismissed via FragmentLifecycleCallbacks,
mirroring the old finish() + DashPayUserActivity flow.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix: coderabbit fixes

* fix: master-engineer findings

* fix: remove duplicate Grapper.kt causing conflicting Grabber overloads

Grapper.kt was a byte-for-byte duplicate of Grabber.kt declaring the same
Grabber composable, causing conflicting overloads and overload resolution
ambiguity errors in the common module build.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix: compile issues after merging to master

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
* feat: group transactions on DashPayUserBottomSheet

* fix: support scrolling

* fix: onDispose fix
@HashEngineering HashEngineering self-assigned this Jun 28, 2026
@coderabbitai

coderabbitai Bot commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 476f513f-a81d-474e-ba91-50609e0cdaff

📥 Commits

Reviewing files that changed from the base of the PR and between 4c9494d and 37e6f10.

📒 Files selected for processing (6)
  • common/src/main/java/org/dash/wallet/common/ui/avatar/ProfilePictureZoomTransformation.kt
  • wallet/src/de/schildbach/wallet/ui/compose_views/ProfileAvatarCompose.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/ContactsFragment.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheet.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheetViewModel.kt
  • wallet/src/de/schildbach/wallet/ui/transactions/TransactionResultActivity.kt
🚧 Files skipped from review as they are similar to previous changes (6)
  • common/src/main/java/org/dash/wallet/common/ui/avatar/ProfilePictureZoomTransformation.kt
  • wallet/src/de/schildbach/wallet/ui/compose_views/ProfileAvatarCompose.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/ContactsFragment.kt
  • wallet/src/de/schildbach/wallet/ui/transactions/TransactionResultActivity.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheetViewModel.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheet.kt

📝 Walkthrough

Walkthrough

Introduces DashPayUserBottomSheet and its ViewModel, replacing DashPayUserActivity across profile entry points. Adds Compose profile/contact UI, avatar cropping, notification resources, notification aggregation, and FragmentResult-based refresh handling.

Changes

DashPay User Bottom Sheet Feature

Layer / File(s) Summary
Shared profile and contact UI components
common/.../avatar/ProfilePictureZoomTransformation.kt, common/.../components/DashButton.kt, wallet/.../compose_views/ProfileAvatarCompose.kt, wallet/build.gradle, wallet/res/drawable/ic_notification_contact_*.xml, wallet/res/values/strings-dashpay.xml
Adds avatar cropping/loading, FilledGreen, contact icons, and contact-request strings.
Contact request action widget
wallet/.../dashpay/widget/ContactRequestPaneCompose.kt
Renders relationship-dependent send, accept, loading, payment, and disclaimer states.
Bottom sheet state and notification orchestration
wallet/.../dashpay/user/DashPayUserBottomSheetViewModel.kt, wallet/.../data/NotificationItemPayment.kt
Adds filtering, profile enrichment, credit checks, contact-request operations, notification aggregation, and millisecond notification dates.
DashPayUserBottomSheet Compose UI
wallet/.../dashpay/user/DashPayUserBottomSheet.kt
Adds user/request cards, grouped activity notifications, filters, sheet drag coordination, and previews.
Profile-opening callback wiring
wallet/.../transactions/TransactionResultViewBinder.kt, wallet/.../transactions/*DialogFragment.kt
Routes profile opening through callbacks and displays the bottom sheet from transaction dialogs.
Transaction result bottom-sheet lifecycle
wallet/.../transactions/TransactionResultActivity.kt
Defers activity completion until the bottom sheet is destroyed and restores that state across configuration changes.
Fragment profile-flow migration
wallet/.../SearchUserFragment.kt, wallet/.../dashpay/ContactsFragment.kt, wallet/.../dashpay/NotificationsFragment.kt, wallet/.../invite/InviteDetailsFragment.kt, wallet/.../main/WalletTransactionsFragment.kt
Replaces activity-result profile navigation with bottom-sheet presentation and FragmentResult refresh callbacks.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: abaranouski

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.59% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: redesigning the DashPay user screen into a dialog.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/redesign-about-me

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🧹 Nitpick comments (1)
wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheetViewModel.kt (1)

112-130: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep raw notifications inside the single UIState.

rawNotifications creates a second state source beside _uiState, which makes the ViewModel harder to reason about and drifts from the repo pattern already used here. Folding the raw list into DashPayUserBottomSheetUIState keeps filtering and rendering derived from one source of truth. As per coding guidelines, **/*ViewModel.kt: “ViewModels should use a single UIState data class rather than multiple separate flows”.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheetViewModel.kt`
around lines 112 - 130, The ViewModel currently keeps notification data in a
separate `rawNotifications` flow, which violates the single-source-of-truth
pattern. Move the raw list into `DashPayUserBottomSheetUIState` and update
`DashPayUserBottomSheetViewModel` so filtering derives from `_uiState` only,
with `applyFilter` operating on the state-held list instead of a second flow.
Adjust the `init` pipeline and any state updates to read/write through `UIState`
exclusively, keeping `notifications` as the derived displayed list.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@common/src/main/java/org/dash/wallet/common/ui/avatar/ProfilePictureZoomTransformation.kt`:
- Around line 37-43: The crop logic in
ProfilePictureZoomTransformation.transform should reject malformed zoom
rectangles before sizing the crop. Add a guard around the zoomedRect-derived
calculations so that when zoomedRect.right <= zoomedRect.left or
zoomedRect.bottom <= zoomedRect.top, the method returns the original input
instead of letting the cropWidth/cropHeight coercion produce a 1px sliver. Keep
the existing x/y/cropWidth/cropHeight flow for valid rectangles and place the
new check near the zoomedRect handling in transform.

In `@wallet/src/de/schildbach/wallet/ui/compose_views/ProfileAvatarCompose.kt`:
- Line 63: Remove the username and avatar URL from the composable logging in
ProfileAvatarCompose so user identifiers and profile-picture URLs are not
written to logcat. Update the Log.d call in the compose path to either omit
these values entirely or wrap the logging behind a non-production/build-debug
guard, and make the same change for the related logging around the other
affected lines in this composable.
- Around line 80-85: The avatar request in ProfileAvatarCompose’s image builder
is forcing full-size decoding via Size.ORIGINAL, which can waste memory and
bandwidth for bounded UI rendering. Update the ImageRequest.Builder setup in the
avatar-loading path to use Coil’s target size or another explicit maximum
instead of Size.ORIGINAL so the image is downsampled before decode, while
keeping the existing transformations and crossfade behavior.

In `@wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheet.kt`:
- Line 179: The Ignore action in DashPayUserBottomSheet is currently a no-op, so
either wire it to the real ignore flow used by the mirrored activity or
remove/disable the button until implemented. Update the onIgnoreClick handler in
DashPayUserBottomSheet (and any related request-received card wiring such as
contact_request_ignore) so the UI does not expose an inert primary action.
- Around line 266-274: The DashPay contact-change result is being emitted too
early in DashPayUserBottomSheet, because `sendContactRequest()` only queues work
and does not confirm success. Move the `notifyContactChange()` trigger out of
the `CreditCheckOutcome.Proceed` path and into the success handling for
`sendContactRequestState`, so the fragment result is sent only after the contact
operation has actually succeeded; keep the `viewModel.sendContactRequest()` call
where it starts the operation, and use the existing
`viewModel.resetCreditCheck()` flow accordingly.
- Around line 842-846: The displayed amount logic in DashPayUserBottomSheet
should not read from tx.outputs.firstOrNull(), since that can show change or a
single recipient amount for sent rows. Update the amount computation in the same
area as the isSentTransaction()/received classification to use the wallet-net
value basis already used for sent/received detection, or precompute the correct
display amount before passing it into the composable.

In
`@wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheetViewModel.kt`:
- Around line 141-158: The applyFilter function in
DashPayUserBottomSheetViewModel currently lets NotificationItemContact always
pass through the else branch, so Sent and Received do not affect contact rows.
Update applyFilter to classify contact items using the same sent/received
direction logic already used for contact-row presentation, and filter them out
when they don’t match the selected NotificationFilter. Keep the existing
behavior for NotificationItemPayment and ALL, and make sure the Contact row
handling follows the same rules as the existing title/icon direction logic.

In
`@wallet/src/de/schildbach/wallet/ui/dashpay/widget/ContactRequestPaneCompose.kt`:
- Around line 82-90: The ContactRequestPaneCompose UI is mapping INVITE_RECEIVED
and ACCEPTING_INVITE to the same send/pay action as FRIENDS, so incoming
requests never show an accept flow. Update the when branch in
ContactRequestPaneCompose so incoming request states use a distinct accept CTA
(with the correct label and onClick handler) instead of DashButton wired to
onPayClick, while keeping the FRIENDS branch on the existing pay action.

In
`@wallet/src/de/schildbach/wallet/ui/transactions/TransactionResultActivity.kt`:
- Around line 296-300: Persist the deferred-finish flow in
TransactionResultActivity so it survives rotation: store a pending-finish flag
in saved instance state and restore it in onCreate/onRestoreInstanceState, then
reattach the FragmentLifecycleCallbacks through finishWhenUserSheetDismissed()
whenever a DashPayUserBottomSheet is still expected to control exit. Make sure
the recreated activity recognizes the pending state before showing/restoring the
sheet, so dismissing the restored bottom sheet still finishes the flow instead
of leaving the user on TransactionResultActivity.

---

Nitpick comments:
In
`@wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheetViewModel.kt`:
- Around line 112-130: The ViewModel currently keeps notification data in a
separate `rawNotifications` flow, which violates the single-source-of-truth
pattern. Move the raw list into `DashPayUserBottomSheetUIState` and update
`DashPayUserBottomSheetViewModel` so filtering derives from `_uiState` only,
with `applyFilter` operating on the state-held list instead of a second flow.
Adjust the `init` pipeline and any state updates to read/write through `UIState`
exclusively, keeping `notifications` as the derived displayed list.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8278be2d-ef9f-4de1-8951-1142528f8507

📥 Commits

Reviewing files that changed from the base of the PR and between 62e5962 and 4c9494d.

📒 Files selected for processing (22)
  • .claude/agents/DEVELOPMENT-PATTERNS.md
  • common/src/main/java/org/dash/wallet/common/ui/avatar/ProfilePictureZoomTransformation.kt
  • common/src/main/java/org/dash/wallet/common/ui/components/DashButton.kt
  • common/src/main/java/org/dash/wallet/common/ui/components/Grabber.kt
  • wallet/build.gradle
  • wallet/res/drawable/ic_notification_contact_received.xml
  • wallet/res/drawable/ic_notification_contact_sent.xml
  • wallet/res/values/strings-dashpay.xml
  • wallet/src/de/schildbach/wallet/data/NotificationItemPayment.kt
  • wallet/src/de/schildbach/wallet/ui/SearchUserFragment.kt
  • wallet/src/de/schildbach/wallet/ui/compose_views/ProfileAvatarCompose.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/ContactsFragment.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/NotificationsFragment.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheet.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheetViewModel.kt
  • wallet/src/de/schildbach/wallet/ui/dashpay/widget/ContactRequestPaneCompose.kt
  • wallet/src/de/schildbach/wallet/ui/invite/InviteDetailsFragment.kt
  • wallet/src/de/schildbach/wallet/ui/main/WalletTransactionsFragment.kt
  • wallet/src/de/schildbach/wallet/ui/transactions/ChangeTaxCategoryExplainerDialogFragment.kt
  • wallet/src/de/schildbach/wallet/ui/transactions/TransactionDetailsDialogFragment.kt
  • wallet/src/de/schildbach/wallet/ui/transactions/TransactionResultActivity.kt
  • wallet/src/de/schildbach/wallet/ui/transactions/TransactionResultViewBinder.kt

@HashEngineering HashEngineering mentioned this pull request Jun 30, 2026
1 of 3 tasks
* fix: address about-me review findings in DashPay user bottom sheet

- ProfilePictureZoomTransformation: reject malformed zoom rects up front
  instead of producing a 1px sliver
- ProfileAvatarCompose: gate username/URL logging behind BuildConfig.DEBUG;
  drop Size.ORIGINAL so Coil downsamples to the avatar bounds
- DashPayUserBottomSheet: disable the unimplemented Ignore button; notify
  the host only after the contact op succeeds; show wallet-net tx amount
  instead of the first output
- DashPayUserBottomSheetViewModel: apply Sent/Received filter to contact
  rows using the same direction logic as the row UI
- TransactionResultActivity: persist the deferred-finish flag so dismissing
  the restored bottom sheet still exits after rotation

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix: ContactsFragment was blank if pressing back from SearchUserFragment

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
@HashEngineering
HashEngineering merged commit 85b8b57 into master Jul 13, 2026
2 of 3 checks passed
@bfoss765
bfoss765 deleted the feat/redesign-about-me branch August 2, 2026 21: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