Skip to content

feat: Start/Open one to one conversation with apps (WPB-25307)#4838

Open
alexandreferris wants to merge 4 commits into
developfrom
feat/start_one_to_one_conversation_with_apps
Open

feat: Start/Open one to one conversation with apps (WPB-25307)#4838
alexandreferris wants to merge 4 commits into
developfrom
feat/start_one_to_one_conversation_with_apps

Conversation

@alexandreferris
Copy link
Copy Markdown
Member

@alexandreferris alexandreferris commented May 19, 2026

https://wearezeta.atlassian.net/browse/WPB-25307


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  • There were some flows which were still opening the old User Profile screen rather than the Service Details screen when clicking/tapping on an App/old bot
  • Not being able to start/open a 1:1 conversation with an App (old bots were excluded from this new feature)

Causes (Optional)

Not implemented and left over from previous implementations (left out due to v4.25 release focus)

Solutions

Now everywhere an App (or old bot) is visible to be clicked, it will open Service Details screen (and decide if shows the open/start 1:1 conversation buttons)

  • New conversation flow -> Apps tab -> select and App/old bot -> Service Details screen
  • Conversation screen -> App/old bot message -> Service Details screen
  • App/old bot 1:1 Conversation screen -> tap on topbar -> Service Details screen

Previous existing flows to open Service Details screen remains the same and shows the Add/Remove from group conversation buttons.

For the new flows (as it doesn't have a specific group conversation), it will decide to show or not the open/create 1:1 conversation based on:

  • new Apps -> Apps feature flag enabled/disabled
  • old bots -> hidden

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Proteus Team + old bots

  • New conversation flow -> Apps tab -> select an old bot -> Service Details screen (with all buttons hidden)
  • 1:1 conversation with old bot -> topbar click -> Service Details screen (with all buttons hidden)
  • group conversation -> old bot message -> avatar click -> Service Details screen (with all buttons hidden)
  • group conversation -> participants -> select an old bot -> Service Details screen (only show add/remove from conversation buttons if SelfUser is an admin of the group conversation)
  • group conversation -> participants -> add participant -> Apps tab -> select an old bot -> Service Details screen (only show add/remove from conversation buttons if SelfUser is an admin of the group conversation)

MLS Team + Apps feature flag enabled

  • New conversation flow -> Apps tab -> select an App -> Service Details screen (start/open 1:1 conversation)
  • 1:1 conversation with an App -> topbar click -> Service Details screen (start/open 1:1 conversation - copied from other platforms/clients)
  • group conversation -> App message -> avatar click -> Service Details screen (start/open 1:1 conversation)
  • group conversation -> participants -> select an App -> Service Details screen (only show add/remove from conversation buttons if SelfUser is an admin of the group conversation)
  • group conversation -> participants -> add participant -> Apps tab -> select an App -> Service Details screen (only show add/remove from conversation buttons if SelfUser is an admin of the group conversation)

For when Apps feature flag is DISABLED, buttons will be hidden but details of the App will still be visible

Attachments (Optional)

Old bot from Group conversation

old_bot_from_group_conversation

Old bot from new conversation flow / message in group

old_bot_no_conversation

App from group conversation

new_app_from_group_conversation

App with feature flag enabled

new_app_feature_flag_enabled

App with feature flag disabled

new_app_feature_flag_disabled

- Route Apps and old Bots from conversation messages and one2one conversations to ServiceDetailsScreen
- Carry typed sender identity through message mapping and markdown mentions to distinguish users, new Apps and old bots
- Open service details from new-conversation search results, switching between app and bot IDs based on apps availability
- Show Start/Open Conversation actions for app service details when apps are enabled and no group context is present
- Add service-details logic to detect existing one-to-one app conversations and reuse or create them on demand

Signed-off-by: alexandreferris <ferris.alexandre@gmail.com>
- Add tests for ServiceDetailsViewModel
- Adjust existing tests to add senderId(MessageSenderId)

Signed-off-by: alexandreferris <ferris.alexandre@gmail.com>
- Adjust base mocks for OneToOneConversations in withMockConversationDetailsOneOnOne

Signed-off-by: alexandreferris <ferris.alexandre@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 83.87097% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.29%. Comparing base (ee482be) to head (dc86a3b).
⚠️ Report is 21 commits behind head on develop.

Files with missing lines Patch % Lines
...in/kotlin/com/wire/android/mapper/MessageMapper.kt 40.00% 0 Missing and 3 partials ⚠️
...conversations/messages/item/MessageClickActions.kt 0.00% 2 Missing ⚠️
...e/android/ui/home/conversations/model/UIMessage.kt 60.00% 2 Missing ⚠️
...otlin/com/wire/android/ui/markdown/MarkdownText.kt 0.00% 1 Missing ⚠️
...in/kotlin/com/wire/android/ui/markdown/NodeData.kt 0.00% 1 Missing ⚠️
.../ui/userprofile/service/ServiceDetailsViewModel.kt 97.05% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4838      +/-   ##
===========================================
+ Coverage    51.12%   51.29%   +0.17%     
===========================================
  Files          610      611       +1     
  Lines        21093    21198     +105     
  Branches      3399     3409      +10     
===========================================
+ Hits         10783    10873      +90     
- Misses        9295     9308      +13     
- Partials      1015     1017       +2     
Files with missing lines Coverage Δ
...me/conversations/info/ConversationInfoViewModel.kt 80.24% <100.00%> (+0.50%) ⬆️
...me/conversations/info/ConversationInfoViewState.kt 94.11% <100.00%> (+0.36%) ⬆️
...ndroid/ui/home/conversations/model/MessageTypes.kt 14.28% <ø> (ø)
...i/home/newconversation/NewConversationViewModel.kt 68.63% <100.00%> (+0.56%) ⬆️
...e/newconversation/groupOptions/GroupOptionState.kt 100.00% <100.00%> (ø)
...erprofile/service/ServiceDetailsInfoMessageType.kt 100.00% <100.00%> (ø)
...id/ui/userprofile/service/ServiceDetailsNavArgs.kt 0.00% <ø> (ø)
...roid/ui/userprofile/service/ServiceDetailsState.kt 100.00% <100.00%> (ø)
...otlin/com/wire/android/ui/markdown/MarkdownText.kt 0.00% <0.00%> (ø)
...in/kotlin/com/wire/android/ui/markdown/NodeData.kt 22.72% <0.00%> (ø)
... and 4 more

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee482be...dc86a3b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Remove TODO and update `BackStackMode` to `.UPDATE_EXISTED`

Signed-off-by: alexandreferris <ferris.alexandre@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant