feat(phase-1/m4.5a): desktop settings screen on the shared sections

DesktopSettingsScreen composes the M4.4d common sections (Appearance
/ Backup / About + building blocks) plus desktop-only Encryption rows.
Android-incapable surfaces are hidden per 6.5: dynamic-color row
(onDynamicColor null), Carnet importer (onImportCarnet null),
SecuritySection entirely (no BiometricPrompt/FLAG_SECURE on the JVM).

Flow dedupe so settings drives the EXACT M2/M3 behaviour, not a copy:
- BackupActions split: BackupFlows/rememberBackupFlows owns the pick+
  bridge + dialog machinery; the menu is now a thin skin (launchImport/
  launchExportPlain/launchExportEncrypted + Dialogs()).
- SecurityActions split: SecurityKeyFlows owns the recovery-key export/
  import dialogs (hasKey gate, overwrite warning, import leg);
  toggleDesktopEncryption() keeps the enable/disable ordering.
- M4.4d sections became PUBLIC (desktopApp is a separate module).

Main.kt: gear button routes list-window <-> settings in-place (no nav
stack yet — desktop nav polish is M5). New scripted leg
--settings-smoke renders the screen headlessly before auto-exit.

Verified: assembleDebug :desktopApp:build SUCCESSFUL + :desktopApp:
run --self-test --settings-smoke (SELFTEST id=1, RENDER notes=1
selected=1, SETTINGS shown, ST_EXIT=0) + :core:data-jvm:smoke
(M1a PASS); models clean.
This commit is contained in:
Incido Developer committed 2026-10-06 19:27:02 +13:00
1 parent 0dc5935d1d
commit d264238640
5 files changed
+461 -216

No files matched your search

@@ -36,7 +36,7 @@ import org.incido.compose.data.settings.ThemeMode
// ---------------------------------------------------------------------------
@Composable
internal fun AppearanceSection(
fun AppearanceSection(
themeMode: ThemeMode,
dynamicColor: Boolean,
onThemeMode: (ThemeMode) -> Unit,
@@ -88,7 +88,7 @@ internal fun AppearanceSection(
}
@Composable
internal fun BackupSection(
fun BackupSection(
onExport: () -> Unit,
onImport: () -> Unit,
/** Null hides the Carnet row — its importer lives in androidMain. */
@@ -124,7 +124,7 @@ internal fun BackupSection(
}
@Composable
internal fun AboutSection(
fun AboutSection(
version: String,
onVersionClick: () -> Unit,
) {
@@ -156,12 +156,13 @@ internal fun AboutSection(
}
// ---------------------------------------------------------------------------
// Building blocks — M4.4d: internal so SettingsScreen (androidMain) and
// the desktop settings surface (commonMain) share one vocabulary.
// Building blocks — M4.4d: shared vocabulary for SettingsScreen
// (androidMain) and DesktopSettingsScreen. M4.5 note: public, not
// internal — desktopApp is a separate Gradle module.
// ---------------------------------------------------------------------------
@Composable
internal fun SettingsSection(title: String, content: @Composable () -> Unit) {
fun SettingsSection(title: String, content: @Composable () -> Unit) {
Column {
Text(
text = title,
@@ -179,7 +180,7 @@ internal fun SettingsSection(title: String, content: @Composable () -> Unit) {
/** v0.3.3.0: optionally renders a disabled (greyed) switch — used for
* the mutually-exclusive PIN / Biometric toggles. */
@Composable
internal fun SettingsToggle(
fun SettingsToggle(
title: String,
subtitle: String,
checked: Boolean,
@@ -215,7 +216,7 @@ internal fun SettingsToggle(
}
@Composable
internal fun SettingsRow(
fun SettingsRow(
title: String,
subtitle: String,
onClick: () -> Unit,