Commit Graph

6442 Commits

Author SHA1 Message Date
Jorge Martín 3a946475f7 Fix search results never displaying an empty state
Use the pagination state to understand when a search finished with no results
2026-08-21 12:37:47 +02:00
Jorge Martín 9a2d23c8a1 Remove unnecessary GlobalSearchPresenter.Factory 2026-08-21 12:07:38 +02:00
Jorge Martín 8bdce7cfd6 Add tests 2026-08-20 14:18:06 +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
Jorge Martín be2909bca2 Add a global search screen, which reads from both the RoomListSearchDataSource for the rooms search and MessageSearchService for the message search
Note the designs and texts of this screen are temporary.
2026-08-20 13:55:45 +02:00
Jorge Martin Espinosa f2883ef9df Fix flaky test in DefaultVoiceMessageComposerPresenterTest (#7487) 2026-08-20 11:49:59 +02:00
hayyaksi 2525019ca1 Show the right image when opening one that has not finished sending (#7359)
* Show the right image when opening one that has not finished sending

* Reuse the timeline media gallery for events that have no event id
2026-08-20 11:16:13 +02:00
hayyaksi 918015b8bb Stop waiting for a room alias that the remote server never resolves (#7446)
Tapping a room alias whose server is down left the resolver screen on a
spinner for as long as the screen stayed open, with no way forward other
than going back.

Bound the resolution with the ten second timeout already used when
joining a room by address, so the retry dialog is shown instead. The fake
client's resolve lambda becomes suspending so a server that never answers
can be simulated.
2026-08-20 09:34:15 +02:00
Benoit Marty 1c94e89ee8 Merge pull request #7394 from element-hq/feature/account-provider-selection
Simplify choosing the account provider during sign in, with autocomplete of previously used ones
2026-08-19 17:06:47 +02:00
hayyaksi 7341feeed8 Model the fake voice recorder on a cancellable recording job (#7466)
* Model the fake voice recorder on a cancellable recording job

FakeVoiceRecorder pushed a whole recording synchronously from a single
suspending call, which made it both weaker and stricter than
DefaultVoiceRecorder.

Every level emission carried the same elapsed time and the emissions were
coalesced by Molecule, so no intermediate recording state was observable and
the level-limit test had to skip half the emissions to compensate. Each level
now advances the test time source and suspends for its share of the recording
duration, so the states arrive one at a time and that magic number is gone.

Call verification moved to the constructor lambdas the rest of the repo uses,
in place of hand-rolled counters and assertCalls. The counters discarded the
argument, so nothing pinned that cancelling a recording stops it with
cancelled = true; that is now asserted. Truth is no longer needed by the
fixture module.

A second startRecord() no longer raises an error where production only warns
and returns, and stopping or deleting terminates an in-flight emission loop
the way cancelling the real recording job does, so a stale recording state can
no longer arrive after the recording has finished.

* Keep each recording's level loop to its own recording

The level loop checked a single isRecording flag, which cannot tell "this
recording was cancelled" from "a later recording has started". After a cancel
followed by a new start, the first loop resumed, saw the flag set again, and
advanced the shared test time source, so the new recording reported the elapsed
time of both. Each recording now carries an id and its loop stops as soon as
that id is no longer the active one.
2026-08-19 13:44:11 +02:00
hayyaksi 6bd841d838 Close the invite screen once the invite has been declined (#7440)
Declining an invite from the full screen invite left the user on that
same screen, so they had to press back themselves to get to the room
list. Both decline paths are affected: the plain decline handled by
AcceptDeclineInviteView, and the decline and block sub screen, which
navigated up into the join room flow instead of out of it.

Navigate up from the join room flow on a successful decline, and give
DeclineInviteAndBlockEntryPoint a callback so the sub screen can report
a successful decline separately from a back press. The room list flow
supplies the same callback, popping the sub screen once the invite has
been declined.
2026-08-19 12:52:11 +02:00
hayyaksi ee1348e19e Give the room name in the timeline top bar a 48dp tap target (#7450)
* Give the room name in the timeline top bar a 48dp tap target

The row carrying the room avatar and name is the control that opens the
room details, but it is only as tall as its content, which is under the
48dp minimum recommended for a touch target. Constrain it to a minimum
height of 48dp. The children stay centred inside the app bar, so nothing
moves visually.

* Update screenshots

The accessibility snapshot of the timeline is the only one the change
affects: the node which opens the room details now reports a 48dp tall
bounding box. The room name, the avatar and the icons stay where they
were.
2026-08-19 12:29:24 +02:00
Jorge Martin Espinosa a1e86ad499 Use the right base URL for the ESS config/well known endpoints (#7469)
* Rename `UrlContentFetcher` to `ClientUrlContentFetcher` and add missing base URL data (server name, homeserver URL)

* Avoid passing the `homeserverUrl/serverName` around.

Calculate the URL in `DefaultRemoteEnterpriseConfigRetriever` using the newly added `homserver` and `server` values as the possible base URLs, depending on the remote config source

* Make sure we don't perform blocking requests to fetch the remote config when restoring a session

Add a `needsRefresh` parameter to `RemoteEnterpriseConfigResult.NotFound` to handle this, and store a `no-config` value in the store to indicate an endpoint has been checked and no config was found

* Bump enterprise module
2026-08-19 09:24:22 +02:00
Jenna Vassar 891c077786 Merge remote-tracking branch 'origin/develop' into feature/account-provider-selection 2026-08-18 17:49:31 -07:00
Jenna Vassar 1b2d5b9c92 Complete account providers without the https scheme and include the enterprise allow-list 2026-08-18 17:03:39 -07:00
Benoit Marty dfbc75a9e1 Merge pull request #7428 from element-hq/feature/bma/timeoutInReadyToScanScreen
[LinkNewDevice] Ensure the notice screen is also protected by the timeout.
2026-08-18 10:07:36 +02:00
Benoit Marty 3c21af2a57 Merge pull request #7437 from hayaksi1/fix/4594-leave-room-not-found
Show an error when the room to leave cannot be found
2026-08-18 10:06:01 +02:00
Benoit Marty c3442d3a03 Merge pull request #7439 from hayaksi1/fix/5153-sanitize-carriage-return
Exclude carriage returns from the login and password fields
2026-08-18 10:05:40 +02:00
Benoit Marty a36ccbaae2 Merge pull request #7455 from hayaksi1/fix/4582-autoscroll-focused-field
Keep the focused login field visible above the keyboard
2026-08-18 10:03:22 +02:00
hayyaksi cb6ac751cc Refresh the room members when a mention is started (#7438)
* Refresh the room members when a mention is started

The mention suggestions read room.membersStateFlow, which is a cache filled
only by an explicit updateMembers() call. Nothing calls it while a room is
open, so a member who joined after the room was opened never appears in the
suggestion list until the room is left and entered again.

Call updateMembers() when a mention search starts. The trigger is
distinctUntilChanged on "the current suggestion is a mention", so it fires
once per mention rather than on every keystroke, and fetchRoomMembers already
no-ops while a fetch is in flight.
2026-08-17 21:10:08 +02:00
Jenna Vassar 7c48e737c4 Merge remote-tracking branch 'origin/develop' into feature/account-provider-selection 2026-08-17 11:18:46 -07:00
Jenna Vassar a6c7042482 Configure the account provider homeserver only once when signing in 2026-08-17 10:37:27 -07:00
Jenna Vassar bbd6ce134b Fix account provider dropped on first Continue and address review comments 2026-08-17 10:31:17 -07: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
Cipherd f94566e44f Fix outgoing session verification stuck with incomplete recovery setup (#7433) 2026-08-17 15:14:45 +02:00
Benoit Marty 054d592391 Sync again 2026-08-17 12:10:39 +02:00
Benoit Marty 5ac1fe2409 Remove temporary string. 2026-08-17 12:10:18 +02:00
Benoit Marty a740423343 Sync strings. 2026-08-17 11:34:52 +02:00
hayaksi1 9a4daa19b2 Keep the focused login field visible above the keyboard
On shorter screens the software keyboard can cover the field the user is
typing into on the login and account provider screens, because nothing
scrolls the content back into the reduced viewport once the keyboard is
shown.

Apply the existing bringIntoViewOnImeVisible modifier to those fields,
the same way the recovery key screen already does.
2026-08-17 11:33:10 +03:00
Benoit Marty 2ac11ebe14 Clarify the comments 2026-08-17 10:30:57 +02:00
Benoit Marty d0a1011638 Add documentation on LinkNewDesktopHandler and LinkNewMobileHandler 2026-08-17 10:06:26 +02:00
Benoit Marty aa6f70530a [LinkNewDevice] Move the timeout management when linking a new desktop device to the LinkNewDeviceFlowNode so that it can also be used for the DesktopNotice screen. 2026-08-17 10:06:25 +02:00
hayaksi1 c901b902b1 Exclude carriage returns from the login and password fields
The sanitize() helper applied to the login, password and account deactivation
password fields promises to remove "any new line characters" but only removes
LF. A value pasted from a source with CRLF endings keeps its CR, which is
invisible in the field and is sent to the homeserver as part of the password,
so the login is rejected while typing the same characters by hand works.

Drop every line separator instead of LF only, in both copies of the helper.
Whitespace that can legitimately be part of a password, such as spaces and
tabs, is left untouched.
2026-08-16 22:44:48 +03:00
hayaksi1 04dcc14eaa Show an error when the room to leave cannot be found
showLeaveRoomAlert ran its whole body inside client.getRoom(roomId)?.use { }.
When getRoom returned null, which happens for a room the client can no longer
resolve, the body was skipped without writing any state: leaveAction stayed
Uninitialized, so no confirmation dialog and no error was displayed and
Leave room appeared to do nothing at all.

Handle the missing room explicitly and surface it as a failure, which
AsyncActionView already renders with the generic error dialog. leaveRoom used
a !! for the same lookup, so it reported the miss as a NullPointerException;
it now throws the same named exception.
2026-08-16 22:44:29 +03:00
Benoit Marty 23b75c3423 Fix outdated documentation. (#7430) 2026-08-15 11:05:43 +02:00
Benoit Marty e1adc938fd Merge pull request #7424 from element-hq/revert-7378-fix/6853-remember-revealed-images
Revert "Keep manually revealed media visible when re-entering a room"
2026-08-14 17:37:31 +02:00
Jenna Vassar 54ba43a8ec Use the correct license header on the new account provider history files 2026-08-14 08:12:51 -07:00
Jenna Vassar 89e2abaeeb Merge develop into feature/account-provider-selection 2026-08-14 07:51:17 -07:00
Benoit Marty 9e32801d02 Merge pull request #7426 from element-hq/feature/bma/documentation
Add KDoc to all the interfaces of the api modules
2026-08-14 13:46:28 +02:00
Benoit Marty 1ab401482a Fix formatting issues 2026-08-14 12:20:49 +02:00
Benoit Marty 9822b3d4f7 Add KDoc to the single-interface feature API modules
Cover the last remaining interfaces across features/announcement, cachecleaner,
call, contentscanner, createroom, knockrequests, lockscreen, rolesandpermissions,
startchat, userprofile and viewfolder, with their members and parameters.

Grouped into one commit rather than eleven near-empty ones, per the AGENTS.md rule
about tiny commits.

This completes every features/* api module.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:00:42 +02:00
Benoit Marty 1b4d6c07fa Add KDoc to the authentication, logout, preferences and share API interfaces
Cover the remaining interfaces of features/login, features/logout,
features/preferences and features/share, along with their members and parameters.

Points recorded here: AccountProviderAccessControl returns true on a build with no
enterprise restriction, ExtraDeveloperOptionsRenderer is bound to a no-op in the
standard build, DirectLogoutView draws nothing until a logout event is sent, and
CacheService exists because clearing a cache destroys the client and the app has
to react.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:53:37 +02:00
Benoit Marty fa123d941b Add KDoc to the features/invite API interfaces
Document AcceptDeclineInviteEvents, AcceptDeclineInviteView and the
SeenInvitesStore interface.

The view doc explains why it is a shared component rather than part of one screen:
it is embedded everywhere an invitation can be acted on, so the confirmation
dialogs behave identically in the invite list and in a room preview.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:51:32 +02:00
Benoit Marty c4c7dac9cf Add KDoc to the features/rageshake API interfaces
Document RageshakeFeatureAvailability, LogFilesRemover and the BugReporter
interface, and complete the docs of its remaining members.

The BugReporter doc records that progress and the outcome arrive through the
listener passed to sendBugReport rather than through a return value or an
exception.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:48:59 +02:00
Benoit Marty 57658640e1 Add KDoc to the features/location API interfaces
Document LocationService, StaticMapUrlBuilder, TileServerStyleUriBuilder and the
members of ActiveLiveLocationShareManager that had none.

The two URL builders now say what happens when no map provider is configured for
the build, which is the case LocationService.isServiceAvailable exists to guard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:48:58 +02:00
Benoit Marty c32f81f696 Revert "Keep manually revealed media visible when re-entering a room" 2026-08-14 10:49:24 +02:00
Benoit Marty 055fe408a6 Add KDoc to the features/roommembermoderation API interfaces
Document RoomMemberModerationState, RoomMemberModerationEvents and
RoomMemberModerationRenderer along with their members and parameters.

The renderer doc states that it draws nothing until the host screen asks for a
member's actions, and that onSelectAction exists so the host can navigate for the
actions that need a screen of their own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:06:53 +02:00
Benoit Marty 50214fe01a Add KDoc to the features/poll API interfaces
Document PollContentStateFactory, SendPollResponseAction and EndPollAction along
with their members and parameters.

The two action interfaces exist to wrap a plain timeline call, so their docs say
what they add: both capture an analytics event on success, which is the reason
callers should go through them rather than calling the timeline directly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:06:47 +02:00
Benoit Marty 76411b07fb Add KDoc to the features/leaveroom API interfaces
Document LeaveRoomState, LeaveRoomEvent and LeaveRoomRenderer.

The renderer doc records the two things a host screen needs to know, both taken
from LeaveRoomPresenter and LeaveRoomView: it draws nothing until a leave event is
sent, and onSelectNewOwners fires specifically when the user is the last owner of
a room that still has other members.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:05:31 +02:00
Benoit Marty bc6f237507 Add KDoc to the features/invitepeople API interfaces
Document InvitePeopleState and each of its properties, InvitePeopleEvents,
InvitePeopleRenderer and the presenter factory.

The state properties now say what drives them, in particular that
createRoomFromDmAction covers the case of inviting a third person into an
existing direct message, and that the factory accepts a null room for that flow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:04:31 +02:00