Commit Graph

948 Commits

Author SHA1 Message Date
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
Mauro
fda19a0273 Improved Defer Fulfillment (#5127)
* improved defer fullfillment

* applied also for async streams

* fix xcodeproject

* better documentation

* restict deferFulfillment  only for Publisher which can never fail
2026-02-20 17:21:35 +00:00
Mauro Romito
1bb0a8c136 removed unused import and fixed tests for swift testing 2026-02-19 22:40:31 +01: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
173b39a07f Swift Testing for Unit Tests PART 1 (#5119)
* migrated a lot of unit tests to Swift Testing and added a new implementation for deferred fulfillment

more tests migration

Cleaned the code manually to establish some good patterns

more code improvements

some more code improvements

removed empty tests

update project

* more pr suggestions and cleanups

* removed the TestSetup pattern

* fixing claude not reusing tests

* pr suggestion + added indent rule to swiftformat so that we can prevent AIs to change that
2026-02-19 16:20:47 +01:00
Mauro
77c88a817a Compound - Swift 6.2 and Main actor isolation (#5109)
* compound is now using 6.2 and main actor isolation + some tweaks to make it build tests and EX

* better handling of the nonisolated context for CompoundUIColors

* improving docs

* fix comment

* remove unused Sendable conformance
2026-02-16 10:19:12 +00:00
Doug
46be78bc75 Define the notification sound name in AppSettings. (#5106) 2026-02-13 16:36:45 +00:00
Stefan Ceriu
4ec2516d55 Update the RustSDK and adopt the new tracing configuration that allows maximum size and age limits on all logs.
Set that 100Mb and a week and remove previous rageshake uploading checks as they are no longer required.
2026-02-13 18:00:23 +02:00
Skye Elliot
293f99d5bc Add history sharing badges to room details (#5043)
* chore: Add dependency `SwiftFlow` for use in avatar header badges.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* feat: Display history sharing pill in room details.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* tests: Add tests for history sharing room details pill.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* tests: Update screenshots for RoomDetailsScreen preview tests.

* fix: Use Localazy translations for room details badges

* fix: Address review comments

* fix: Remove line limit from room details badges

---------

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-02-11 12:22:39 +00:00
Doug
6dc66ec777 Remove the global UserIndicatorController.alertInfo, replacing it with local alertInfo usage. (#5087) 2026-02-10 17:16:11 +00:00
Mauro Romito
3a499e44eb always present the space selection even for pre selected spaces 2026-02-10 13:28:55 +01:00
Doug
6e42071cbe Automatically dismiss UserDetailsEditScreen when saving changes. (#5073) 2026-02-09 15:07:50 +00:00