Add SecureBackupSetupEntryPoint extension seam

Introduces a FeatureEntryPoint for the recovery-key setup screen so enterprise builds can vend a richer setup node. The FOSS default builds the standard auto-generated-key node; SecureBackupFlowNode now resolves the Setup and Change targets through this seam instead of creating SecureBackupSetupNode directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jenna Vassar
2026-06-08 15:35:30 -07:00
parent 8722305e12
commit 1f84bef601
4 changed files with 75 additions and 7 deletions
@@ -0,0 +1,30 @@
/*
* Copyright (c) 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.
*/
package io.element.android.features.securebackup.api
import com.bumble.appyx.core.modality.BuildContext
import com.bumble.appyx.core.node.Node
import io.element.android.libraries.architecture.FeatureEntryPoint
import io.element.android.libraries.architecture.NodeInputs
/**
* Entry point for the recovery-key setup screen.
*
* The default (FOSS) implementation builds the standard auto-generated-key setup node. Enterprise
* builds replace this binding to vend a richer setup node (e.g. a homeserver-advertised custom
* recovery passphrase) while falling back to the standard node when no custom spec applies.
*/
interface SecureBackupSetupEntryPoint : FeatureEntryPoint {
data class Inputs(val isChangeRecoveryKeyUserStory: Boolean) : NodeInputs
fun createNode(
parentNode: Node,
buildContext: BuildContext,
inputs: Inputs,
): Node
}