Repository navigation
feat(routing): open the profile until a DM exists - #1694
Merged
bmc08gt merged 4 commits intoOct 7, 2026
Merged
Conversation
bmc08gt
added this pull request to stack #1696
October 7, 2026 01:28
This was referenced Oct 7, 2026
bmc08gt
force-pushed
the
feat/profile-refresh-routing
branch
from
October 7, 2026 01:51
581a5c5 to
b377708
Compare
bmc08gt
force-pushed
the
feat/profile-refresh-routing
branch
2 times, most recently
from
October 7, 2026 02:19
e1f4af1 to
e78b89e
Compare
bmc08gt
force-pushed
the
feat/profile-refresh-routing
branch
from
October 7, 2026 02:40
e78b89e to
133c2c1
Compare
Scanning a profile card now always opens the profile after a 750ms hold, matching iOS. Username search and transaction details resolve through DmDestinationResolver: the DM when its chat has members and the person isn't blocked, the profile otherwise. Transaction details labels the button View Profile or View in Chat accordingly. Profile routes carry a ProfileOrigin (Link, Scan, UsernameLookup, Transaction); a block pops back for link and transaction, and resets to the chat list for scan and search.
startChattingFee already falls back to the regional default, so a null fee only means the presets have not loaded yet. The profile's pinned button now waits for it instead of pushing the chat's keypad, and the OpenSendCash fallback and its Start Chatting label are gone.
The conversation no longer takes the fee that opens a tip DM; the profile does. Drops ChatViewModel's init-payment flow (fee state, minimum-amount hint, OnInitPaymentConfirmed, the ChatInitPayment step), the open-with-Send-Cash hand-off and the openSendCash route flag. A saved Chat route that still carries a ByUser identifier opens the profile instead of a gated chat. Sends from the conversation are all plain cash sends. The profile-card deeplink Maestro flow now waits on the profile rather than chat_screen.
ChatViewModel never receives ChatIdentifier.ByUser now that the app redirects it to the profile, so its three branches become an error. TipChat carries a ChatId, since the router only ever builds it from one. Adds tests for the typing gate (tip DM open, contact DM waits for Cash), the transaction details counterpart action following DmDestinationResolver, the username lookup's two destinations, and ProfileOrigin.resetsToChatsAfterBlock. FindByUsernameViewModel takes a DispatcherProvider so its events are testable. Removes the tip-minimum strings this branch orphaned, and fixes a stale comment and the tip_deeplink entry in the Maestro README.
bmc08gt
force-pushed
the
feat/profile-refresh-routing
branch
from
October 7, 2026 03:04
133c2c1 to
6aebb4a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth slice of the profile refresh, matching code-payments/code-ios-app#989: every way of reaching a person opens their profile until a DM with them exists, and the conversation screen no longer gates the first message on a payment. Paying to start a chat now happens only from the profile (#1692). Stacked on #1693.
Where each entry goes
DmDestinationResolver(shared/blocklist) returns the DM when the person's generated chat id has members and they aren't blocked, and the profile otherwise. Blocked is checked first, the same ruleChatProfileViewModeluses, because a block hides the DM without removing its members.After a block
ProfileOriginvalues:Link,Scan,UsernameLookupandTransaction. Blocking from a profile opened by scan or username search resets to the chat list; from a link or transaction details it pops back one screen, as on iOS.Paid-DM gate removed from the conversation
ChatViewModelloses the fee state, the minimum-amount hint,OnInitPaymentConfirmedand the tip-vs-send switch.ChatStep.InitPayment,SendCashOnOpen/StartSendCashOnceReadyand theopenSendCashroute flag are deleted.StartChattingPayerfrom the profile.DeeplinkType.TipChattakes aChatId, so nothing can build a by-user chat route any more. A savedChat(ByUser)back stack entry opens the profile instead;ChatIdentifier.ByUserstays only so an old saved route still decodes.Unknown fee
startChattingFeefalls back to the regional default and both of its inputs start with a value, so a missing fee only means it is still loading.Tests
DmDestinationResolverTest,TransactionDetailsViewModelTest,FindByUsernameViewModelTest,ProfileOriginTest,ChatTypingGateTest.ChatOpenTranscriptTestnow opens by chat id.ChatSendFailureAnalyticsTestexpects "Sent Cash" for a send inside a tip DM. Tests for the removed gate (ChatInitFeeReducerTest,StartSendCashOnceReadyTest) are deleted.maestro/tip_deeplink.yamlnow waits for the profile instead of the chat screen.