Skip to content

feat(wallet): show clickable users in transfer details - #6915

Open
SeniorZhai wants to merge 4 commits into
masterfrom
feat/transaction-detail-clickable-user
Open

SeniorZhai wants to merge 4 commits into
masterfrom
feat/transaction-detail-clickable-user

Conversation

@SeniorZhai

Copy link
Copy Markdown
Member

No description provided.

@gaotic

gaotic Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

AI review done for 0cba413 in 2m 31s · 1 comment

Quality: Needs one fix before merge. The Kotlin logic was checked in isolation. Android rendering and tap behavior remain unverified.

Role Model Status
Reviewer Codex codex/gpt-6.2-sol · effort high ok

@gaotic gaotic Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI review · Codex · 3b4923f

The diff and XML checks passed, and an isolated Kotlin harness reproduced all three findings. The Android build, lint, and Robolectric tests were blocked because Gradle could not resolve the Foojay plugin offline.

}
if (opponentId.isNotBlank() && !opponentId.startsWith("XIN", ignoreCase = true) && !opponentId.isTransactionHashLike()) {
lifecycleScope.launch {
val user = walletViewModel.refreshUser(opponentId) ?: return@launch

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Opening the details for an uncached counterparty can show a “User not found” toast even though the transaction loaded successfully. refreshUser sends lookup failures to the global error handler before returning null. Use a quiet lookup for this optional profile and keep the existing text when it fails.

if (opponentId.isNotBlank() && !opponentId.startsWith("XIN", ignoreCase = true) && !opponentId.isTransactionHashLike()) {
lifecycleScope.launch {
val user = walletViewModel.refreshUser(opponentId) ?: return@launch
if (checkDestroyed(fragment) || fromUserItem.tag !== snapshot || user.notMessengerUser()) return@launch

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wallet users with identity number 0 stay unclickable in the details. The transaction list already opens their profiles, and showUserBottom already routes them to the non-Messenger profile sheet. Remove this guard so the same counterparty can be opened from either screen.

val user = walletViewModel.refreshUser(opponentId) ?: return@launch
if (checkDestroyed(fragment) || fromUserItem.tag !== snapshot || user.notMessengerUser()) return@launch

fromUserItem.setContent(user)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A resolved user with a null fullName replaces the counterparty UUID with a label like null (12345678). The receiver widget interpolates the nullable name directly. Use the identity number or UUID as the label when the name is missing, and keep the row clickable.

@gaotic gaotic Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI review · Codex · 0cba413

The diff and XML checks passed, and an isolated Kotlin harness verified quiet lookup, cancellation, and the missing-name fallback. Android compilation, lint, and unit tests were blocked because Gradle could not resolve the Foojay plugin offline.

if (opponentId.isNotBlank() && !opponentId.startsWith("XIN", ignoreCase = true) && !opponentId.isTransactionHashLike()) {
lifecycleScope.launch {
val user = walletViewModel.refreshUser(opponentId, quiet = true) ?: return@launch
if (checkDestroyed(fragment) || fromUserItem.tag !== snapshot || user.notMessengerUser()) return@launch

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Transfer details still leave wallet-only counterparties unclickable. notMessengerUser() is true for identity number 0, so this guard exits before installing the click listener. The transaction list already opens these users’ profiles, and showUserBottom already routes them to the wallet-only profile sheet. Remove the guard so the same counterparty can be opened from details.

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