Commit Graph

4954 Commits

Author SHA1 Message Date
renovate[bot] 27649153f2 Update zizmorcore/zizmor-action action to v0.7.1 2026-10-23 09:29:54 +02:00
rene.schakmann dab9462d04 Make MessageTextView its own layout manager delegate
Replaces the shared CodeHyphenationLayoutManagerDelegate with an
NSLayoutManagerDelegate conformance on MessageTextView, as it's already
the delegate for its gesture recognizers and pills. The layout manager
only holds its delegate weakly and the text view owns the layout manager,
so no shared instance or stored property is needed.

The code block test now uses a <pre> without a nested <code>, so it
actually covers the CodeBlock check rather than passing through the
InlineCode one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:21:36 +02:00
rene.schakmann 21dd4082f4 Stop hyphenating code when it wraps in the timeline
When a word in inline code (or a code block) is too long for the line,
TextKit breaks it with an inserted hyphen, so commit hashes, UUIDs and
identifiers render with characters that aren't part of the code.

Disabling hyphenation through the paragraph style has no effect on this
fallback, so MessageText now sets an NSLayoutManagerDelegate that refuses
to hyphenate before any character marked as code. Code wraps by character
instead while regular message text keeps its existing behaviour.

The delegate is a shared instance rather than a stored property on
MessageTextView: UITextView(usingTextLayoutManager:) skips the subclass's
stored property initialisers, so such a property would be nil.

Fixes #5725

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:21:36 +02:00
renovate[bot] b21eecec1b Update zizmorcore/zizmor-action action to v0.7.0 2026-10-22 13:34:07 +03:00
Mauro Romito 02a95c0097 Always start a message selection when forwarding
Multi-select forwarding is ready to ship, so Forward from the message menu now
always starts a selection in the room, thread, focused and pinned timelines.
Media timelines still forward the single item straight away.

Removes the messageMultiSelectEnabled setting and its developer option, the
selection state's isEnabled gate and the publisher that kept it in sync, the two
unit tests that only covered the flag, and the preview setup that switched it on.
2026-10-22 10:21:58 +02:00
Mauro Romito c2f99ab646 Show calls as missed while another call is ringing or ongoing
Like Android, a call that comes in while another one rings, or while a web view call runs, no longer rings: it's reported to CallKit as missed so it shows in Recents. An ongoing native call is left alone, since CallKit tracks it and offers its own call waiting. A second push for the ring that's already ringing is reported as handled, without a missed entry.

An answered call that never opens (e.g. its room isn't joined) is dropped when its call session is torn down, so it can't block later calls. The unanswered timeout is now cancelled as soon as a call is answered, rather than a second later, when it may already belong to a call that rang since.
2026-10-21 15:16:08 +02:00
Element CI 0050f923c6 Prepare next release 2026-10-21 05:50:56 -07:00
Doug 1621340a9d Fix the settings button not being visible to VoiceOver. 2026-10-21 14:37:57 +02:00
Mauro Romito a55e1a278f Fix timeline scroll buttons growing too large with Dynamic Type
CompoundIcon already scales its size with Dynamic Type, but the chevron
was given a size that was itself a @ScaledMetric, so it scaled twice:
the button reached about 202pt at the largest accessibility size, more
than twice the composer's mic button.

Pass the base icon size and scale the icon, its padding and the badge
once, relative to headingLG like the composer buttons. The button now
keeps its proportions at every size (72pt at the largest, mic 88pt)
and is unchanged at the default size.
2026-10-21 14:07:14 +02:00
Mauro Romito b3e4a79b2c Strip location data when any image in a file has it
Only the first image was checked for GPS before stripping, so a file
whose later images carried a location, but not its first, was sent
unchanged with that location. Every image is checked now.

GPS stored only in XMP was already caught, because ImageIO reports it
in the image's GPS properties.
2026-10-21 14:02:23 +02:00
Mauro Romito 3a4a7e7cf9 Keep spatial photos spatial when stripping location data
Spatial photos pair their images in a stereo group. ImageIO only writes
that group from the properties each image is added with, so re-encoding
a photo to remove its location dropped the pairing, and the photo was
sent as a flat one with hidden extra images.

Each image is now added with its stereo group again, read from the
source's container properties, so the left, right and monoscopic images
keep their roles along with the group's disparity adjustment. ImageIO
ignores the group's image index keys and anything it can't write, so the
group is passed on as it is.
2026-10-21 14:02:23 +02:00
Doug 526b86874d Fix a potential crash when creating a new room. (#6378)
Update the Enterprise submodule.
2026-10-21 11:58:32 +01:00
Rene Schakmann 74b6c234b3 Keep HDR gain maps when stripping location data from images (#6371) 2026-10-21 11:19:53 +02:00
renovate[bot] 13803ccc3f Update dependency siteline/SwiftUI-Introspect to v27.1.0 (#6377)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-21 10:04:42 +01:00
Element CI 7b65bf0770 Prepare next release 2026-10-20 08:40:12 -07:00
Doug ad14cc0b55 Add support for QR code task cancellation. (#6373)
* Add support for cancelling QR code operations.

* Send QR code screen cancellations back to the SDK.

* Add tests for cancellation.
2026-10-20 14:42:37 +00:00
Mauro Romito 80552f9a6c Bump the RustSDK to v26.10.20
Brings in event cache fixes: no automatic back-pagination for spaces
and non-joined rooms, and rooms shrink again after background
back-pagination.

matrix-rust-sdk: 56bc59112822e7eb25943a95e02502855cdeef2d
2026-10-20 16:39:18 +02:00
Mauro Romito fd52027ac3 Open the sign-up page when creating an account with OAuth
Create account sent prompt=consent, the same as Sign in, so MAS opened its
sign-in page and new users were asked for a password they didn't have.

The create prompt was turned off because MAS used to sign you straight into
an existing browser session (element-hq/matrix-authentication-service#3429).
MAS v0.15.0 fixed that by always showing its consent page, so send
prompt=create again for registration, but only when the server advertises it.
2026-10-20 14:21:28 +02:00
Mauro Romito d495f937b6 Show the open eye while the recovery key is hidden
The eye button shows what tapping it will do, so a hidden key shows the
open eye. This restores Compound's original icon order.

Re-record the recovery key screen and the encryption settings out-of-sync
UI test snapshots for the new field.
2026-10-20 10:53:29 +02:00
Mauro Romito 155e478a77 Add an eye button to show the recovery key while entering it
The recovery key field now uses Compound's secure text field style, which
adds the show/hide button Android already has. Autocapitalisation and
autocorrection are off so a revealed key isn't altered while typing.

Compound's eye icon now shows a crossed eye while the text is hidden and an
open eye while it's shown, matching Android and Compound web.
2026-10-20 10:53:29 +02:00
Mauro Romito 2fb5c4c316 Stop live location shares when they expire, even without location updates
Expiry was only checked when a location update arrived. A phone that
doesn't move gets none, so an expired share kept GPS, the location
indicator and the room banner on.

Each account's service now schedules one task for the next share to
expire, rescheduled whenever its shares change and re-armed if the wall
clock lags behind the sleep. Shares that expired while the app wasn't
running are dropped when the service starts. Time comes from an
injected TimeProvider so the tests drive it with ManualClock.

Closes #6367
2026-10-20 10:45:14 +02:00
Mauro Romito 3e9f44e944 Keep live location shares when the location isn't found yet
Core Location reports CLError.locationUnknown when it can't get a fix
straight away and keeps trying, but didFailWithError stopped every
account's shares on any error. Ignore that one error and keep stopping
on real failures such as .denied.

Closes #6366
2026-10-20 10:45:14 +02:00
Stefan Ceriu 9bcb105d2b Bump the RustSDK to v26.10.19
Which brings in search speed improvements and a session verification fix (among
other things).
2026-10-19 20:02:06 +03:00
Doug 1ce7501e1b Finish splitting the App/User hooks. (#6348)
* Remove the homeserver parameter from user hooks.

* Split the OAuthPresenter hook into two.

With one living directly on the UserHooks.

* Add developerOptionsScreenHook to the UserHooks.

* Remove appHooks from the flowParameters.
2026-10-19 16:28:18 +01:00
Stefan Ceriu 066e806c13 Start the SAS verification when the other device accepts our request
Element X Android doesn't start SAS after accepting a request, so iOS
requests to it never progressed. Either side may start per the spec and the
SDK resolves the conflict if both do.

Requires the SDK change making `didAcceptVerificationRequest` fire only on
the requesting side.
2026-10-19 18:21:59 +03:00
Mauro 626ea29868 Share live location per account (#6346)
* Store live location shares per account

The active shares were stored for the whole app, so with several accounts signed in every account's manager ran location updates and tried to send to every shared room, and could stop another account's share. They now live in the account settings and are migrated to the first account restored.

* Share one location manager between accounts

Each user session now has a LiveLocationService with its own shares, while a single app-level LiveLocationManager owns the CLLocationManager, runs location updates while any account shares, hands each location to the sharing accounts and mirrors the authorization status into every service. Signing out stops the account's shares before logging out, so other people don't keep seeing a frozen live location.

* Publish the live location shares migrated into an account

Sessions are built before the migrations run, so the account's live location service had already read an empty list of shares and the raw migration didn't tell it about the moved ones. An upgrade during a share left it showing as sharing without sending anything until the next launch. The migration now sets the value again once moved, which publishes it.

* Don't migrate the live location shares

Sessions are built before the migrations run, so a migrated share wouldn't resume until the next launch without re-publishing the value. That isn't worth the extra code for a rare case: a share running during the update just stops sending until it expires.

* Apply review suggestions to live location sharing

- Keep the live location shares with the other session activity settings instead of in their own section.
- The LiveLocationManager now remembers that Always authorization was requested; the services only check the flag before asking.
- Rename the manager's helpers to isSharingChanged(_:for:), syncLocationUpdates() and process(_:).
- Clarify the doc comments on the service's action and authorization status.

* Rename the notification manager's action handler to process

Matches the LiveLocationManager and what view models call it.
2026-10-19 15:08:40 +00:00
Mauro Romito 06e71f796d Remove the redundant biometric refresh calls from AppLockService
The biometric state hash now comes from LAContext.domainState, which
unlike the deprecated evaluatedPolicyDomainState doesn't need
canEvaluatePolicy to be called before it can be read. Drop
updateBiometrics() and make LAContextMock return its values directly
instead of waiting for a policy evaluation.
2026-10-19 15:12:53 +02:00
Stefan Ceriu 031e99e208 Update search screen snapshots 2026-10-19 14:50:28 +03:00
Stefan Ceriu 8055f59b13 Remove formatting from search result bodies 2026-10-19 14:50:28 +03:00
Stefan Ceriu 40d991f256 Move search screen translations to localazy 2026-10-19 14:50:28 +03:00
Mauro 3216713c45 Replace the deprecated biometric domain state in AppLockService (#6243) 2026-10-19 12:53:50 +02:00
Element CI 9f34176edc Translations update 2026-10-19 12:24:26 +02:00
Stefan Ceriu 1f144393bd Adopt latest SwiftFormat rules
Introduced in 0.64.0: repeatedGuard, nestedIf and extensionAttributes
2026-10-19 10:41:08 +03:00
Stefan Ceriu 87f6b1379b Fix the space exploration UI test on iPad
The tab rail used in regular width on iPad is a custom view and never applied the tabs' accessibility identifiers, so UI tests couldn't find its buttons. Apply them to the rail's buttons the same way the TabView layout does.
2026-10-19 08:55:46 +03:00
Element CI 734c0678fa Prepare next release 2026-10-16 08:35:32 -07:00
Doug 4b948fe108 Handle an API change where QR code logins now return a task. (#6354)
Quick workaround for now, proper task cancellation will follow.
2026-10-16 16:20:51 +01:00
Mauro Romito 074a2d7910 Remember seen invites per account
Seen invites were stored for the whole app, so an invite seen by one account showed as seen in another account invited to the same room. They now live in the account settings, are migrated to the first account restored and are wiped when signing out.
2026-10-16 11:45:57 +02:00
Element CI fac5f345fb Prepare next release 2026-10-16 02:38:21 -07:00
Valere c6d21dcd7f Bump element-call-ios to 0.1.0-rc.11 and the Matrix Rust SDK to 26.10.15
element-call-ios 0.1.0-rc.11 needs the SDK's 26.10.15 widget
capabilities, and brings matrix-rust-rtc 0.5.0-rc.5. The SDK drops
Room.roomEventsDebugString, whose mock goes with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:28:37 +03:00
Valere d33dc058c2 Report native calls that end without us to CallKit
The call package now says why a call ended. Only our own hang-up is an
end call action; a call the other side declined or left, that nobody
answered, or that failed is reported to CallKit with that reason, so the
call log no longer shows it as one we ended, and no end action comes back
to hang up a call that is already over.

Also adopts the package's other host changes: the voice call icon beside
"Calling…", and the call's large avatar rendered at the 140 pt it is
drawn at.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:28:37 +03:00
Mauro 268d6c8ead Notify every signed-in account and turn notifications on and off per account (#6337)
* Store the notifications switch per account

Adds AccountSettings.enableNotifications and moves the app-wide value into the signed in accounts before they're restored: the first account takes it out of the app settings and the others get the same switch, so someone who turned notifications off keeps them off.

* Add a notification service to every user session

Each account's NotificationService sets its pusher when its notifications are on and deletes it when they're off (appending with multiple accounts), keeps the account's unread count and decides which of its delivered notifications to clear. It asks the NotificationManager, the only owner of the notification center, through actions: remove the notifications matching a rule, request authorization and the unread count. The UserSessionManager connects every live session's service to the manager, and flows and screens use the session's service instead of the manager, which leaves the flow parameters.

* Route notifications by account

Taps only open rooms of the active account for now, a tap made while restoring only opens once its account is the active one, replies are sent from the account they were made for, and signing out only clears that account's notifications unless it was the last one. The notification extension hides pushes for an account that signed out while other accounts are still signed in.

* Turn notifications on and off for each account

The notification settings switch is now saved per account, and each account's NotificationService sets or deletes its pusher when it changes, asking for permission when it's turned on.

* Apply review suggestions to multi-account notifications

Migration
- Move the notifications switch with a single per-account migration, like 26.10.1 and 26.10.2, and drop its dedicated test.

Notification manager and service
- Follow each account's badge count publisher directly, removing the badge count action and the stored counts.
- Only reset the badge and unregister from APNs when the last account signs out, as each account already clears its own notifications.
- Set up the service's subscriptions in a single setupSubscriptions().
- Rename switchChanged(to:) to enableNotificationsChanged(to:) and pusherConfiguration(identifiers:) to pusherConfiguration(for:).
- Build the service without hopping to the main actor, it already runs there.

Notification service extension
- Check the account's switch in NotificationHandler using the session's settings, and log an error when a push arrives for an account that's turned off.
- Always show pushes that match no signed-in account and log an error, so a broken setup stays visible.

Other
- Store a pending inline reply in a PendingInlineReplyDetails struct.
- Assign the chats tab badge with weakAssign.
- Make PusherConfiguration Equatable so the pusher test checks it in one expectation.
- Clarify the comment about notifications without a receiver.

* Print instead of logging before the app hooks run in the NSE

A push that matches no signed-in account goes back to printing, as MXLog shouldn't be used before the app hooks have run. The push is still shown so a broken setup stays visible.
2026-10-15 13:10:26 +02:00
Mauro Romito 09ecec4306 Ignore repeated confirms on the server selection screen
Tapping Continue and then the keyboard's Done key (or double tapping
Continue) started two server configurations. With a password-only server
both asked the flow to show the login screen, and the second request hit
the authentication state machine's unexpected transition fatalError.

Keep the running confirmation task and ignore further confirms until it
finishes, so the flow continues once. The guard clears afterwards so
confirming again after going back from the login screen still works.

Fixes ELEMENT-X-IOS-XED
2026-10-15 12:34:50 +02:00
Stefan Ceriu 11651bcd23 Normalize generated schemes to match Xcode's output
XcodeGen (through XcodeProj) serializes schemes slightly differently to
Xcode, so Xcode rewrites them as soon as it touches them (running tests,
switching test plans, opening the scheme editor), leaving recurring local
changes behind.

Add a small Swift script, run from XcodeGen's postGenCommand, that rewrites
the generated schemes the way Xcode saves them: it drops default-valued
attributes and empty CommandLineArguments, orders TestPlanReference
attributes, and moves TestPlans to the end of the TestAction, omitting the
redundant empty Testables.

Regenerated schemes are byte-identical to the copies saved by Xcode. The
script can be removed once https://github.com/tuist/XcodeProj/pull/1189
ships in XcodeGen.
2026-10-15 12:54:48 +03:00
Doug b6ccbbc6c3 Add a new UserHooks container and move some AppHooks. (#6332)
* Add a UserHooks system with just the CreateRoomScreenHook for now.

* Move more hooks into UserHooks.

* Pass the ClientProxy to makeUserHooks instead of calling AppHooks.configure(with:).

* Update the Enterprise submodule.
2026-10-15 10:49:27 +01:00
renovate[bot] 11b6cc3f70 Update actions/upload-artifact action to v7.0.2 2026-10-15 12:13:54 +03:00
Stefan Ceriu 27e59a81e4 Fix integration tests following the search tab introduction
Tabbar tabs now can take accessibility identifiers and the integration test uses the newly expected flow.
2026-10-14 20:14:27 +03:00
Mauro 7752ae3f6a Keep every signed-in account live (#6299)
* Keep every signed-in account live

With the multi-account flag on, the accounts other than the active one are now
restored at launch, one after the other once the active account's UI is up.
They run their migrations, sync while the app is active, get a pusher (appended
so accounts on the same homeserver keep each other's) and count towards the app
badge, and background refresh and search backfill cover them too. Only the
active account's remote settings are ever applied.

Calls stay with the active account until the call service handles every account,
and an auth error on another account is only logged until accounts can be signed
out one at a time. With the flag off only the active account is live, as before.

* Sum the app badge across every signed in account

Each live account now reports its own unread count, and the app badge
shows their sum. Delivered notifications are only cleared for the
account whose rooms were read, so a room shared by two accounts keeps
the other account's notifications.

The room list observer for the badge and the notifications moves from
the UserSessionFlowCoordinator to the AppCoordinator's per-account
wiring. The flow keeps updating the chats tab badge.

* Let the user session manager manage every session

- The AppCoordinator tells the manager to pause, resume, go offline or
  run the search backfill, instead of looping over the sessions itself.
- The manager also restores the other accounts, preparing each with the
  AppCoordinator's migrations and wiring, and resumes them while the
  services are running. With a single account nothing changes.
- Wiring an account again (e.g. after clearing the cache) replaces its
  observers rather than adding to them.
- Add addAccountFlowEnabled, a developer-only switch for the upcoming
  add account flow. It isn't a user preference, so testers enabling
  multi-account can't add a second account yet.

* Apply review suggestions to keeping every account live

- Move the notification changes (pushers for every account, the summed
  app badge and per-account clearing) to their own PR, so notifications
  follow the active account again for now.
- Revert loading only the active account's remote settings: they load in
  the store again, as on develop, until the hooks are reworked.
- The user session manager reports the auth errors of every live session,
  so the AppCoordinator subscribes once instead of keeping per-account
  observers.
- Restoring a single account is private to the manager now.
- Rename otherSessionsRestoreTask to otherSessionsRestorationTask.

* Restore every signed in account through one path

The user session manager now restores every account in a single pass,
most recently selected first, instead of separate restores for the
active account and the others. The AppCoordinator shows the first
account that comes back and no longer reads the multi-account flag:
without it, the manager only ever makes one account live.

- Clearing the cache clears every live account, and the next pass
  replaces their sessions.
- Each account is migrated once per launch, and an account that just
  signed in is never migrated.
- A pass also runs after signing in, so the other accounts come live.
- Remove UserSessionManagerError, restoreActiveSession and
  restoreOtherSessions.

* Only clear the cache of the active account

Clearing the cache goes back to clearing the account shown in the UI.
Its session stays live until the next restore pass replaces it, and when
that restore fails another live account becomes the active one.

* Apply review suggestions to restoring every account

- Remove the search backfill guard: with no sessions the manager starts
  nothing and reports that nothing is running, so the task completes.
- Add a TODO to switch to the most recently used account when the
  active one signs out while others are signed in (element-meta#3325).
- Disable SwiftLint's type_body_length on the AppCoordinator again, it's
  just over the limit with develop's new migrations.
2026-10-13 17:06:05 +00:00
Danny ae9e0cc176 Remove unused room details hook support (#6325)
* Remove unused room details hook support

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

* Update the Enterprise submodule.
2026-10-13 16:19:45 +00:00
Stefan Ceriu 900b24bc5e Remove unnecessary iOS 26+ search screen restriction. 2026-10-13 19:00:43 +03:00
Stefan Ceriu 95fc43f4fc Bump the RustSDK to v26.10.13 2026-10-13 19:00:43 +03:00