Commit Graph

585 Commits

Author SHA1 Message Date
Stefan Ceriu
5ec47c2580 Move integration test flows that don't require a backend to the UI tests
In an attempt to make them faster and less flakey.
2026-04-28 17:37:50 +03: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
Mauro Romito
b1d82add91 stop showing live location disclaimer when accepted. 2026-04-22 18:17:17 +02: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
Mauro Romito
45d9eb4065 use CLLocationManager directly to handle location updates since is more reliable in bg and more configurable 2026-04-21 12:32:50 +02:00
Mauro Romito
693a76ecf0 allow users to set live location minimum distance update 2026-04-21 12:32:50 +02:00
Valere Fedronic
50ae841d78 Support for ongoing voice vs video call + joining (#5399) 2026-04-21 09:11:52 +00:00
Doug
350c04b0f3 Add support for homeserver capabilities to disable the UserDetailsEditScreen UI. (#5421)
Add support for homeserver capabilities to disable editing your user profile.

Also updates editable avatar size/formatting to match the latest Figma at the same time.
2026-04-17 11:52:46 +01:00
Mauro Romito
c9cafe0106 pr suggestions 2026-04-14 14:17:27 +02:00
Mauro Romito
074de88017 implement APIs for LLS observation 2026-04-14 14:17:27 +02: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
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
Doug
ff4270addc Update the SDK handling breaking changes. (#5364) 2026-04-08 21:11:57 +01:00
Mauro Romito
524bef6d60 add new tests to LocationSharingViewModel 2026-04-03 14:19:42 +02:00
Mauro Romito
299649abbd pr suggestions 2026-04-03 12:36:45 +02:00
Mauro Romito
eabfdcd035 implement the start, send and stop functions 2026-04-03 12:36:45 +02:00
Stefan Ceriu
79e706e5d9 Hook up the RoomThreadList to the RoomFlowCoordinator state machine and presenting threads. 2026-04-01 14:09:23 +03:00
Stefan Ceriu
64614cdfb5 Rename "Auxiliary" windows to "Secondary" windows 2026-03-31 20:33:33 +03:00
Stefan Ceriu
a41da0616c Fix which roomID is used when dismissing windows and unit test mocks. 2026-03-31 20:33:33 +03:00
Stefan Ceriu
d52f392758 Disable multiple windows when screen lock is enabled. 2026-03-31 20:33:33 +03:00
Stefan Ceriu
2b2b926fdc Clean up the window manager and its protocols 2026-03-31 20:33:33 +03:00
Stefan Ceriu
685d2d083c Dismiss a room's window when its flow finishes as there's no longer a reason for it to be alive. 2026-03-31 20:33:33 +03:00
Stefan Ceriu
b034fffb1f Close all secondary windows on logout 2026-03-31 20:33:33 +03:00
Stefan Ceriu
12b6b7ec74 Introduce support for multiple windows on mac and iPad OS
Once the app starts the WindowManager is configured with SwiftUI's environment OpenWindowAction. It can then be used to register coordinators (that provide the toPresentable view) and an optional flow coordinator (as most of the screens are part of a flow, especially rooms).
Once a coordinator is registed, the WindowManager invokes the OpenWindowAction which in turn makes the Application call its newly introduced WindowManagerWindowType WindowGroup's block to instantiate a new visual window rooting that view.

The WindowManager is also responsible for wrapping the presentable in a disappearance block and clean up the coordinator stack.

# Conflicts:
#	ElementX/Sources/Application/AppCoordinator.swift
2026-03-31 20:33:33 +03:00
Stefan Ceriu
26e659dce9 Add RoomThreadListScreen preview snapshots. 2026-03-31 18:21:14 +03:00
Stefan Ceriu
d27b6697a9 Introduce the RoomThreadListServiceProxy and expose it from the RoomProxy
Also update the sdk and app mocks and add a simple `RoomThreadListServiceProxyMock`

# Conflicts:
#	ElementX.xcodeproj/project.pbxproj
#	ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	SDKMocks/Sources/Generated/SDKGeneratedMocks.swift
#	project.yml
2026-03-31 18:21:14 +03:00
Mauro Romito
9e1545e3c1 added tests 2026-03-31 12:58:27 +02:00
Mauro Romito
7e00e9d6fe implemented the LiveLocationManager as part of the user session and setup of permissions in the plist. 2026-03-31 12:58:27 +02:00
Valere
2afac7857e call: Support voice only incoming call 2026-03-30 17:49:46 +02: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
Florian
5f724941ee Voice message: variable play back speed (#5121)
* Implement voice message variable playback speed

* Move playback speed string to Untranslated

https://github.com/element-hq/element-x-ios/pull/5121#discussion_r2822631371

* Address review feedback for voice message playback speed

- Persist voice message playback speed as an enum in AppSettings instead of storing an index.
- Update playback speed cycling to derive from enum allCases and safely fall back to `.default` if the stored value cannot be resolved.
- Apply runtime speed updates in AudioPlayer only when the player is in the `.playing` state.
- Keep MediaPlayerProviderTests formatting/indentation style intact while retaining mock playback speed setup.
- Regenerate preview snapshots for:
  - PlaybackSpeedButton
  - VoiceMessageRoomPlaybackView
  - VoiceMessageRoomTimelineView

* Move VoiceMessagePlaybackSpeed outside AppSettings, remove speedRatio

* Stabilize PlaybackSpeedButton width

* Sync voice-message speed label

- Add voiceMessagePlaybackSpeed to TimelineViewState and bind it from appSettings.$voiceMessagePlaybackSpeed.
- Pass that timeline-level speed into VoiceMessageRoomPlaybackView and use it for PlaybackSpeedButton, so labels update consistently across items.
- Use @EnvironmentObject in VoiceMessageRoomTimelineContent so the view re-renders when timeline context state changes.
- In WaveformInteractionModifier, add .allowsHitTesting(showCursor) to the cursor interaction view so hidden pre-playback cursor hit area does not steal taps from the speed button.
2026-02-19 22:40:31 +01:00
Mauro
cbeaaf02bb Session verification UI tests update (#5120)
session verification tests UI tests update
2026-02-18 10:57:04 +01:00
Doug
9b5099bd90 Re-write the space flow state machine configuration and cover it more in UI tests. (#5098)
* Use the old state machine configuration style.

* Test starting the space settings flow in UI tests.

* Test starting the create space room flow in UI tests.
2026-02-12 13:19:20 +00:00
Doug
6dc66ec777 Remove the global UserIndicatorController.alertInfo, replacing it with local alertInfo usage. (#5087) 2026-02-10 17:16:11 +00:00
Doug
77496934ce Use our own JoinRule type which doesn't include the reserved .private case. (#5056)
* Stop using Rust's JoinRule.private in mocks.

It isn't used anywhere else (see MSC4413 for more context).

* Use our own JoinRule (and AllowRule) types.

* Update ElementX/Sources/Services/Room/JoinRule.swift

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2026-02-06 13:54:53 +00:00
Skye Elliot
fdcf14f282 Display an icon in the room header for rooms with shared history (#5016)
* feat: Display an icon in the room header for rooms with shared history

* fix: Apply suggestions from code review

- Simplifies `isRoomHistoryShared` expressions using type inferrence.
- Adds failure messages to unit test.

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

* fix: Remove extension method in favour of field on configuration.

* fix: Distinguish between `shared` and `worldReadable` icons.

* refactor: Use `RoomHistorySharingState` enum with extension methods

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2026-01-30 13:11:10 +00:00
Mauro Romito
ff4e90465e implemented the logic to transfer ownership from a space 2026-01-28 15:42:17 +01:00
Stefan Ceriu
04053ae69b Update files following swiftformat upgrade 2026-01-27 12:50:57 +02:00
Doug
cdf615ae5f Remove the protocol for SpaceServiceRoom given its a struct type. (#5000)
* Remove the protocol for SpaceServiceRoom given its a struct type.

* Fix a few missed mocks in the unit tests.
2026-01-26 09:45:46 +00:00
Doug
06e1a71098 Make sure the selected/available rooms are updated when adding space children fails part way through. (#4997)
* Make sure the available rooms are updated if adding space children fails part way through.

* Additionally handle the case where removing rooms fails part way through.
2026-01-23 17:36:26 +00:00
Mauro Romito
80227edb04 updated the SDK and included the fix for leaving a space when the last owner of a non empty space 2026-01-23 17:49:07 +01:00
Mauro Romito
24f1c0c27f Implemented adding the room to the space after selection, and the editableSpace proxied API. Also updated and added tests. 2026-01-22 16:40:25 +01:00
Doug
ed892fee94 Add the empty state to SpaceScreen. (#4985)
* Rename PaginationState.timelineEndReached to PaginationState.endReached.

* Rename PaginationState to TimelinePaginationState.

Also renames PaginationStatus to PaginationState so that a TimelinePaginationState consists of the forward and backward pagination states.

* Add the empty state to SpaceScreen.

Only has 1 of the 2 buttons for now.
2026-01-22 12:37:34 +00:00
Stefan Ceriu
d1f1a598d5 Space filters (#4977)
* Add support for SpaceFilters on the SpaceServiceProxy level and a screen that renders them

* Add aliases to a couple of space room mocks

* Update translations and related snapshots

* Add a feature flag for space filters

* Add a new room summary provider filter that takes a list of room identifiers next to the normal state filters

This will take the SpaceFilter's descendants and combine it with the normal filters to reduce the rooms shown

* Add a new space filter button to the home screen and link it to the SpaceFiltersScreen and the actual RoomSummaryProvider room list filters

* Bump the RustSDK to v26.01.20-2 for SpaceFilter support.

* Add a cancellation button to the space filters screen

* Make the filter presentation mode liquidy, move the sheet to within the home screen.

* Address PR comments
2026-01-21 20:19:39 +00:00
Doug
2720791dc1 Replace a debugging visibility check with the real condition. (#4982) 2026-01-21 17:16:23 +00:00
Doug
e6efdf0e82 Include the Members and Add Rooms screens in the spaces UI tests. (#4981)
* Expand the space flow UI tests to include the add rooms screen.

Also fixes some failures in these tests due to the room/space title now being a button.

* Expand the space flow UI tests to include the space members screen.

* Reset AppSettings before running preview tests.
2026-01-21 15:24:54 +00:00
Doug
8da856e620 Add space management to the flows. (#4978)
* Add the menu entries to add/remove rooms to/from a space.

* Add a user indicator to SpaceAddRoomsScreen.

* Reset the SpaceRoomListProxy after adding/removing any children.

* Calm the animations down a bit when entering EditMode on the SpaceScreen.
2026-01-21 12:46:02 +00:00