Add a member directory tab (#11)

* Add HealthChat API and extended profile services

Expose OpenID tokens and homeserver credentials from the client proxy, and
add fork-only services for the HealthChat member directory backend
(api.healthchat.ch) plus a service that reads MSC4133 extended profile
fields directly from the homeserver. Groundwork for the members tab and
the profile screens.

Claude-Session: https://claude.ai/code/session_013qdTbAWsZj2quQzEkagXaS

* Show extended profile details on the profile screens

Add a UserProfileScreenHook that lets the fork inject an extra Form
section below the header of the user profile and room member details
screens. The HealthChat implementation loads the MSC4133 extended
profile fields and renders them with tappable phone/email/website
links, hiding the section entirely for profiles without any fields.

Strings live in a new fork-only HealthChat.strings table (de/en/fr,
generated as HealthChatL10n via SwiftGen) since Untranslated.strings
pins the English bundle.

Claude-Session: https://claude.ai/code/session_013qdTbAWsZj2quQzEkagXaS

* Add a member directory tab

Add a HomeTabsHook that lets the fork append an extra tab to the home
tab bar, and a HealthChat members flow behind it: a directory of all
approved members from the HealthChat API with server-side search,
pending-approval and error states, chat shortcuts and pushed member
profiles. Chats and calls are handed back to the session flow via the
hook's actions publisher.

Claude-Session: https://claude.ai/code/session_013qdTbAWsZj2quQzEkagXaS
This commit is contained in:
2026-09-22 17:03:28 +02:00
parent 352d25f2bb
commit 93149f1cbd
33 changed files with 954 additions and 1 deletions
@@ -0,0 +1,29 @@
//
// Copyright 2026 Element Creations Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
// Please see LICENSE files in the repository root for full details.
//
import Combine
import SwiftUI
/// Actions an extra tab can ask the session flow to perform on its behalf.
enum ExtraHomeTabAction {
case presentRoom(roomID: String)
case presentCall(roomID: String, isVoiceCall: Bool)
}
nonisolated protocol HomeTabsHookProtocol: Sendable {
/// An extra tab appended after the standard tabs, or nil for none.
/// The hook keeps ownership of the tab's flow.
@MainActor func makeExtraTab(flowParameters: CommonFlowParameters)
-> (tab: NavigationTabCoordinator<UserSessionFlowCoordinator.HomeTab>.Tab, actions: AnyPublisher<ExtraHomeTabAction, Never>)?
}
struct DefaultHomeTabsHook: HomeTabsHookProtocol {
func makeExtraTab(flowParameters: CommonFlowParameters)
-> (tab: NavigationTabCoordinator<UserSessionFlowCoordinator.HomeTab>.Tab, actions: AnyPublisher<ExtraHomeTabAction, Never>)? {
nil
}
}