* 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
* 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>
* 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>
* Revert "Do not show history visible banner when the user cannot send messages. (#4892)"
This reverts commit 6117ee3a2b.
* Revert "Add a banner to encrypted rooms with visible history. (#4851)"
This reverts commit ae38dc54d4.
* 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.
* Add a banner to encrypted rooms with visible history. (#4738)
* feat: Add history visible alert.
- Adds a dismissable alert that is displayed whenever the user
opens a room with `history_visibility` != `joined`. When cleared,
this is recorded in the app's data store.
- When opening a room with `history_visibility` = `joined`, this
flag is cleared.
Issue: element-hq/element-meta#2875
* tests: Add unit tests for history sharing in `RoomScreenFooterView`.
* feat: Rename flag to `hasSeenHistoryVisibleBannerRooms`, document.
* refactor: Merge enum variants, use function for banner description.
* feat: Use `AppSettings.historyVisibleDetailsURL` over hard-coded value.
* tests: Correct potential race condition with deferred assertion.
* chore: Use Localazy translation string over project-defined.
* fix: Final tweaks and review comments.
* chore: Checkout `Enterprise` submodule.
* tests: Final fixes.
* fix: Condition banner visibility on feature flag state.
* fix: Prioritise identity violations over history visibility banner.
* tests: Add snapshots for history visible banner.
* tests: Use deferred failure timeout for improved test power.
* chore: Tweaks to spelling, simplify state logic.
* fix: Remove "g".
* fix: Show banner for shared/world-readable rooms, not invited.
* refactor: Use `else-if` instead of `if`.
* feat: Add history visible alert.
- Adds a dismissable alert that is displayed whenever the user
opens a room with `history_visibility` != `joined`. When cleared,
this is recorded in the app's data store.
- When opening a room with `history_visibility` = `joined`, this
flag is cleared.
Issue: element-hq/element-meta#2875
* tests: Add unit tests for history sharing in `RoomScreenFooterView`.
* feat: Rename flag to `hasSeenHistoryVisibleBannerRooms`, document.
* refactor: Merge enum variants, use function for banner description.
* feat: Use `AppSettings.historyVisibleDetailsURL` over hard-coded value.
* tests: Correct potential race condition with deferred assertion.
* chore: Use Localazy translation string over project-defined.
* fix: Final tweaks and review comments.
* chore: Checkout `Enterprise` submodule.
* tests: Final fixes.
* implemented focussing a threaded event through the banner tap
* view in timeline implementation for threaded events
* added a test and improved the existing one
* pr suggestions
* put the logic for fetching the event in the view models
* Use the SDK's offline state to drive the offline indicator.
* Only use network reachability for restarting the sync loop, use the homeserver reachability for requests.
* Add a separate indicator to distinguish when the server is unreachable but the device is online.
* Use the newly RoomInfo published PowerLevels; update permissions at the same time as the room info and avoid unnecessary async calls.
* Introduce a RoomInfoProxyProtocol and associated mock and move away from mocked SDK RoomInfos
* Bump the SDK to v25.06.23
* Expose new non-throwing methods for checking one's own user permissions
* Fix the unit and preview tests (except the TimelineMediaPreviewDetails for which simplified snapshots were generated)
* Converge on one single implementation for computing a room's avatar.
* Fix more unit tests
* Fix the TimelineMediaPreviewDetailsView snapshot tests
This reverts commit 9b6c819e611ad2fa3de2c34a4a7aa556fc9faadd.
---------
Co-authored-by: Doug <douglase@element.io>
This patch introduces a new RoomPowerLevelsProxy and its associated mock and adopts newer Rust APIs to make working with user power levels and permissions easier.
* 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.
* WIP RequestToJoin struct
* implemented the logic to display the cells
* knock request banner accept flow
* mark all knocks as seen implemented
* details logic
* implemented accept, decline and ban in the list
* added a loader and modified the stacked view
of the banner
* pr suggestions
* updated naming and loading strings
* added the initial loading state
improved code and the tests
* updated a string that has changed
* code improvement
* tests for the room screen view model
* room details tests
and improved the knock requests tests for the room screen
* knock requests list tests
* added error state alerts with retry
* struct has been renamed on the sdk
so I renamed it also on the app side
* update SDK
* Adopt new reaction toggling API introduced in matrix-org/matrix-rust-sdk/pull/4127
* Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4111: use the new `TimelineUniqueId` type instead of `String` for unique timeline identifiers.
* Bump the RustSDK to v1.0.58.
* Fix unit tests
- Fix warning on single case enum.
- Remove unused subjects.
- Fix a lint warning.
- Remove unused success value.
- Fix warning about position of try await.
- Add a note about the common tracing configuration.
- Show an indicator when resolving a send failure fails.
- Make sure the whole row is clickable in the GlobalSearchScreen.
* Use native video call picture in picture!
* Handle isSupported, isPossible and web view errors.
* Use new canEnterPip method.
* Hide a room's Call button when already joined to the call.
* Tweak feature flag description.
* PR comments.