Skip to content

feat(messenger): add a Message shortcut to a member's profile - #1534

Merged
bmc08gt merged 2 commits into
code/cashfrom
feat/profile-message-cta
Sep 23, 2026
Merged

bmc08gt merged 2 commits into
code/cashfrom
feat/profile-message-cta

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

A group member's profile had no direct way to reach that person. ChatProfileScreen's header now has a round Message shortcut under the join date, above the Report and Block rows. It pushes AppRoute.Messaging.Chat(ChatIdentifier.ByUser(...)), the same route "View in Chat" uses from transaction details. It goes through LocalCodeNavigator, like the Report row, so the DM opens as a top-level route over the group chat.

Send Cash, held back

A second Send Cash shortcut is built but commented out in ProfileShortcuts. Everything behind it stays wired so it can come back by uncommenting:

  • AppRoute.Messaging.Chat.openSendCash opens the DM with send cash started: the fee sheet if this payment creates the DM, the keypad if it already exists.
  • OnSendCash drops the event while participant is null. It also falls back to the keypad before the opening fee loads. So the chat can't dispatch it on first composition the way openKeyboard does. ChatViewModel.State.sendCashReady becomes true once the participant is set and the chat's existence and fee agree: it exists with no fee, or it doesn't exist and the fee has resolved.
  • StartSendCashOnceReady dispatches once on that edge, behind a rememberSaveable flag, so rotation or returning from the payment step doesn't fire it again.
  • isChatInitialized now reads from a nullable chatExistence flow, to tell "not answered yet" apart from "no DM".
  • The 22sp condensed symbol size in SendCashButton is now CondensedSymbolFontSize, for the shortcut to share.

Visibility

profileShortcutRecipient returns the TipUser to message, or null to hide the shortcut:

  • hidden when the chat is a TIP_DM, because a DM's profile is the other person in it, so the shortcut would only reopen that chat
  • hidden on the viewer's own profile (userManager.accountId)
  • hidden for anyone who isn't a TipUser, since ByUser needs a user id

Blocked users aren't checked.

Layout

  • 45dp circle filled with surfaceVariant, holding a 20dp white Material Symbols chat_bubble (filled).
  • The label is textSmall in textSecondary, 5dp below the circle, in a 100dp column.
  • The shortcut sits 25dp below the join date and 25dp above the first row's text. The first menu row already has a 25dp inset, so the header drops its bottom padding when the shortcut shows.
  • The empty mute line above would otherwise add about 28dp. ChatMuteStatusChip now takes reserveSpace, which is off when the shortcut shows. That only happens on a group member's profile, which has no Mute row to change it while the screen is open.

Tests

  • ProfileShortcutRecipientTest: the visibility rule.
  • ChatViewModelStateTest: isSendCashReady across participant, existence and fee.
  • StartSendCashOnceReadyTest: waits for ready, fires once, and doesn't refire after recreation.
  • ChatIdentityScreenshotTest: the header with the shortcut.

A group member's profile had no way to reach that person directly. The
header now carries two round shortcuts under the join date: Message opens
the DM, and Send Cash opens the DM with send cash already started.

Send Cash sets a new AppRoute.Messaging.Chat.openSendCash flag. The chat
dispatches OnSendCash once, after the participant is set and the opening
fee is settled, because the handler drops the event without a participant
and falls back to the keypad before the fee loads. A saved flag keeps it
from firing again on rotation or on return from the payment step.

The shortcuts are hidden on a tip DM's profile, where they would reopen
the chat behind it, and on the viewer's own profile.
@bmc08gt bmc08gt self-assigned this Sep 23, 2026
@github-actions github-actions Bot added the type: feature New functionality label Sep 23, 2026
Send Cash is held back for now. Its button is commented out in
ProfileShortcuts; the openSendCash route flag and the once-ready dispatch
behind it stay wired.

Message now sits 25dp below the join date and 25dp above the first row's
text. The first menu row already has a 25dp inset, so the header drops its
bottom padding when the shortcut shows. Above, the mute line no longer
holds its empty height: ChatMuteStatusChip takes reserveSpace, off when the
shortcuts show. That only happens on a group member's profile, which has
no Mute row to change it while open.
@bmc08gt bmc08gt changed the title feat(messenger): add Message and Send Cash to a member's profile feat(messenger): add a Message shortcut to a member's profile Sep 23, 2026
@bmc08gt
bmc08gt merged commit 5e05b41 into code/cash Sep 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant