Commit Graph

218 Commits

Author SHA1 Message Date
Doug
d6ca170ed9 Update the default logs directory and allow collection from elsewhere. (#4352)
* Replace deprecated URL methods.

* Start putting log files in Library/Logs (moving existing files with a migration.)

* Make Tracing.deleteLogFiles aware of the legacy logs location.

* Allow the logs to be collected from a different directory.
2025-07-24 09:49:29 +01:00
Doug
ee9f055822 Add a TracingHook. (#4345) 2025-07-23 14:29:31 +01:00
Doug
b7867dac85 Make the remote settings hook usable within the app extensions. (#4342) 2025-07-22 17:09:53 +01:00
Doug
f65b191c8a Refactor Rageshake URL and Target configuration. (#4337)
* Move the rageshakeURL configuration from the BugReportService to AppSettings.

* Refactor Target to return a handle when configuring.

This helps with reconfiguration and removes the @MainActor constraint.
2025-07-22 10:19:26 +01:00
Doug
a489ec8a8c Merge the AuthenticationService with the QRCodeLoginService. (#4323)
* Merge the AuthenticationServer with the QRCodeLoginService.

* Merge AuthenticationClientBuilderFactory and AuthenticationClientBuilder into AuthenticationClientFactory

The separation is no longer needed now that password/OIDC login and QR code login have a similar API shape.
2025-07-15 17:59:15 +01:00
Doug
e882b9e7b8 Support runtime customisation of the rageshake URL. (#4267) 2025-06-30 10:18:25 +01:00
Doug
681ec8ee38 Add a RoomScreenHook. 2025-06-10 10:28:18 +03:00
Stefan Ceriu
84478c8251 Setup composer actions within threaded timelines. 2025-06-10 08:57:08 +03:00
Doug
b4174aed22 Adopt StateStoreViewModelV2 in the remaining settings screens. (#4158)
* Move the AuthenticationStartScreen into the Authentication directory.

* Commit the updated Sentry license.

No idea why they dropped the 2024 🤷‍♂️

* Use StateStoreViewModelV2 in BugReportScreen.

* Use StateStoreViewModelV2 in UserDetailsEditScreen.

* Use StateStoreViewModelV2 in NotificationSettingsScreen.

* Use StateStoreViewModelV2 in NotificationSettingsEditScreen.

* Use StateStoreViewModelV2 in LegalInformationScreen.

* Use StateStoreViewModelV2 in LogViewerScreen.

* Use StateStoreViewModelV2 in AnalyticsSettingsScreen.

* Rename AdvancedSettingsScreen directory.

* Use StateStoreViewModelV2 in EncryptionResetScreen.

* Use StateStoreViewModelV2 in EncryptionResetPasswordScreen.

* Use StateStoreViewModelV2 in SecureBackup…Screens.

* Use StateStoreViewModelV2 in LoginScreen.

Seems this one was ignored waiting on the fulfillment transitionValues implementation.

* Use StateStoreViewModelV2 in DeactivateAccountScreen.

* Move DeactivateAccountScreen into the Settings directory.
2025-05-30 12:24:56 +01:00
Mauro
c1dfce4935 Handle media previews and invite avatars through the account data (#4142)
* added account data media display policy handling to NSE

* pr suggestions

* update compound

* code improvement
2025-05-28 19:51:34 +02:00
Stefan Ceriu
f20629b1dc Update the Enterprise submodule and make use of the newly added secrets configuration mechanism 2025-05-27 18:21:11 +03:00
Stefan Ceriu
3dd98adeeb Setup the new RustSDK sentry integration 2025-05-27 18:21:11 +03:00
Doug
cb5c7337d2 Add support for Account Provisioning links. (#4108)
* Add support for account provisioning links and route them to the authentication flow.

* Use the provisioning parameters to configure the authentication flow.

* Add UI tests for the provisioned authentication flow.

* Record new preview snapshots.

* Add unit tests.

* Make the domain configurable in the app settings.

* Use the loginHint in the login screen too.
2025-05-12 13:28:34 +01:00
Stefan Ceriu
4bff7df821 Extract NSE specific code out of the UNNotificationContent extension 2025-04-17 15:24:12 +03:00
Doug
188439eef7 Only use the appGroupTemporaryDirectory to access a file from the share extension. (#4002)
… and switch back to the plain `URL.temporaryDirectory` for everything else.

* Fix documentation

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2025-04-10 09:56:25 +01:00
Mauro Romito
031ba13c3d bump to 25.04.2 and improved migration code 2025-04-09 18:55:34 +02:00
Mauro Romito
750159e17b updated preview tests 2025-04-09 18:55:34 +02:00
Doug
586a62fef6 Add a Compound hook. (#3979)
* Rename AppHooksProtocol.configure() to .setUp().

* Add a CompoundHook.
2025-04-04 17:46:31 +01:00
Stefan Ceriu
fb83dbffdb Bring back the background refresh stop sync crash fix, this time with a forced conformance to the main actor.
- follow up to https://github.com/element-hq/element-x-ios/pull/3942 and https://github.com/element-hq/element-x-ios/pull/3946
2025-04-01 17:22:16 +03:00
Doug
2a146ca022 Allow the services that are configured by secrets to be disabled. (#3961)
* Make the map tiler key optional.

* Make the bug report URL optional.

* Make the sentry URL optional.

* Make the analytics configuration optional and handle consent taking Sentry into account.

* Stop prompting users to report crashes when Sentry is disabled.
2025-04-01 09:24:12 +01:00
Stefan Ceriu
ee9bfdd5a0 Revert "Attempt to prevent crashes after expiring background refreshes."
This reverts commit 418daaa90fd9ed6a9fbcdd9d03ee4cde7888c3cd.
2025-03-27 13:42:26 +02:00
Stefan Ceriu
be108b0cfe Attempt to prevent crashes after expiring background refreshes. 2025-03-26 14:24:38 +02:00
Doug
0badcd1303 Add developer options for Rust's Trace Log Packs. (#3929)
* Add support for configuring log packs.

* Update call widget parameters.

* Update the SDK.
2025-03-21 19:00:13 +00:00
Mauro Romito
81031b12a7 added tests
improvement

improved

improvement

fixed
2025-03-17 16:21:09 +01:00
Stefan Ceriu
1ae6fc67c4 SDK update (#3891)
* Bump the RustSDK to v25.03.11

* Replace oidc login prompt with nil following the changes from https://github.com/matrix-org/matrix-rust-sdk/pull/4761

```
/// * `prompt` - The desired user experience in the web UI. No value means
///   that the user wishes to login into an existing account, and a value of
///   `Create` means that the user wishes to register a new account.
```

* Fix trailing closure warnings

* Update the client proxy after making `getNotificationSettings()` and  `cachedAvatarUrl()` async (they used to be blocking on the rust side).

* Move `Room.isEncrypted` to the info publisher and manually update the encryption state when creating the room.

* Bump the SDK again to v25.03.12 - This introduces a new way to configure the tokio runtime that we can use to have extensions use less memory
- introduce a new Target struct that takes care of setting up rust services (tracing and tokio) for our various targets
- cleanup MXLog and friends

* Address PR comments

* Bump the SDK again, switch back to using `.consent` as the OIDC login prompt (which was reintroduced in matrix-org/matrix-rust-sdk/pull/4791)
2025-03-13 11:17:37 +02:00
Stefan Ceriu
7a13ecb167 Bump the RustSDK to v25.03.05
- adopt the new timeline configuration which now exposes read receipts tracking. For now it should be set to `false` for all timelines except the live one, which still gets configured properly on the rust side through `init_timeline`. Eventually we will converge on this configuration API for all of them.
- also adopt the new rust side cache clearing method and remove our own
2025-03-05 14:24:44 +02:00
Stefan Ceriu
d7535d4618 Bump the RustSDK to v25.2.25, address breaking changes from matrix-org/matrix-rust-sdk/pull/4674 2025-02-25 12:40:56 +02:00
Doug
4312a604c1 RoomTimeline… refactor (drop the Room). (#3728)
* Add the timeline controller factory to the timeline view model.

In preparation for building a timeline to swipe through media in QuickLook.

* Refactor RoomTimelineControllerFactory.

* Refactor RoomTimelineController.

* Refactor RoomTimelineProvider.
2025-02-03 14:14:01 +00:00
Stefan Ceriu
7a4534680f Move tracing configuration to the rust side. 2025-01-10 19:09:52 +02:00
Stefan Ceriu
d5542c2526 Simplify how to we handle background task expirations. (#3670) 2025-01-10 16:43:39 +02:00
manuroe
c29f4cc9b4 Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
e75c930d8f Media gallery - part 1(#3588)
* Introduce a `MediaEventsTimelineFlowCoordinator`
* Update SDK API and architecture
* Add a feature flag, add translations
* Move the media events timeline presentation under the room flow coordinator state machine
* Rename `TimelineViewState.timelineViewState` of type `TimelineState` to `timelineState`
* Enabled SwiftLint's `trailing_closure` rule and fix the warnings.
2024-12-06 16:58:14 +02:00
Doug
9da03c03cf Wait until the sync has stopped before marking the task as complete. (#3564) 2024-11-28 17:30:07 +00:00
Stefan Ceriu
16f5836e95 Delay handling inline notification replies until the user session is established 2024-11-22 09:28:38 +02:00
Stefan Ceriu
07cf873484 Share extension (#3506)
* Setup simple share extension

* Switch the app url scheme to be the full bundle identifier

* Setup a share extension that show a SwiftUI view, uses rust tracing and redirects to the hosting aplication

* Move media as json through the custom scheme into the main app and deep link into the media upload preview screen

* Fix message forwarding and global search screen room summary provider filtering.

* Tweak the message forwarding and global search screen designs.

* Add a room selection screen to use after receiving a share request from the share extension

* Fix share extension entitlements

* Share the temporary directory between the main app and the extensions; rename the caches one.

* Remove the no longer needed notification avatar flipping fix.

* Extract the placeholder avatar image generator from the NSE

* Nest `AvatarSize` within the new `Avatars` enum

* Donate an `INSendMessageIntent` to the system every time we send a message so they appear as share suggestions

* Support suggestions in the share extension itself

* Improve sharing animations and fix presentation when room already on the stack

* Clear all routes when sharing without a preselected room.

* Fix broken unit tests

* Various initial tweaks following code review.

* Correctly clean up and dismiss the share extension for all paths.

* Move the share extension path to a constants enum

* Rename UserSessionFlowCoordinator specific share extension states and events

* Add UserSession and Room flow coordinator share route tests

* Tweak the share extension logic.
2024-11-13 14:02:47 +02:00
Doug
719dcef5b9 Make stopSync more aware of background usage. (#3501) 2024-11-11 10:32:58 +00:00
Stefan Ceriu
020f40b48b Start syncing when receiving a background VoIP call for the cases in which the app was suspended but not terminated. 2024-11-06 20:11:21 +02:00
Stefan Ceriu
9b54ed81b5 Begin a background task when receiving a call in order to get state updates for longer. 2024-11-06 13:40:58 +02:00
Stefan Ceriu
1cf74311db Prevent the background task's expiration from stopping the main sync loop. 2024-11-06 13:40:58 +02:00
Doug
5ef8cb7246 Stop the sync loop after each background app refresh. (#3481) 2024-11-04 17:21:54 +00:00
Doug
b496fa327e Use an https callback for OIDC once again. (#3461)
* Use the new WAS callback type and return back to the https callback for OIDC.

* Simplify OIDCAuthenticationPresenter now it doesn't need to handle universal links.

* Remove old unit tests.
2024-10-29 11:28:05 +00:00
Mauro
17ef4093d5 remove iOS 16 support (#3443)
* remove iOS 16 support

* remove iOS 16 support

* test updates

* added more delay

* revert

* adding waiting time on the CI
2024-10-24 17:21:28 +02:00
Stefan Ceriu
2c31885355 Refactor theTimelineItemIdentifier handling; stop relying on optional EventOrTransactionIds and be explicit when setting composer modes from the draft service. 2024-10-16 16:37:47 +03:00
Stefan Ceriu
e918dc66ae Tracing and integration test tweaks (#3336)
* Disable image and document picker integration tests as they randomly fail to load and are flakey.

* Delete any pre-existing log files

* Various tracing tweaks and fixes:
- delete the custom tracing log levels as we can't control their ouput
- implement comparable on them
- change default levels only if the new chosen level increases their verbosity

* Make logging targets mandatory and fix their logging levels

* Switch back to using the `run_tests` reset simulator flag as `fastlane snapshot reset_simulators` was too generic and slow

* Switch all integration test taps to `tapCenter` (nee forceTap) after noticing missed taps on CI.

* Make the logging file prefix explicit, let the main app not use one.

* Rename tracing configuration `target` to `currentTarget`
2024-09-27 15:08:47 +03:00
Doug
94f5879639 Configure the AuthenticationService later now that we have 2 flows on the start screen. (#3316)
* Don't query the homeserver until confirming it (or selecting a different one).

* Setup the infrastructure to test AuthenticationService.

Implement basic tests for configuration & password login.

* Use the real AuthenticationService with a mock Client in all of the tests.

* Add tests for the ServerConfirmationScreenViewModel.

* Remove redundant view state and test for it.
2024-09-25 14:40:18 +01:00
Mauro
d32135137f Await for room sync only for push notification invites (#3307) 2024-09-19 13:42:58 +00:00
Doug
8a6ac746a7 Handle notifications properly when a call is happening. (#3276) 2024-09-13 16:50:29 +02:00
Stefan Ceriu
7ee1c721b4 Fixes #3146 - Remove the account migration screen 2024-09-09 12:41:28 +03:00
Stefan Ceriu
89eae00479 Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Doug
3e621bf425 Remove the Element Call Picture in Picture feature flag. (#3204) 2024-08-27 11:07:19 +01:00