Commit Graph

600 Commits

Author SHA1 Message Date
Benoit Marty 679c6e4786 Merge pull request #7410 from element-hq/feat/global-search-screen
Feature: global search
2026-08-24 09:34:35 +02:00
Benoit Marty 1209d7e283 Move the test constants to the top of RootFlowNodeTest
Declaring them before the test class makes them easier to find.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 16:02:35 +02:00
Benoit Marty a6a09a8be0 Move FakeParentNode to the testutils module
The fake was declared in RootFlowNodeTest, so other tests could not use
it. Move it to the testutils module, in the node package, and make its
documentation generic.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 16:01:31 +02:00
Benoit Marty 8e4b2145d5 Move FakeNodeFactoriesBindings to the testutils module
The fake was declared in RootFlowNodeTest, so other tests could not use
it. Move it to the testutils module, in a new node package.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:56:39 +02:00
Benoit Marty e85c5041a4 Move NotUsedPresenter to the testutils module
The fake presenter was declared in RootFlowNodeTest, so other tests could
not use it. Move it to the testutils module, in a new presenter package,
along with MutablePresenter.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:51:30 +02:00
Benoit Marty d71f691d75 Move the session related classes to a session package
MatrixSessionCache and SyncOrchestrator were in the di package, which
does not describe what they do. Move them, along with their tests, to a
session package, and extract FakeSyncOrchestratorFactory from
RootFlowNodeTest so that other tests can use it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:41:30 +02:00
Benoit Marty be124610f0 Reuse the existing FakeOAuthActionFlow in RootFlowNodeTest
RootFlowNodeTest was declaring its own no-op fake, while the oauth test
module already provides one. Use it, and move it out of the customtab
package, since it is not specific to the custom tabs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:28:22 +02:00
Benoit Marty 5bdaea3f6e Move FakeAccountProviderAccessControl to the login test module
The fake was declared in RootFlowNodeTest, so other tests could not use
it. Move it next to the API it fakes, in a package mirroring the one of
the API, and let the result be provided by the caller, so that the case
where the account provider is not allowed can be tested too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:20:57 +02:00
Benoit Marty 67500edafa Move FakeCacheService to the preferences test module
The fake was declared in RootFlowNodeTest, so other tests could not use
it. Move it next to the API it fakes, and let the cleared cache event
flow be provided by the caller, so that a test can emit events.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:17:18 +02:00
Benoit Marty f0e575e25e Move the fake entry points of RootFlowNodeTest to the test modules
The fakes were declared in RootFlowNodeTest, so other tests could not use
them. Move each of them next to the API it fakes, following the existing
convention of a createNodeResult lambda defaulting to lambdaError():

- FakeLoginEntryPoint in features/login/test
- FakeBugReportEntryPoint in features/rageshake/test
- FakeSignedOutEntryPoint in features/signedout/test (new module)
- FakeAccountSelectEntryPoint in libraries/accountselect/test (new module)

The login and rageshake test modules did not have Appyx on their
classpath, so add the architecture module to their dependencies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:11:00 +02:00
Benoit Marty 8d4c7c868e Cleanup test 2026-08-20 14:21:53 +02:00
Benoit Marty d471241da8 Fix account provisioning deep link being ignored when it cold starts the app
At cold start two writers set the root nav target of RootFlowNode: the
intent path (handleIntent -> onLoginLink -> NotLoggedInFlow(params)) and
the first nav state emission (NotLoggedIn -> NotLoggedInFlow(null)).
safeRoot() only dedupes on strict equality, so the two targets do not
cancel each other out and the last writer wins, silently dropping the
login params.

Keep the params coming from the intent as pending state on the node, and
let the nav state observer take them into account, so that the root is
derived from both the logged in state and the pending login params, and
both orderings converge on the same target. The pending params are
cleared when leaving the not logged in flow, so that a later sign out
does not resurrect a stale provisioning link.

Also log when switching to the not logged in flow, since the drop was
silent. The login hint can contain an email address, so only its
presence is logged.

