Skip to content

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Sep 4, 2025

Content

Add ability to connect to several accounts at the same time. The feature is behind a feature flag.

Warning: the feature must be considered as unstable, and the core team will not have time to fix reported issues right now. In particular, some session verification issue have been observed and not investigated yet.

What is working:

  • connect to several accounts
  • switch between accounts, from the setting menu or by swiping vertically on the user avatar at top left.
  • receive push for any account and let the notification click navigate to the correct account/room/event
  • if several accounts are connected, display an account select screen for:
    • incoming share (sharing content from other apps to EX)
    • permalink click from any other application (matrix.to link)
  • login link when an account is already login in will also let the user login to another account (with the info in the link)
  • disconnect to any account

Motivation and context

Partially implements #190

Screenshots / GIFs

Tests

  • Log in to a first account
  • Enable the feature flag Multi accounts in the developer settings
  • A new menu in the setting will allow to add another account

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@bmarty bmarty added PR-Wip For anything that isn't ready to ship and will be enabled at a later date Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. labels Sep 4, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Sep 4, 2025
Copy link
Contributor

github-actions bot commented Sep 4, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/UqrEQF

@bmarty bmarty force-pushed the feature/bma/_poc/multiAccounts3 branch from 137d98b to cea6001 Compare September 5, 2025 12:06
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 89.21569% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.37%. Comparing base (0b4b63a) to head (e409630).

Files with missing lines Patch % Lines
...atrix/impl/auth/RustMatrixAuthenticationService.kt 0.00% 13 Missing ⚠️
...id/features/home/impl/components/RoomListTopBar.kt 77.77% 1 Missing and 7 partials ⚠️
...tures/preferences/impl/root/PreferencesRootView.kt 82.60% 1 Missing and 3 partials ⚠️
...es/login/impl/screens/onboarding/OnBoardingView.kt 95.16% 1 Missing and 2 partials ⚠️
.../libraries/accountselect/impl/AccountSelectView.kt 91.17% 1 Missing and 2 partials ⚠️
...io/element/android/appnav/store/SessionStoreExt.kt 0.00% 1 Missing ⚠️
...o/element/android/features/home/impl/HomeEvents.kt 0.00% 1 Missing ⚠️
...lement/android/features/home/impl/HomePresenter.kt 92.30% 1 Missing ⚠️
.../io/element/android/features/home/impl/HomeView.kt 66.66% 1 Missing ⚠️
...t/android/features/login/impl/login/LoginHelper.kt 50.00% 0 Missing and 1 partial ⚠️
... and 8 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5285      +/-   ##
===========================================
- Coverage    80.38%   80.37%   -0.01%     
===========================================
  Files         2275     2282       +7     
  Lines        62860    63212     +352     
  Branches      7863     7904      +41     
===========================================
+ Hits         50527    50809     +282     
- Misses        9431     9481      +50     
- Partials      2902     2922      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Sep 5, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Sep 5, 2025
@bmarty bmarty changed the title Multi accounts - WIP Multi accounts - Unstable Sep 5, 2025
@bmarty bmarty changed the title Multi accounts - Unstable Multi accounts - experimental first implementation Sep 5, 2025
@bmarty bmarty marked this pull request as ready for review September 5, 2025 15:46
@bmarty bmarty requested a review from a team as a code owner September 5, 2025 15:46
@bmarty bmarty requested review from ganfra and removed request for a team September 5, 2025 15:46
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Sep 5, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Sep 5, 2025
ShadowRZ

This comment was marked as off-topic.

@bmarty
Copy link
Member Author

bmarty commented Sep 8, 2025

It seems like viewing internal logs broke with this PR applied, not sure why

It seems to come from #5253 and is also impacting develop. I will fix.

@bmarty bmarty mentioned this pull request Sep 8, 2025
9 tasks
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Nice work!
Some remarks on first look, I'll also test it tomorrow.

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Wip For anything that isn't ready to ship and will be enabled at a later date
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants