Commit Graph

193 Commits

Author SHA1 Message Date
joel.poyet 3d1fa27a4b Rebrand as HealthChat and pin the account provider to healthchat.ch
Applies the HealthChat product identity through the fork seams upstream already
provides, so no upstream logic files are touched and merges stay clean.

- Variants/HealthChat/healthchat.yml holds the identity scalars (display name,
  bundle id ch.healthchat.element, app group, development team) and is included
  permanently from project.yml. APP_NAME stays ElementX so the module name and
  @testable import ElementX keep working.
- ElementX/Sources/AppHooks/HealthChat/ registers an AppSettings hook pinning
  accountProviders to healthchat.ch with other providers disabled, push through
  sygnal.healthchat.ch and a custom-scheme OIDC redirect; plus a Compound hook
  recolouring the accent token family to the HealthChat blue.
- Entitlements are edited directly in ElementX/SupportingFiles/target.yml rather
  than in the variant, because XcodeGen concatenates arrays on include-merge and
  a variant can override scalars but cannot remove array entries. Drops the
  Element Classic app group and keychain group, and narrows associated domains
  to app.healthchat.ch, keeping matrix.to for permalinks.
- Info.plist CFBundleName now follows APP_DISPLAY_NAME — it, not
  CFBundleDisplayName, is what the web authentication sign-in alert shows.
- App logo and app icon assets swapped in place; the onboarding welcome title
  moves to a new screen_onboarding_welcome_title_ios untranslated string.