Closes #7482

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 13:58:03 +02:00
Jorge Martín 3ca5081f33 Integrate the new screen with the existing home screen, display it only when the search feature flag is enabled 2026-08-20 13:56:29 +02:00
hayyaksi 48f26ae33e Do not open the room again when the app is resumed from the recents list (#7436)
MainActivity is a singleTask activity that declares the elementx://open deep
link, so tapping a notification makes that deep link the base intent of the
task. When the user later brings the app back from the recents list, the
system replays that base intent with FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, the
resolver turns it into a navigation again and the user is pushed back into the
room they had already left.

Ignore any intent the system replayed from the history, the same way the
launcher intent is already ignored.
2026-08-20 09:31:25 +02:00
Jorge Martin Espinosa c31d7e6cce Don't restart the sync service if the client is shutting down (#7472)
* Don't restart the sync service if the client is shutting down

This was causing issues when clearing the cache:

1. The client would ask the SDK to clear the caches.
2. The SDK would stop the sync service, clear the caches and set the `pos` value of sliding sync to 0 so the HS returns all the required state the next time the client is used.
3. However, between the sync service being stopped with the `pos=0` change and the client being destroyed, there was enough time for the `SyncOrchestrator` to decide the sync service was stopped for no good reason since there is network connectivity and the app is on foreground, so it restarted the sync, with `pos=0`.
4. This value was persisted, and the next time the new client did an 'initial sync' it had a `pos != 0`, which the HS uses to avoid returning some required state it already fetched.
5. The room list now lacks state events for lots of rooms and room names, avatars, members, etc. are now missing.

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
2026-08-18 16:50:57 +00:00
Jorge Martin Espinosa 8b2c207728 Move the :libraries:wellknown logic into enterprise modules (#7429)
* Extract `IsEnterpriseBuild` use case

Having it inside `EnterpriseService` made having DI cycles with the `BuildMeta` provider too easy

* Rename `EnterpriseService.defaultHomeserverList()` to `homeserverAllowList()`

This seems more aligned with the way this list works

* Move most of the logic from `:libraries:wellknown` to `:enterprise:feature:enterprise`, both `shared` and `impl` modules

Ideally I would have added everything into `impl`, but some of the classes needed to be shared between the different `:enterprise:features` modules, and those are in the `shared` module, lacking a better name/strategy

* Add `EnterpriseService.isElementProEnforced`

With this, we don't need to provide the `RemoteEnterpriseConfig` anymore to any consumers, everything goes through `EnterpriseService` or other providers

* Remove `EnterpriseService.overriddenElementWellKnown`

This leaks the remote enterprise config/element well known contents to the app in a public interface.

* Create `CustomMapTilerConfigProvider` to avoid leaking the `RemoteEnterpriseConfig` in public APIs

This commit also starts moving some of the well-known related values to the enterprise modules

* Add missing docs to `EnterpriseService` and `SessionEnterpriseService`

* Fix tests

* Fix lint issues

* Bump enterprise module
2026-08-17 13:21:47 +00:00
Benoit Marty a740423343 Sync strings. 2026-08-17 11:34:52 +02:00
Jorge Martin Espinosa 22195a47f2 Move the custom tile server URL config to the Element wellknown content (#7416)
* Move the custom tile server URL config to the Element wellknown content

* Iteration: use whole `MapTilerConfig` in the remote config
2026-08-14 08:20:37 +02:00
ganfra c35a0a3864 Sync automatic call status with user status flag and server support 2026-08-06 11:09:49 +02:00
ganfra 5f4bb30b18 Address PR review comments 2026-07-09 17:22:15 +02:00
ganfra e92923a77d Prompt for local network permission on logged-in home 2026-07-08 17:11:27 +02:00
Benoit Marty c430877d87 Ensure Robolectric test are run using API 36 until the library support API 37. 2026-06-18 12:18:32 +02:00
ElementBot 0aaa80cbdc Sync Strings from Localazy (#6856)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-05-26 08:05:07 +00:00
Benoit Marty dc05388cca Update tests. 2026-05-20 10:53:50 +02:00
Benoit Marty 53fe12bdda "Mark as unread" navigate back to the room list.
#6398
2026-05-19 18:37:32 +02:00
Jorge Martin Espinosa 174a6cad0d Create a new room when inviting people in a DM (#6756)
* Create a new room when inviting people to a DM

* Improve screenshot tests

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-05-18 19:01:11 +02:00
ganfra e49e183178 Feature : share live location (#6741)
* First live location sharing sending implementation

* Simplify logic around canStop sharing

* Add some debug logs around LiveLocationSharingService

* Add LiveLocationException

* Expose beaconId to identify the current share

* Throttle live location instead of debouncing

* Keep sync alive when sharing live location

* Improve LiveLocation sharing

* Show LiveLocationDisclaimer

* Read minDistanceUpdate in LiveLocationSharingService

* Set minDistanceUpdate in AdvancedSettings

* Display banner in room when sharing live location

* Fix tests around LiveLocationSharing

* Ensure shares are properly restarted/stopped when app is re-launched

* Ensure LLS data is cleared when session is removed

* Update and fix LLS tests

* Handle Start LLS in ui

* Add check LLS permissions

* Remove hardcoded strings

* Fix quality and format

* Create DeviceLocationProvider so we can share location data between sources (presenter/live location service)

* Update screenshots

* Fix warning

* Do not try to stop if it was not sharing

* Revert "Create DeviceLocationProvider so we can share location data between sources (presenter/live location service)"

This reverts commit ba12bd968e82941cc231bdbb449310b24c97c5b8.

* Tweak location provider config values

* Address PR review remarks

* Fix ktlint

* Update screenshots

* Fix some tests after merging develop

* Adjust TimelineItemLocationView ui to match figma

* Update screenshots

* Documentation and cleanup

* Remove temporary resource

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Benoit Marty <benoitm@matrix.org>
2026-05-11 08:19:28 +00:00
Benoit Marty 4d0be69b4c In the module :libraries:matrix.api, change the dependencies to:
- libraries.sessionStorage.api
- projects.libraries.architecture
from `api` to `implementation`.

Modules who need `:libraries:matrix.api` do not necessarily need to use the session storage api.
2026-04-30 09:52:10 +02:00
Jorge Martin Espinosa 367995303d Rename OIDC components and variables to OAuth (#6686)
* Rename `OIDC` components and variables to `OAuth`. This matches the new behavior in the SDK.
2026-04-29 11:41:47 +02:00
ElementBot 9a2ad3928a Merge pull request #6658 from element-hq/sync-localazy
Sync Strings
2026-04-27 09:17:54 +02:00
Benoit Marty 4e5542396f Merge branch 'develop' into feature-oled-black 2026-04-17 14:47:15 +02:00
Benoit Marty a1c9994385 Settings UI update.
- Reorder items
- Minor UI update
- Improve the previews of the Composable
- Merge manage account and manage devices
- Add missing tests
2026-04-17 09:49:59 +02:00
Jorge Martin Espinosa 66513bc905 Take into account homeserver capabilities (#6507)
* Take into account homeserver capabilities: add `HomeserverCapabilitiesProvider` to check if the HS allows changing the user's display name or avatar. Also, modify the edit user profile screen to reflect these values.

* Add `/myavatar` command. Filter both `/nick` and `/myavatar` commands based on the homeserver capabilities.

* Update screenshots

* Assume the use can change their display name and avatar url if the capabilities check fails: if they try to change those, the HS will return an error anyway.

* Disable also `/myroomname` and `/myroomavatar` based on the HS capabilities.

---------

Co-authored-by: ElementBot <android@element.io>
2026-04-15 12:29:41 +00:00
Timur Gilfanov f7cfa6cda8 Merge branch 'develop' into feature-oled-black 2026-04-14 10:13:46 +04:00
Benoit Marty 8c5caabed4 Sign in with Classic 2026-04-13 11:16:05 +02:00
bmarty 23c1112dcf Sync Strings from Localazy 2026-04-13 00:48:40 +00:00
Benoit Marty 5c5a5ad7fc Fix tests 2026-04-09 09:32:52 +02:00
Benoit Marty ef97d135cc Move AppErrorView to the api module so that :appnav:root does not have to depend on a impl module. 2026-04-08 17:32:21 +02:00
Timur Gilfanov f19295d63d Merge branch 'develop' into feature-oled-black 2026-04-05 12:06:20 +04:00
Timur Gilfanov 5e6a6af409 Add "Allow black theme" feature flag 2026-04-05 12:03:50 +04:00
Benoit Marty 4ad495d36c Add support for slash commands (under Feature Flag) (#6482)
* Add support for slash commands

* Update screenshots

* Rename module `slash` to `slashcommands`

* Rename `SlashCommand` to `SlashCommandService`

* Introduce MsgType in order to send text message with a different msgtype value.

* Format file and add parameter names, add default values and cleanup

* Add isSupported parameter to filter out unsupported yet commands.

* Slash commands: disable suggestions if the feature is disabled.

* Fix sending shrug command.

* Add missing test on SuggestionsProcessor

* Add tests on MessageComposerPresenter about slash command.

* Fix import ordering

* Add missing tests on CommandExecutor

* Add missing tests in MarkdownTextEditorStateTest

* Slash commands: Improve code when sending message with prefix.

* Slash commands: Add support for /unflip

---------

Co-authored-by: ElementBot <android@element.io>
2026-04-02 16:15:32 +02:00
Benoit Marty c97bf08008 Rename our classes too. 2026-03-04 17:41:44 +01:00
Jorge Martin Espinosa ae6ea76794 Use ShareIntentHandler early to avoid distributing the whole intent (#6274)
* Use `ShareIntentHandler` early to avoid distributing the whole intent

This would make the intent be serialized as part of `NavTarget` and could potentially lead to `TransactionTooLargeException`s.

We now pass a new `ShareIntentData` class around, containing the minimum amount of data needed. We also have a new `OnSharedData` post-processor to revoke uri access after they've been shared.

* Move `UriToShare` next to `ShareIntentData` and add docs
2026-03-03 13:12:33 +00:00
Jorge Martin Espinosa dfde64b466 Remove runBlocking call to restore sessions when the app starts (#6193)
* Remove `runBlocking` call to restore sessions when the app starts

Sadly, to do this we need to manually handle restoring the state from Appyx using internal values. At least it doesn't seem like they're going to change any time soon (or ever).

This should take care of a few ANRs, although it may make loading the initial state a bit slower

* Add `ReplaceAllOperation` for state restoration

* Add warning comment for Appyx dependency
2026-02-24 09:51:43 +00:00
Jorge Martin Espinosa b23e2a84f9 Limit the max number of opened rooms in the backstack (#6215)
* Limit the max number of opened rooms in the backstack

This should help with the `TransactionTooLargeExceptions` we were seeing, since every one of these nodes and their sub-nodes would be saved to the instance state.

Also, make sure we use `LoggedInFlowNode.attachRoom` as much as possible to ensure this check is used
2026-02-18 08:34:25 +01:00
ganfra 386be21988 Use fade animation when replacing Placeholder 2026-02-17 12:23:35 +01:00
Benoit Marty f93dfbdae4 Remove NavigationState.Space.
We do not have the concept of current space.
2026-02-11 20:41:55 +01:00
ganfra babaa7351f Add tests and clean code after RoomList Filter rework 2026-01-30 15:33:51 +01:00
Jorge Martin Espinosa 6a9d084a50 Add an empty state for the space screen if the user can modify its graph (#6064)
* Add an empty state for the space screen if the user can modify its graph. It adds a new 'create room' button that allows you to open the create room screen with some preset values.

* When computing the editable spaces in `ConfigureRoomPresenter`, also set up the initial selected parent space if possible

* Use `Builder` pattern for `CreateRoomEntryPoint`

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-01-27 11:12:12 +01:00
Jorge Martin Espinosa 7d731e192a Try fixing performance metrics (#6046)
We've detected outliers in the `Up-to-date room list` and `Open a room` transactions in Sentry.

This commit tries to make sure we're starting/stopping the long running transactions when needed.
2026-01-26 15:41:58 +01:00