Commit Graph

4940 Commits

Author SHA1 Message Date
Mauro Romito 61384f9986 Use the window scene initialiser for UIWindow in tests
UIWindow.init() is deprecated in iOS 26. AuthenticationStartScreenViewModelTests
now creates its fake window from the test host's connected scene, matching
ServerSelectionScreenViewModelTests.
2026-10-01 10:56:08 +02:00
Mauro Romito 26c417ae68 Move AlertInfo's button types out of the generic type
With Swift 6.4, the default value for AlertInfo.primaryButton warned that
T's Hashable conformance may be isolated and can't be used in a main
actor-isolated context. The nested AlertButton/AlertTextField types
don't depend on T, so move them to top level as AlertInfoButton and
AlertInfoTextField, and keep typealiases so existing call sites compile.

Constraining T to SendableMetatype isn't possible as the synthesized
Hashable conformances of our main actor-isolated alert enums are isolated.
2026-10-01 10:55:40 +02:00
Mauro 831234865b Fix Swift 6.4 warnings (#6240) 2026-10-01 10:55:19 +02:00
Mauro Romito 99c0fa5729 Title the forwarding screen "Forward to"
The forwarding screen now picks destinations for one or several
messages, so "Forward message" no longer fits. Use the common_forward_to
string from Localazy, as in the designs, and re-record its snapshots.
2026-09-30 17:40:55 +02:00
Stefan Ceriu b21d27dbbc Jump straight to notification tap and external deep link targets
Whether to animate a route was decided after resuming the client
services, by which time a notification tap or an external deep link
had already made the app active, so the user watched a navigation
animation from the room list. Read the app state as soon as the route
arrives instead, so these land directly on their target while routes
handled in the foreground keep animating.
2026-09-30 17:06:57 +03:00
Stefan Ceriu a87d65b05a Surface failed reactions as a send failure on their message
A reaction that fails to send can now block the room's send queue, but the
timeline only surfaced failures for the item itself, its edit or its
redaction. EventTimelineItemProxy.pendingSend now also falls back to our
first failed reaction, targeting it with SendTarget.reaction(key:), so the
message shows the red exclamation mark and the sending failed alert can
retry or remove it.

In-flight reactions are deliberately ignored so reacting doesn't flash a
sending indicator on the message.
2026-09-30 15:16:13 +03:00
Stefan Ceriu 4c71cae0f5 Open the room live when tapping the notification for its newest message
Tapping a message notification always opened the room on a timeline
focussed on that event, even when it was the newest message and the
live timeline already ends with it.

On tap, the notification manager now checks whether any other delivered
notification for the same room is more recent. If none is, the room is
opened live instead of focussed. Older notifications in a room keep
focussing on their event.
2026-09-30 14:50:04 +03:00
Stefan Ceriu 7973da8251 Throw from session directories and only fatal error when making sense. 2026-09-30 12:24:12 +03:00
Stefan Ceriu a8bc26dc93 Fix various UI test snapshot issues. 2026-09-30 12:23:54 +03:00
Stefan Ceriu 5a3c4ad2f5 Make the background app refresh task live in its own extension as well 2026-09-30 12:20:54 +03:00
Stefan Ceriu 49481f9af7 Add a search backfill app background processing task
To run when the device is idle, charging and connected to the network.
2026-09-30 12:20:54 +03:00
Stefan Ceriu d08b0e0090 Start a foreground search backfill request when entering the message search tab 2026-09-30 12:20:54 +03:00
Stefan Ceriu 790bf0a44e Adopt the new search backfill client interfaces. 2026-09-30 12:20:54 +03:00
Valere 8aae06d3ae Bump element-call-ios version to 0.1.0-rc.9 2026-09-30 08:20:36 +03:00
Stefan Ceriu ec4d1a3c04 Update some icons to use the primary accent color instead of tertiary for accessibility reasons. 2026-09-29 22:11:16 +03:00
Stefan Ceriu 0de6231399 Give search breadcrumbs a consistent row height
Query and room breadcrumbs reserved slightly different heights, and
rooms without a description collapsed further. Both now reserve the
space of a title and subtitle so every row lines up.
2026-09-29 21:53:04 +03:00
Stefan Ceriu a78e4f0c2a Add a clear all button to recent searches
Lets users wipe their whole search history at once from the recent
searches section header, as per the designs.
2026-09-29 21:53:04 +03:00
Stefan Ceriu 50b38555b6 Allow removing individual search breadcrumbs
Each recent search now has a trailing close button to remove it from
the history. The view action is logged without its payload so removed
queries don't end up in the logs.
2026-09-29 21:53:04 +03:00
Stefan Ceriu 313365ad83 Only record query breadcrumbs when the search is submitted
Queries were previously stored whenever a result was selected, which
meant half-typed queries ended up in the history. Now a query is only
recorded when the user submits the search field, while selecting a
result only records the room.
2026-09-29 21:53:04 +03:00
Stefan Ceriu bc018251c7 Update translations to bring in action.clear_all 2026-09-29 21:53:04 +03:00
Stefan Ceriu 1464a98ef0 Split the description of the new "Show all activity" notification setting 2026-09-29 21:36:44 +03:00
Mauro Romito e6bd8b0eb9 Fix the build after the translations update
The translations update removed screen_room_confirm_removal_message, as the redaction confirmation now asks the question in its title ("Remove message?"), matching Element X Android. Drop the message from RedactConfirmationView and re-record the previews whose copy changed.
2026-09-29 20:05:14 +03:00
Element CI dcaa2dffdb Translations update 2026-09-29 20:05:14 +03:00
Mauro b1ed870474 Support for Xcode 27 on CI (#6217)
* Run the tests on iOS 27.0

Bump the required simulator OS in the preview, UI and Compound tests, and the CI tool's default OS, from 26.5 to 27.0. Test devices stay the same.

iOS 27 writes transcoded videos 146 bytes larger, so update the expected sizes in MediaUploadingPreprocessorTests.

* Build and test on CI with Xcode 27

Select Xcode 27 in ci_common.sh and move every macOS workflow to the xcode-27 runner image, as macos-26 doesn't include Xcode 27. The Compound workflow now also creates its simulator on the iOS 27.0 runtime.

The xcode-27 runners are slower, so give the unit, Enterprise, Compound and snapshot recording jobs longer timeouts.

* Fix the preview snapshot layout on iOS 27

On iOS 27 the hosting controller applies the window's safe area when rendering, but the snapshot size comes from sizeThatFits, which ignores it. Component previews were shifted down and clipped at the bottom. Disable the hosting controller's safe area regions for these snapshots so the measured and rendered layouts match.

swift-snapshot-testing also renders into a window without a scene, and on iOS 27 a navigation stack in such a window reserves space for a large title it never shows, leaving a gap below the navigation bar. Attach the render window to the app's scene until swift-snapshot-testing handles it.

The invite users and add rooms screens sized their selected items row from a measured width stored in state, which is zero on the first layout pass, so snapshots could draw the row empty. Use containerRelativeFrame instead. The add rooms search previews now also wait for their results, and the search previews that show a clear button get a small precision tolerance, as it renders inconsistently in snapshots.

* Re-record the preview snapshots on iOS 27.0

Recorded on an iPhone SE (3rd generation) simulator running iOS 27.0 with Xcode 27.0 (27A266a). The changes come from iOS 27 rendering: text anti-aliasing, hyphenation and line breaking, navigation bars and toggles that now render in snapshots, lazy stacks that were blank on iOS 26, and pseudo-language locale formatting.

* Fix the UI tests on iOS 27

iOS 27 no longer exposes accessibility identifiers on SwiftUI menu items, so the space exploration test now finds them by label within the menu. On iPad, the start chat search field keeps focus after submitting and can swallow the next tap, so retry the tap if the create room screen doesn't appear.

* Re-record the UI test snapshots on iOS 27.0

Recorded on iPhone 17 and iPad (A16) simulators running iOS 27.0 with Xcode 27.0. The changes come from iOS 27 styling, like the keyboard height and glass borders. This also removes the iPad app lock setup snapshots, which have been orphaned since those tests stopped running on iPad.

* Fix the accessibility tests crashing on iOS 27

The accessibility tests' previews wrapper kept its ImageRenderer alive across the awaits that follow the render. On iOS 27, releasing it at that point tears down its view graph outside of a SwiftUI update, which hits an assertion and crashes the app. Release the renderer as soon as the image has been rendered.

* Keep the accessibility tests' image renderers alive on iOS 27

Releasing the ImageRenderer straight away wasn't enough: on iOS 27, releasing one that rendered a preview crashes SwiftUI whichever context it happens in. Keep the renderers alive instead. Each test launches a fresh app, so they only live for the one test.

* Share the UI tests' app settings with their mock user session

Since the user session flow reads its settings from UserSettings, the UI tests' mock user session was wrapping a fresh volatile AppSettings instead of the one the tests configure. The flags that skip onboarding weren't picked up, so every user session UI test got stuck on the notifications permission screen.

* Re-record the Compound snapshots on iOS 27.0

Apply the same safe area fix as the app's preview tests, so size-that-fits snapshots aren't clipped on iOS 27, and re-record the snapshots on an iPhone SE (3rd generation) simulator running iOS 27.0 in English (US).

* Fix a race reading the keyboard in the accessibility tests

On iOS 27 the QR code login screen's keyboard can be dismissing between checking that it exists and reading its frame, which fails the test. Snapshot it in a single query instead.
2026-09-29 17:02:48 +02:00
Element CI 90425460f9 Bump the calendar version ready for the next release 2026-09-29 16:30:46 +02:00
Danny d74d53e4ee Extend the room details screen hook (#6173)
* Allow Enterprise sections in room details

Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>

* Update the Enterprise submodule and strings

Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>

---------

Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
2026-09-28 12:11:23 -06:00
Stefan Ceriu e51d869fdc Adopt the new send queue interfaces 2026-09-28 15:36:52 +03:00
Copilot 690f2be5f4 Resume app lock continuation after forced logout (#6199)
* Initial plan

* Resume app lock continuation on forced logout

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

* Add regression coverage for forced logout verification

Co-authored-by: Velin92 <34335419+Velin92@users.noreply.github.com>

* Revert "Add regression coverage for forced logout verification"

This reverts commit 64cda7c665ab5ca736110d606250c26e22234619.

Co-authored-by: Velin92 <34335419+Velin92@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
Co-authored-by: Velin92 <34335419+Velin92@users.noreply.github.com>
2026-09-28 12:28:01 +02:00
Doug 07b8d1fcb9 Update the Enterprise submodule. 2026-09-28 13:04:37 +03:00
Doug a948e2d3aa Rebase on develop. 2026-09-28 13:04:37 +03:00
Doug c0469e681f Fix unit tests. 2026-09-28 13:04:37 +03:00
Doug fccad5fc30 Replace AppSettings with UserSettings from the UserSessionFlow and below.
Remove some redundant injections when passed alongside a user session too.

# Conflicts:
#	ElementX/Sources/Screens/PinnedEventsTimelineScreen/View/PinnedEventsTimelineScreen.swift
#	ElementX/Sources/Screens/Timeline/TimelineViewModel.swift
2026-09-28 13:04:37 +03:00
Doug 54cc1cba60 Add a new AccountSettings type and compose it with AppSettings into UserSettings.
The new type doesn't contain any settings yet.
2026-09-28 13:04:37 +03:00
Stefan Ceriu 44fb05f489 Make Sentry and PostHog default settings explicit
... and clearly disable the intrusive ones
2026-09-28 11:04:22 +03:00
Stefan Ceriu 9205e11193 Bump the RustSDK to v26.09.25 2026-09-25 17:16:57 +03:00
Mauro ad1d7a3010 Add multi selection to the Forward action (#6190)
* Start message selection from the Forward action

Behind the multi-select developer option, choosing Forward on a message
now starts a selection with that message checked, instead of the
dedicated Select menu action which is removed. Only forwardable
messages can be selected: remote, decrypted, non-redacted events that
aren't state, unsupported, poll or live location items.

The chrome follows the Figma exploration: the room header stays, an X
in the trailing toolbar position ends the selection, rows show only the
checkbox (no highlight, 10pt gap to the bubble), and the composer is
replaced by a single primary "Forward N messages" button. The limits
are now 10 messages into 5 rooms.

Tapping the button forwards the selection in timeline order, never in
the order the messages were tapped. MessageForwardingItem carries
several contents and the forwarding screen sends them one after the
other per room, reporting a single error toast on partial failures.
The selection is kept while the forwarding screen is open so cancelling
it returns to the selection; it is cleared by the flow coordinator once
the messages are sent, or by the X in the timeline.

New plural action_forward_messages lives in Untranslated for now;
action_select and screen_room_selection_count are no longer used.

* Tidy the selection code after review

Reuse ToolbarButton's cancel role for the selection's toolbar item so it
matches the other screens on every OS version, and disable the room
header while selecting so the room details can't cover the selection.

Move the forwardable/selected item helpers next to the existing
nonisolated array extension, drop the unused MessageForwardingItem
initialisers and the single-item makeForwardingItem overload, and
simplify the forwarding loop now that a room either sends or isn't
reachable.

The action bar preview builds its own view model instead of putting
the shared mock into selection mode for every later preview, and a
test locks that Forward keeps forwarding directly in the pinned
timeline.

* Select messages to forward from the pinned timeline too

Forward is offered in the pinned events timeline, so with the flag on
it starts a selection there as well, with the same cancel item in the
toolbar and the same forward button at the bottom. Forwarding from
that sheet already dismisses the whole sheet, so the selection is
discarded with it. Only the media timelines keep forwarding a single
item directly.

* Confirm with a toast when messages are forwarded to several rooms

When a single room is picked the flow opens it, which is confirmation
enough. When several rooms are picked the user stays in the origin room,
so a "Messages forwarded" toast tells them it worked, as in the designs.
The new screen_room_message_forwarded / screen_room_messages_forwarded
strings live in Untranslated for now.

* Apply review suggestions to multi-message forwarding

Strings
- The forward button and the multi-room toast now use the Localazy
  plurals action_forward_messages and screen_room_messages_forwarded;
  the toast shows the count. The Untranslated copies and the unused
  action_select are gone.

Selection
- Drop the dead startSelection view action and the redundant
  canSelectMessages guard; tests start a selection through Forward
  like the app does.
- Remove two comments on the selection state that restated the code.

Forwarding
- After a send, clear the selection in the room and any open thread
  instead of working out which one started it; only one can be
  selecting at a time.
- Explain that stickers are excluded because the SDK can only forward
  m.room.message content.

* Rename the timeline selection to message selection

"Selection" alone was too generic in a timeline that also has text and
room selections. The selection state, toolbar, action bar and
accessibility types, the timeline state's property, the view actions
and the public clear method now say "message selection". Private
helpers keep their short names.

* Rename MessageForwardingItem to MessageForwardingPayload

The type now carries several messages, so "item" no longer described
it. The factory method and the variables and action labels holding it
follow the new name.
2026-09-25 11:51:14 +00:00
Stefan Ceriu fc8ee9d93d Room list notifications tweaks (#6106)
We decided against changing how unread activity is rendered in the room list, so the experiment and its developer option are no longer needed.
we have also added a notification settings entry for hiding the room list gray dots.
2026-09-25 13:36:33 +03:00
Stefan Ceriu cc07e07833 Fix UI test snapshots
after enabling room list badge counts and changing the rail trailing padding.
2026-09-25 12:13:08 +03:00
Doug 1b12955fa6 Handle unexpected user status emoji values gracefully. 2026-09-24 20:56:25 +03:00
renovate[bot] c2f1dcc024 Update codecov/codecov-action action to v7.1.1 2026-09-24 15:50:34 +03:00
Stefan Ceriu 12d937a5a8 TabRail layout fixes (#6172)
* Attempt another TabRail layout fix by just keeping it visible all the time
* Move one of the sidebar dividers to the tab rail.
2026-09-24 15:47:46 +03:00
Stefan Ceriu 5e56bf3468 Enable the search index store for the authentication client too 2026-09-23 18:37:42 +03:00
Stefan Ceriu df3bdb992a Share the test passphrase through a RestorationTokenFixtures enum.
The legacy restoration token formats store the passphrase as a base64 string
whereas the current one exposes Data, so keep both representations of the
same value in one place instead of repeating the conversions in every test.
2026-09-23 18:37:42 +03:00
Stefan Ceriu b1923b418f Expose the store passphrase as Data instead of a base64 string. 2026-09-23 18:37:42 +03:00
Stefan Ceriu 18201ac248 Switch all clients to the new .highEntropyPassphrase mechanism.
Which will automatically migrate the existing passphrase and allow us to later
switch directly to the raw key everywhere.

More details on https://github.com/matrix-org/matrix-rust-sdk/pull/6878
2026-09-23 18:37:42 +03:00
Stefan Ceriu c8250f6aa4 Tweak the BuildSDK command line tool now that ElementCall also links the SDK 2026-09-23 18:01:39 +03:00
Stefan Ceriu 8572150b70 Remove the room list notification count feature flag.
The room list now always shows the unread notification count for highlighted rooms
and the app icon badge always uses the SDK's own unread notification count, both in
the app and in the NSE. The push payload's unread count is no longer used, so its
UNNotificationContent helper and user info key have been removed along with the
setting, its developer options toggle and the feature-disabled unit test.
2026-09-23 17:57:42 +03:00
Stefan Ceriu 2e7d78ea01 Remove the automatic back pagination feature flag.
Automatic back pagination is now always enabled when building the client, so the
setting and its developer options toggle have been removed.
2026-09-23 17:57:42 +03:00
Stefan Ceriu 8f4a0322b7 Update project and package.resolved following dependency updates and failed CI step 2026-09-23 15:46:25 +03:00
renovate[bot] 5811f38357 Update Project Dependencies (#6185)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-23 12:41:09 +01:00