2026-10-19 09:17:24 +02:00
Mauro 831234865b Fix Swift 6.4 warnings (#6240) 2026-10-01 10:55:19 +02: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
Valere Fedronic fb49f5b83b Add experimental native calls behind a developer flag (#6159)
Add the element-call-ios dependency and a developer option for native calls

The package carries the call UI and the matrix-rust-rtc media stack, pinned by
exact version the way the SDK is, with the local path kept commented out for
working against a checkout. Its media xcframework has no Intel simulator slice
and a package cannot say so for the projects that consume it, hence the
excluded architecture at the project level.

The developer option is off by default and nothing reads it yet. It is placed
next to the Element Call URL override, which only applies to the web view that
native calls replace.
2026-09-17 19:42:18 +03:00
Element CI a139257967 Run XcodeGen, update Package.resolved and Settings.bundle 2026-08-26 10:49:48 +02:00
Element CI ca1d44a53d Run XcodeGen, update Package.resolved and Settings.bundle 2026-08-26 10:49:48 +02:00
Stefan Ceriu f73285db3e Move DevelopmentAssets into the Components folder
Continue grouping the standalone modules under Components. Updates the
preview asset paths and the media resource references in the app and unit
test targets.
2026-08-12 16:52:26 +03:00
Stefan Ceriu cbe17409bb Move Secrets into the Components folder
Continue grouping the standalone modules under Components. Updates the
Secrets.swift references in the app, NSE and Share Extension targets along
with the SwiftLint, SwiftFormat, gitignore, post-checkout hook and forking
documentation paths.
2026-08-12 16:52:26 +03:00
Stefan Ceriu 4de42be688 Load the map framework on demand instead of at launch
MapLibre ships as a dynamic framework, so being named in the app's load
commands means dyld loads it before main runs on every launch: 7.3 MB paged in,
133 C++ static initialisers run and its classes registered, all for a map that
only appears once a location screen is opened.

Measured on an iPhone 17 Pro with two otherwise identical probe apps launched
alternately, linking MapLibre takes pre-main from 11.1 ms to 23.2 ms, and on a
cold launch from 32.9 ms to 60.7 ms. Loading it on demand brings pre-main back
to the 11.1 ms baseline and moves the roughly 11 ms it costs to dlopen to the
moment the map first appears.

MapLibreShim is now embedded but not linked, and the app resolves the shim
through the ObjC runtime after dlopen-ing it. MapLibre stays in the bundle as
an embed-only framework reference so the shim's load command can resolve
against it, expressed as an implicit framework because xcodegen can't describe
embed-without-link for a package product.

Timeline location messages already use the static tile view, which never
touched MapLibre, so the shim only loads for interactive maps.
2026-08-12 15:04:24 +03:00
Stefan Ceriu 8753fe3980 Move the interactive map into a new MapLibreShim framework
Second step towards loading MapLibre on demand: everything that touches it now
lives in one framework, so that framework can later be left unlinked.

The interactive map view, its annotation view and the coordinate animator move
into MapLibreShim, which reaches the app through MapLibreShimProtocol. The app
side keeps its MapLibreMapView call site and becomes a thin wrapper that builds
a MapViewConfiguration, passing the app-only pieces (map style URLs, marker
views, tint colour) across as closures so the shim needs nothing from the app.

LocationAnnotation loses its MapLibre conformance and becomes a plain struct,
with the shim mapping it onto its own annotation type. MapLibre's log
forwarding moves into the shim as well, since TargetConfiguration can no longer
reach it.
2026-08-12 15:04:24 +03:00
Stefan Ceriu 5724e65d8e Move the shared map types into a new MapLibreInterface framework
Groundwork for loading MapLibre on demand. The map view is about to move into
its own framework, and both sides need to agree on the types that cross the
boundary, so ShowUserLocationMode and MapLibreError move out of the app into a
small framework that the app links.
2026-08-12 15:04:24 +03:00
Doug d0fca495cb Add an HTTP_PROXY environment variable too (also disabled). (#5984) 2026-08-06 10:49:51 +01:00
renovate[bot] d8cb49e892 Update Project Dependencies (#5940) 2026-07-31 11:10:22 +01:00
Element CI edaac3eecd Run XcodeGen, update Package.resolved and Settings.bundle 2026-07-16 19:31:11 +02:00
Element CI 2f1cb3eace Run XcodeGen, update Package.resolved and Settings.bundle 2026-07-16 19:31:11 +02:00
Element CI 1158ce61fa Run XcodeGen, update Package.resolved and Settings.bundle 2026-07-16 19:31:11 +02:00
Element CI 9e2696a395 Run XcodeGen, update Package.resolved and Settings.bundle 2026-07-15 14:07:27 +02:00
Doug 5915713a02 Introduce a build setting to detect Nightly builds. (#5852)
* Allow the AppIconBanner tool to be called with purely the build number.

And use that for the Element Pro Nightly.

* Use a build setting to determine Nightly builds.
2026-07-09 13:56:26 +01:00
renovate[bot] 1e451ac3e3 Update Project Dependencies (#5818)
* Update Project Dependencies

* Run XcodeGen, update Package.resolved and Settings.bundle

# Conflicts:
#	ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Run XcodeGen, update Package.resolved and Settings.bundle

* updated package

* Run XcodeGen, update Package.resolved and Settings.bundle

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Element CI <ci@element.io>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-07-06 18:01:05 +02:00
Doug c53e0c1466 Add a new BuildExtensions package that contains a UserPreference macro.
The build extensions package can be used for both macros and plugins.
2026-06-29 10:34:32 +01:00
Mauro a520d94760 Swift 6 Migration (#5733)
* Enable Swift 6.2 with default main actor isolation for the app target

Turn on SWIFT_VERSION 6.2, SWIFT_APPROACHABLE_CONCURRENCY and SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor for the ElementX target, matching the NSE and Share Extension (which already use 6.2 without the main actor default).

# Conflicts:
#	ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Update the code generation templates for Swift 6

Emit nonisolated/@unchecked Sendable mocks and nonisolated string enums, and mark async mock methods @concurrent so they keep suspending like the real implementations (otherwise intermediate states are unobservable in tests). Includes the regenerated mocks and strings.

# Conflicts:
#	ElementX/Sources/Mocks/Generated/GeneratedMocks.swift

* Make the data layer and services nonisolated and Sendable

Annotate the value-type models, Rust SDK proxy wrappers, timeline item graph, settings, logging and NSE-shared types as nonisolated, and conform the service protocols to Sendable so their existentials can cross isolation boundaries. These types run off the main actor and no longer inherit the target's default main actor isolation.

* Adopt the new isolation across call sites, mocks and signatures

Update call sites, closure signatures and mock configuration helpers to match the nonisolated/Sendable data layer, including the main actor isolated mock inits and the @Sendable filter on recentlyVisitedRooms.

^ Conflicts:
^	ElementX/Sources/Services/SecureBackup/SecureBackupController.swift

* Remove redundant @MainActor annotations

With the app target defaulting to main actor isolation, the explicit @MainActor on view models, coordinators, views and their protocols is no longer required.

* Fix concurrency hotspots surfaced by the migration

Resolve the room summary main-thread deadlock by moving diff processing onto AsyncStreams, add the SDKListener.onMainActor FIFO bridge for SDK callbacks, hop KVO/timer/UIKit callbacks to the main actor via assumeIsolated, add isolated deinits, and apply the few justified nonisolated(unsafe) escapes for queue-confined Apple APIs.

* Fix the unit tests for Swift 6 concurrency

Hop the waitForConfirmation body onto the caller's actor (Swift Testing runs confirmation closures off-actor), and adjust the affected suites and async signatures.

* offload diffs on concurrent threads instead of main actor

* make room info protocols sendable

* use a task group for fetching data so that everything runs concurrently in the TextRoomTimelineView when getting the preview.

* use the generic onMainActor implementation, which already makes a stream and send the continuation on the main actor.

* small pr comments issues being addressed

* update enterprise

* Update StaticCode to 1.1.0 and specify the required Swift isolation.

* fix ElementCallServiceTests

* update enterprise

* re-generate mocks

* update enterprise

* enterprise new code conformed to swift 6

---------

Co-authored-by: Doug <douglase@element.io>
2026-06-18 17:55:31 +02:00
Element CI c76052e8a2 Run XcodeGen, update Package.resolved and Settings.bundle 2026-06-17 08:52:00 +03:00
Element CI cb491ab4ac Run XcodeGen, update Package.resolved and Settings.bundle 2026-06-17 08:52:00 +03:00
Element CI 3aebbc50a5 Run XcodeGen, update Package.resolved and Settings.bundle 2026-06-04 09:21:55 +03:00
Element CI d2f1e5caed Run XcodeGen, update Package.resolved and Settings.bundle 2026-06-03 17:19:09 +02:00
renovate[bot] cb1c89be9d Update XcodeGen (#5610) 2026-05-20 08:33:44 +03:00
Stefan Ceriu 212ac17d0b Add media upload preview cropping capability for images (#5575)
Start using [Mantis](https://github.com/guoyingtao/Mantis) to crop and rotate images
before upload.
2026-05-12 17:04:08 +03:00
renovate[bot] 272c8ca764 Update dependency PostHog to v3.57.0 (#5532)
* Update dependency PostHog to v3.57.0

* Run XcodeGen, update Package.resolved and Settings.bundle
2026-05-04 14:10:32 +03:00
Doug 63592e48c1 Remove support for handling SPA calls within the app. (#5515)
* Remove support for handling SPA call links.

They were a stop-gap solution whilst we were building support for embedded room calling.

* Simplify ElementCallConfiguration now that there is only 1 type of call to handle.

* Remove the unused overlayModule from NavigationRoomCoordinator.
2026-04-29 19:32:38 +01:00
Element CI c6ea99239a Run XcodeGen, update Package.resolved and Settings.bundle 2026-04-24 18:57:44 +03:00
Element CI ecc2f80f05 Run XcodeGen, update Package.resolved and Settings.bundle 2026-04-24 18:57:44 +03:00
Doug 7c812201cb 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
Mauro Romito f3b5230119 update plist to include background location updates 2026-04-03 12:36:45 +02:00
Stefan Ceriu f1ef968975 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
Mauro Romito 87aaf1065e include the always usage location description in the info.plist 2026-03-31 17:09:42 +02:00
Mauro Romito 95b3a8fbb1 Add support for reading accounts from Element Classic. 2026-03-11 17:42:53 +00:00
Mauro 6f1720da89 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 e44188024f 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
Skye Elliot 4841a3bdaf 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 7532a792b7 Add boot detection in the NSE and use this to inform the user that there may be more notifications. (#5054)
* Add an initial implementation of the receivedWhileOfflineNotification.

* Only deliver a single receivedWhileOffline notification per boot and clarify the API.

* Add a 15-minute threshold for the receiveWhileOfflineNotification.
2026-02-06 15:18:09 +00:00
Doug 99e160ddc4 Update dependencies. (#4940)
* Minor dependency updates.

Plus SwiftSyntax 509 → 601

* Update MapLibre to v6.

* Update Sentry to v9.
2026-01-09 16:48:03 +00:00
Doug a53b9137ef Add a dedicated target for SDK mocks to avoid type name conflicts on the generated code. 2026-01-06 10:57:37 +00:00
Stefan Ceriu 0fad733479 Add AsyncAlgorithms to the main app target. 2025-12-12 17:23:58 +02:00
Doug d130dffaf3 Remove eraseToStream now that any AsyncSequence is available to us. (#4836)
* Remove `eraseToStream` now that `any AsyncSequence` is available to us.

* Remove the now unnecessary backport of Mutex.

* Silence a couple more deprecation warnings.
2025-12-10 18:33:15 +00:00
Mauro Romito 8e52ef363b add NSE sources to EX project to easily implement mocking and allow the code to be unit tested 2025-11-19 13:20:14 +01:00
Valere Fedronic cd411b57e0 MSC4075 Use expirationTS to define the call ringing window (#4652)
* Listen to call decline to stop ringing when declined from other device

* MSC4075 Use expirationTS to define the call ringing window

* Implement ElementCallService tests.

* Update acknowledgements.
2025-11-12 12:59:09 +00:00
Stefan Ceriu 3bfdee6e96 Remove the DTCoreText dependency 2025-10-28 09:53:15 +00:00
Mauro Romito fcd00a568d revert 2025-10-21 14:37:15 +02:00
Mauro f7dd9cdcf8 Update copyright holding and dates (#4640)
* Update copyright holding and dates

* compound IDE Macros updated

* update copyright

* update copyrights done

* update templates and README
2025-10-21 14:34:56 +02:00
Doug 0f930dbf09 Update acknowledgments with resolved names. (#4555) 2025-09-29 15:58:43 +01:00