commit 412a1a940cbbc016bcdecccf081ea34936a336f5
parent 2d120b23e4004995ba48a81dca90fde1d66f8a76
Author: triesap <tyson@radroots.org>
Date: Sat, 13 Jun 2026 15:40:55 -0700
ui: expose identity state accessibility
- add stable accessibility identifiers for identity state rows
- expose saved and runtime identity values to UI tests
- preserve the visible Settings identity copy
- keep existing settings action identifiers unchanged
Diffstat:
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/Radroots/Views/SettingsView.swift b/Radroots/Views/SettingsView.swift
@@ -16,8 +16,16 @@ struct SettingsView: View {
Text("No local Nostr identity is selected.")
.foregroundStyle(.secondary)
}
- LabeledContent("Saved identity", value: app.storedIdentityAvailable ? "Available" : "Missing")
- LabeledContent("Runtime identity", value: app.runtimeIdentityReady ? "Unlocked" : "Locked")
+ IdentityStateRow(
+ title: "Saved identity",
+ value: app.storedIdentityAvailable ? "Available" : "Missing",
+ identifier: "field_ios.settings.saved_identity"
+ )
+ IdentityStateRow(
+ title: "Runtime identity",
+ value: app.runtimeIdentityReady ? "Unlocked" : "Locked",
+ identifier: "field_ios.settings.runtime_identity"
+ )
NavigationLink {
ProfileView()
@@ -108,6 +116,20 @@ struct SettingsView: View {
}
}
+private struct IdentityStateRow: View {
+ let title: String
+ let value: String
+ let identifier: String
+
+ var body: some View {
+ LabeledContent(title, value: value)
+ .accessibilityElement(children: .ignore)
+ .accessibilityLabel(title)
+ .accessibilityValue(value)
+ .accessibilityIdentifier(identifier)
+ }
+}
+
private struct RuntimeDiagnosticsView: View {
@EnvironmentObject private var app: AppState