Commit Graph

881 Commits

Author SHA1 Message Date
Doug
e989463d91 Restore the .oidcCallback route for external authentication. (#5391)
* Restore the .oidcCallback route (partially reverts #3461) for external authentication.

* Make sure OIDC also works for non-http URLs.

* Remove oidcAuthentication from the state machine.

There isn't a reliable way to detect failure/cancellation when e.g. the user returns from an external app without interacting with the MAS page.
2026-05-05 12:47:07 +01:00
Mauro Romito
4b41cefb59 limit knock FF only room creation and access type changes
# Conflicts:
#	ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift
2026-05-04 14:12:31 +03:00
Doug
6cfcd7d41f Fixes for multi-window support. (#5528)
* Correctly handle the re-opening of the main window.

Add an additional safe-guard to ensure only one main window exists.
Make sure all secondary windows use the correct tint colour.

* Fix a bug where the settings screen isn't shown on macOS when the AppLock feature is enabled.
2026-05-01 14:44:04 +01:00
Mauro
11584d6bfe Live Location Sharing - handle server echoes (#5514)
* Track active live location sessions by ID instead of timeout.

# Conflicts:
#	ElementX/Sources/Services/Location/LiveLocationManager.swift

* implemented a system to promote starting session to active sesessions to send locations at the right time, and a system to remove a local session if it's handled by an external device.

* pr suggestions

---------

Co-authored-by: Doug <douglase@element.io>
2026-04-30 13:18:36 +00:00
Doug
df1a407142 Remove support for handling SPA calls within the app. (#5515)
* Remove support for handling SPA call links.

They were a stop-gap solution whilst we were building support for embedded room calling.

* Simplify ElementCallConfiguration now that there is only 1 type of call to handle.

* Remove the unused overlayModule from NavigationRoomCoordinator.
2026-04-29 19:32:38 +01:00
Doug
1c8c5ea711 Update the SDK, handling OIDC/OAuth API breaks. (#5497)
Update the SDK handling API breaks.
2026-04-27 14:46:53 +01:00
Doug
9987a34265 Fix a bug where the onboarding flow was dismissed by logging out. (#5481)
* Fix a bug where the onboarding flow was dismissed by logging out.

* Add some tests for the available actions while we're here.

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2026-04-27 14:33:09 +01:00
Mauro Romito
af08010370 removed LLS feature flag 2026-04-27 15:13:07 +02:00
Mauro Romito
83e4b3a865 disabled the flaky test callIsTimingOut 2026-04-27 14:13:13 +02:00
Richard van der Hoff
bc32a05a2c Promote "history sharing on invite" out of developer options (#5480)
* Enable key-share-on-invite irrespective of feature flag

* Remove feature-flag dep: warning on starting chat with new people

* Remove feature-flag dep: invite from room member details

* Remove feature-flag dep: warning on new users in invite screen

* Remove feature-flag dep: from room details screen

* Remove feature-flag dep: starting chat from user profile screen

* Remove feature-flag dep: timeline info on forwarded keys

* Remove feature-flag dep: RoomScreenModel

* Remove `enableKeyShareOnInvite` from AppSettings

* Remove `enableKeyShareOnInvite` feature flag

* Remove outdated comments

* Update preview test room snapshots as their header now includes the history sharing icon
2026-04-27 14:43:18 +03:00
Mauro
3acb558980 Open Live Locations map on tapping on the banner (#5477)
* Implemented opening the LLS on our own user when tapping on the banner

* added a test for moving the map as soon as the first update arrives.

* updated preview tests
2026-04-24 13:19:07 +02:00
Mauro Romito
d304475ee9 Force a stop before starting a new session and resend last location on new starts 2026-04-23 17:53:17 +02:00
Mauro
36fd7b2660 LocationSharingScreen: fix indefinite loading on the center to location button in non picker mode (#5469) 2026-04-22 16:36:15 +00:00
Mauro Romito
cc3ebc3768 use current value subject and current value publisher for LiveLocationShare updates 2026-04-22 16:43:18 +02:00
Mauro
e9fd29e100 Improve Live Location Sharing with reduced accuracy mode (#5461) 2026-04-22 13:12:03 +02:00
Mauro Romito
dd7048d5c2 handle reduced accuracy authorization case 2026-04-21 13:51:40 +02:00
amshak
b16bbdcc72 Notification Decoration Revised (#5312)
1. I removed the grey dots for when there is activity in rooms set to mentions or mute.
2. For all unread rooms, I made the message preview text bold for better legibility
3. For rooms with no unreads, I made the font weight regular, again for legibility

We have also mergeg the new room list activity rendering with the existing feature hide unread badge feature flag and provide 3 variations: current production behavior, no badge but bolding, and no bolding and no badge
2026-04-21 14:12:07 +03:00
Valere Fedronic
50ae841d78 Support for ongoing voice vs video call + joining (#5399) 2026-04-21 09:11:52 +00:00
Stefan Ceriu
d5555a9b23 Fix session verification SAS flow not automatically starting
With #5116 removing the `verificationRequestAccepted` view state and its
`.startSasVerification` button action we now need another way of starting the SAS
flows whenever the verification requests gets accepted. As such a state machine
transition from `acceptingVerificationRequest` to `verificationRequestAccepted`
will now automatically call `startSasVerification` on the SessionVerificationProxy.
2026-04-20 18:19:27 +03:00
Stefan Ceriu
33ffea4eb8 Fix various warnings 2026-04-17 10:55:48 +03:00
Stefan Ceriu
d0b8da33c4 Manually update project and resolved packages following Renovate XcodeGen update 2026-04-17 10:47:33 +03:00
Mauro
a27effdac6 Render LiveLocations in the map (#5394) 2026-04-14 18:27:34 +02:00
Skye Elliot
477bf859c5 Prompt user when inviting users with uncached identities (#5331)
If the user attempts to invite someone (to a room or creating a DM) whose identity is not cached, we prompt them to make sure this was their intention.
2026-04-14 14:51:58 +03:00
Mauro
df7f8e0510 Fix LiveLocationManager flaky tests (#5389) 2026-04-13 18:05:47 +02:00
Doug
252e2f75df Verify Element X with an existing Element Classic account. (#5374)
* Read and import the secrets from ClassicAppAccounts.

* Record snapshots.

* Add some documentation, tidy up tests and fix the dismissal of the backup instructions.

* Workaround flakey tests (the fulfilments weren't always firing).

* Allow a custom Classic App deep link URL to be configured.
2026-04-13 15:30:09 +01:00
Doug
e3a074b8b2 Remove the Spaces Announcement sheet. (#5376) 2026-04-10 17:49:28 +01:00
Mauro
2d2295bcc1 Live Location Sharing Banner (#5370)
* Live Location Sharing Banner

# Conflicts:
#	ElementX.xcodeproj/project.pbxproj

* updated the top banner modifier and the top banner views

# Conflicts:
#	ElementX/Resources/Localizations/en-US.lproj/Localizable.strings
#	ElementX/Resources/Localizations/en.lproj/Localizable.strings

* improved the stopping function from the timeline item

* stop live location sharing before starting a new one.

* added some tests for LiveLocationManager

* pr suggestions
2026-04-10 14:50:42 +02:00
Valere Fedronic
d792f6e4f9 Require video for callkit even if voice call only to workaround a bug answering calls on the lock screen (#5366) 2026-04-09 14:18:06 +00:00
Doug
d6cd2c696e Add a view to show the user's account from Element Classic. (#5361)
No presentation logic yet.
2026-04-08 21:18:03 +01:00
Hugh Nimmo-Smith
5574dc8ab7 Improve detection of link device completion when linking a new device via QR (#5323)
* Improve detection of link device completion

* Fix tests to match
2026-04-08 09:48:00 +01:00
Mauro Romito
524bef6d60 add new tests to LocationSharingViewModel 2026-04-03 14:19:42 +02:00
Stefan Ceriu
e375950ba1 Remove the shouldDisambiguateDisplayNames parameter from the RoomEvent and RoomStateEvent string builders. 2026-04-02 12:30:43 +03:00
Stefan Ceriu
b9c5c3446a Move the global search shortcut to application commands so it's more reliable with multiple windows 2026-03-31 20:33:33 +03:00
Stefan Ceriu
0104ad06aa Refactor the RoomMessageEventStringBuilder to take a Style instead of a Destination
This make its usage clearer and makes different styles reusable
2026-03-31 18:21:14 +03:00
Mauro Romito
b5b459d947 PR Suggestions 2026-03-31 12:58:27 +02:00
Mauro Romito
9e1545e3c1 added tests 2026-03-31 12:58:27 +02:00
Mauro Romito
9e17fd0315 implemented the usage of the live location manager permission handling in the location sharing screen. 2026-03-31 12:58:27 +02:00
Valere
57fd852ec9 add test for voice call 2026-03-30 17:49:46 +02:00
Valere
f5451e5e17 fix tests 2026-03-30 17:49:46 +02:00
Mauro
8934f68f7b Render the live location timeline item (#5209)
* created the data for the timeline item

# Conflicts:
#	ElementX/Sources/Other/Logging/Tracing.swift
#	ElementX/Sources/Services/Authentication/AuthenticationService.swift
#	ElementX/Sources/Services/Authentication/LinkNewDeviceService.swift

* Implemented the LLS timeline item

* updated preview tests

* pr and design suggestions

* previewscrollview is debug only
2026-03-24 10:34:00 +01:00
Mauro
9442b6981f Rename Sign Out to Remove Device + Update SDK 26.03.18 (#5280)
* update the sdk

* updated preview tests

# Conflicts:
#	ElementX/Sources/Screens/Timeline/View/Style/TimelineItemSendInfoLabel.swift
#	ElementX/Sources/Screens/Timeline/View/TimelineItemViews/LiveLocationRoomTimelineView.swift

* update sdk to 26.03.18 + regenerated preview tests after sign out copy change

* updated UI tests

* pr suggestions
2026-03-18 17:34:45 +01:00
Doug
0bd72114b8 Add tests for loading Classic accounts.
Tidy up warnings and fix a few bugs that were revealed.
2026-03-11 17:42:53 +00:00
Mauro Romito
44303bdee7 Add support for reading accounts from Element Classic. 2026-03-11 17:42:53 +00:00
Mauro
2b0771c43c Refactor and redesign Location Sharing Screen (#5155)
* refactored the static location screen to the location sharing screen

# Conflicts:
#	UnitTests/Sources/LocationSharingScreenViewModelTests.swift

# Conflicts:
#	ElementX.xcodeproj/project.pbxproj

* implemented a custom pin with an overlayable view

* implemented the render of the user when the location is sender instead of the pin type

* removed description and body they are not used at all.

* reimplemented single button for sharing this or user location + implemented an experimental way to update annotations

* removed unnecessary @Suite description

* implemented a way to display the alert on top of the sheet and added a spinner to the center user location button

* fixed alerts strings

* fixed a failing test

* improved preview tests
2026-03-06 12:51:16 +01:00
Stefan Ceriu
5e41016d5e Fix new redundantSendable and redundantSwiftTestingSuite swiftformat errors 2026-03-04 17:02:11 +02:00
Mauro Romito
0ed22b0dd9 flaky test fix 2026-02-27 13:11:31 +01:00
Mauro Romito
1d08e86982 remove appSettings from SpaceScreen 2026-02-26 16:29:52 +01:00
Mauro Romito
465f832ba5 remove space FFs 2026-02-26 16:29:52 +01:00
Copilot
4834f453ef Finish migration of UnitTests target from XCTestCase to Swift Testing (#5129)
* Initial plan

* Migrate 3 test files from XCTest to Swift Testing

- MediaUploadPreviewScreenViewModelTests: @MainActor @Suite struct with init(),
  BundleFinder class for Bundle(for:), mutating test/setup functions,
  [self] capture replacing [weak self] in closures
- NotificationManagerTests: @MainActor @Suite final class with init()/deinit,
  expectation/fulfillment(of:) replaced with confirmation(...), test_ prefix stripped
- NotificationSettingsScreenViewModelTests: @MainActor @Suite struct with
  init() throws, non-optional stored properties, test prefix stripped

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate 3 XCTest files to Swift Testing

- NotificationSettingsEditScreenViewModelTests: @MainActor @Suite struct with init() throws, mutating test methods
- TimelineViewModelTests: @MainActor @Suite final class with init() async throws + deinit
- AttributedStringBuilderTests: @Suite struct with init() async throws

All XCT assertions replaced with #expect/#require/Issue.record

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate 4 test files from XCTest to Swift Testing

- TimelineMediaPreviewViewModelTests: @Suite struct, mutating @Test funcs,
  testLoadingItem renamed to loadingItem (called internally by other tests)
- ServerConfirmationScreenViewModelTests: @Suite final class with init()/deinit
- CompletionSuggestionServiceTests: @Suite struct with init()
- RoomFlowCoordinatorTests: @Suite final class with deinit

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate 4 test files from XCTest to Swift Testing

- VoiceMessageRecorderTests: @Suite struct with init() async throws,
  added BundleFinder class for Bundle lookup, migrated all assertions
- SpaceScreenViewModelTests: @Suite struct, private mutating setupViewModel,
  all test funcs mutating, XCTestExpectation → confirmation
- RoomNotificationSettingsScreenViewModelTests: @Suite struct with
  init() throws, cancellable tests marked mutating
- JoinRoomScreenViewModelTests: @Suite final class with init()/deinit,
  XCTestExpectation → confirmation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate 6 test files from XCTestCase to Swift Testing

Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>

* Fix trailing blank line in RoomPollsHistoryScreenViewModelTests

Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>

* Migrate 3 test files from XCTest to Swift Testing

- MediaUploadingPreprocessorTests: @Suite final class with init()/deinit,
  removed executionTimeAllowance, XCTAssertEqual(accuracy:) → abs(Double)
- SecurityAndPrivacyScreenViewModelTests: @MainActor @Suite final class,
  5 expectation+fulfillment → await confirmation(...)
- CreateRoomViewModelTests: @MainActor @Suite final class,
  4 expectation+fulfillment → await confirmation(...)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate RoomScreenViewModelTests and RoomDetailsScreenViewModelTests to Swift Testing

- Replace XCTest with Testing framework
- RoomScreenViewModelTests: final class with init() async throws + deinit
- RoomDetailsScreenViewModelTests: struct with init() and mutating funcs
- Convert XCT assertions to #expect / Issue.record
- Convert XCTestExpectation patterns to confirmation { confirm in }
- Strip 'test' prefix from all test function names

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate ComposerToolbarViewModelTests from XCTest to Swift Testing

- Replace import XCTest with import Testing
- Convert XCTestCase class to @MainActor @Suite final class
- Replace setUp()/tearDown() with init()/deinit
- Strip 'test' prefix from all 41 test method names and add @Test
- Replace XCTAssert* with #expect()/#require()
- Replace try XCTUnwrap() with try #require()
- Convert expectation+wait patterns to deferFulfillment with PassthroughSubject
- Convert isInverted expectation to boolean flag checked after await
- Use deferFulfillment on $viewState for state-transition tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address comments with Copilot.

* Fix the failing tests.

* Fixed flaky tests (#5137)

resolved flaky tests

* Tweaks and fixes.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
2026-02-24 12:20:01 +00:00
Mauro
fccca17ecf waitConfirmation implementation (#5130)
* `waitConfirmation` implementation

* even better docs

* made the body not async since the context of usage did not really require it

* pr suggestions
2026-02-23 14:24:19 +01:00