Commit graph

563 commits

Author SHA1 Message Date
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
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
Benoit Marty
54e08f3447 CrashDetectionEvents -> CrashDetectionEvent 2026-01-19 18:19:20 +01:00
Benoit Marty
7a366a0c88 RageshakeDetectionEvents -> RageshakeDetectionEvent 2026-01-19 18:17:58 +01:00
Jorge Martin Espinosa
6d1ed5967b
Create spaces (#5982)
* Allow creating a space with `CreateRoomParameters`

* Add 'Create space' menu item in the spaces home screen. Also, imports new strings related to spaces.

* Link the 'Create space' button with the screen to create the space

* Unify room access and visibility for `ConfigureRoom`, use the updated design

* Fix `EditRoomDetails` avatar size (68dp)

* Replace `EditableAvatarView` and `UnsavedAvatar` copmonents with `AvatarPickerView`

* `AvatarDataFetcherFactory`: Make sure we use a fallback image fetcher when the URL is not an MXC one (a local one, i.e.). This removes the previous need for a separate `UnsavedAvatarView`

* Use `AvatarPickerView` in all the screens where `EditableAvatarView` was used

* Improve naming and previews

* Update strings, remove unused ones for `RoomAccessItem`

* Make `isSpace` part of the `CreateRoomConfig`

* Ensure the content fits in the screenshots for `AvatarPickerSizesPreview`

* Add `AvatarDataFetcherFactoryTest`

* Add new feature flag for creating spaces

* Fix ripple being too large for the `Pick` state

* Tweak margins and section titles a bit

* Add preview for `HomeTopBar` with the spaces case

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-01-13 14:35:49 +01:00
Jorge Martin Espinosa
983c012b79
When handling incoming share, reuse existing room screen if possible (#6001) 2026-01-13 13:39:46 +01:00
Jorge Martin Espinosa
06c4b9488b
Adjust metrics to the new specifications (#5937)
* Add `AnalyticsTransactions` with a set of `TransactionDefinition` items matching those in the user story

* Use that for `AnalyticsLongRunningTransactions`, make sure we send the right fields (name, operation, description)

* Add `AnalyticsSendMessageWatcher` to track how long it takes for an event to be sent and for us to get a call back for that from sync

* Add `Noop` implementation for enterprise
2026-01-05 16:23:26 +01:00
Benoit Marty
3ea10c2c62
Merge pull request #5909 from element-hq/feature/bma/qrCodeLogin
Link new device using QrCode - First version
2025-12-18 16:08:21 +01:00
Jorge Martín
fe9224b807 Distinguish between indexable and non-indexable extra data 2025-12-18 14:08:38 +01:00
Jorge Martín
fa8d7b73c7 Fix tests 2025-12-18 14:08:38 +01:00
Jorge Martín
8d0cc3fd41 Add AnalyticsUserData, with keys for several extras we want to upload to Sentry.
Add the `HOMESERVER` extra, with a hashed homeserver value. This is only so we can identify devices using a problematic HS (like matrix.org under heavy load).
2025-12-18 14:08:38 +01:00
Benoit Marty
a073117d62 Link new device using QrCode. 2025-12-16 16:14:04 +01:00
ElementBot
ad881c303a
Sync Strings from Localazy (#5904)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-12-15 23:51:19 +01:00
Jorge Martin Espinosa
aa061f8ef3
Fix crash when calling Room.predecessorRoom when the room is destroyed (#5894)
* Fix crash when calling `Client.predecessorRoom` when the room is destroyed

* Handle the root cause of this crash: destroying the room on activity recreation
2025-12-15 10:25:08 +01:00
Jorge Martin Espinosa
2e2d68ba83
Load JoinedRoom in home screen, pass it to the room flow (#5817)
* Load `JoinedRoom` in `HomeFlowNode.navigateToRoom`, then pass it to the next navigation nodes

* Add delayed loading indicator for cases when loading the room takes too long

* Avoid an extra FFI call in `RustRoomFactory`.

Use `RoomInfo.membership` instead.

Also use `computation` dispatcher, since it should reduce the delay when switching contexts.

* Remove the dispatcher usage when loading the room in `HomeFlowNode`, we immediately call a method that changes the dispatcher used

* Make sure only a single room is opened at a time
2025-12-02 15:22:55 +00:00
Jorge Martín
1c576fd42d Add AnalyticsService.cancelLongRunningTransaction and AnalyticsService.finishLongRunningTransaction 2025-11-28 14:15:54 +01:00
Jorge Martín
1d77aa447d Extract from_notification extra to a constant in IntentNavigationExtras
Allow `IntentProvider` to receive extras and `PendingIntentFactory` to send them.
2025-11-28 14:15:54 +01:00
Jorge Martín
04feea5d25 Move analytic watchers to :services:analytics 2025-11-28 14:15:54 +01:00
Jorge Martín
055b9f67a0 Add tests for DefaultAnalyticsColdStartWatcher 2025-11-28 14:15:54 +01:00
Jorge Martín
4b3796844f Add transaction trees for opening a room so we can have a nice trace view 2025-11-28 14:15:54 +01:00
Jorge Martín
10b31e3e72 Add OpenRoom long running analytic transaction 2025-11-28 14:15:54 +01:00
Jorge Martín
daf7bea39e Add another performance check for cold start time until the cached room list is displayed 2025-11-28 14:15:54 +01:00
Jorge Martín
e1bd189ba0 Add a performance check for notification tap -> populated timeline time 2025-11-28 14:15:54 +01:00
Jorge Martín
8815fe7986 Add a 'warm' room list performance check:
We want to measure how long it takes the SDK to update the room list when the app comes back from being in background.

Note we don't want to check this in cold starts, only warm ones.
2025-11-28 14:15:54 +01:00
Benoit Marty
e475a969d7 Fix crash when clicking fast on back key on the Add account screen. 2025-11-21 15:51:11 +01:00
Benoit Marty
edf994f843 Fix navigation issue once incoming share is handled 2025-11-19 23:05:49 +01:00
Jorge Martin Espinosa
f78c80803b
Add some performance metrics for Sentry (#5760)
- Add `AnalyticsService.startTransaction(...)` to start a logging transaction that can be uploaded to Sentry if the user enabled the analytics upload.
- Add `AnalyticsTransaction` wrapper to abstract the Sentry ones.
- Added several helper methods to improve the UX around these transactions.
- Then measure:
  - Time until the first sync, and how it ended.
  - Time until the first rooms are displayed.
  - Time to load a room or a preview.
  - Time to load a timeline.
2025-11-19 11:42:55 +00:00
Benoit Marty
310848ee38
Merge pull request #5722 from element-hq/feature/bma/moduleCleanup
Module cleanup
2025-11-18 16:14:10 +01:00
Benoit Marty
d3339872ff Ensure that disabling (resp. enabling) notification unregisters (resp. registers) the pusher 2025-11-13 17:50:21 +01:00
Benoit Marty
8285478688 API modules do not need to setup dependency injection.
Move the implementation to the impl modules.
2025-11-12 19:05:39 +01:00
Benoit Marty
573767aca1 Let notifications use avatar fallback.
Extract code which handles Matrix image to its own api / impl / test modules.
2025-11-12 11:28:42 +01:00
Benoit Marty
eb31505dc7 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
f86431e663 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
c4e0370f41 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty
7ad9c8f687 Rename handleEvents to handleEvent 2025-11-07 12:21:43 +01:00
ganfra
bd14e74080
Merge pull request #5668 from element-hq/feature/fga/space_settings
Space : prepare Space Settings screen
2025-11-05 16:18:09 +01:00
Benoit Marty
785ae3c1ad Session database: use the new count API. 2025-11-04 15:30:29 +01:00
Benoit Marty
32b1856dbd
Merge pull request #5669 from element-hq/fix/forward-events-from-pinned-media-timeline
Fix forward events from media viewer from pinned media timeline
2025-11-04 09:52:01 +01:00
Benoit Marty
44f2b2f6df Code cleanup 2025-11-03 15:53:31 +01:00