a8190173b084

fix: Remove production demo credential seed (PB-26-029, v2.14.93)

time
2026-09-02 11:31 UTC · 1 month ago
machine
koh2
parent
423e4e5afc36
3 files VERSION+1 −1app/src/main/java/com/peachpasswords/ui/vault/VaultListScreen.kt+2 −12app/src/main/java/com/peachpasswords/ui/vault/VaultListViewModel.kt+0 −36
VERSION+1 −1
@@ -1 +1 @@1-2.14.921+2.14.93

view file

app/src/main/java/com/peachpasswords/ui/vault/VaultListScreen.kt+2 −12
@@ -258,7 +258,7 @@258258                 ) {259259                     LazyColumn(Modifier.fillMaxSize()) {260260                         if (entries.isEmpty()) {261-                            item { EmptyState(onSeed = vm::seedDemo) }261+                            item { EmptyState() }262262                         }263263                         items(entries, key = { it.id }) { entry ->264264                             EntryRow(@@ -778,21 +778,11 @@778778 }779779 780780 @Composable781-private fun EmptyState(onSeed: () -> Unit) {781+private fun EmptyState() {782782     PeachEmptyOrEndState(783783         message = "No entries yet",784784         detail = "add your first entry with +",785785         modifier = Modifier.padding(top = 80.dp),786-        action = {787-            if (com.peachpasswords.BuildConfig.DEBUG) {788-                Text(789-                    "seed demo data",790-                    color = LocalPeachAccent.current,791-                    style = PeachType.labelMono,792-                    modifier = Modifier.clip(RoundedCornerShape(8.dp)).clickable(onClick = onSeed).padding(10.dp),793-                )794-            }795-        },796786     )797787 }798788 

view file

app/src/main/java/com/peachpasswords/ui/vault/VaultListViewModel.kt+0 −36
@@ -7,7 +7,6 @@77 import com.peachpasswords.license.PendingProNotice88 import com.peachpasswords.license.ProNoticeStore99 import com.peachpasswords.vault.TOTPGenerator10-import com.peachpasswords.vault.PasskeyData1110 import com.peachpasswords.vault.VaultEntry1211 import com.peachpasswords.vault.VaultLockTimer1312 import com.peachpasswords.vault.VaultRepository@@ -187,41 +186,6 @@187186 188187     fun canSwipeCopy(entry: VaultEntry): Boolean = entry.isLogin() && !entry.password.isNullOrEmpty()189188 190-    /** Debug-only QA seeding so list/search/swipe/TOTP can be exercised before the add screen lands. */191-    fun seedDemo() {192-        viewModelScope.launch {193-            val now = System.currentTimeMillis()194-            fun login(t: String, u: String, p: String, url: String, totp: String? = null, breach: Int? = null) =195-                VaultEntry(196-                    id = "", title = t, type = "login", username = u, password = p, url = url,197-                    totp = totp, breach = breach, createdAt = now, modifiedAt = now,198-                )199-            vault.addEntry(login("GitHub", "[email protected]", "hunter2hunter2", "https://github.com"))200-            vault.addEntry(login("Google", "[email protected]", "correct-horse-battery", "https://accounts.google.com",201-                totp = "GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ"))202-            vault.addEntry(login("Old Bank", "june", "weakpw", "https://bank.example.com", breach = 3))203-            vault.addEntry(login("Fastmail", "[email protected]", "another-long-passphrase", "https://fastmail.com"))204-            vault.addEntry(VaultEntry(id = "", title = "Recovery Notes", type = "note", notes = "x", createdAt = now, modifiedAt = now))205-            // Passkey-only entry (no password/TOTP/email) — exercises the206-            // passkey code path through import/export round trips, which207-            // previously had no seeded coverage at all.208-            vault.addEntry(209-                VaultEntry(210-                    id = "", title = "Amazon", type = "login", url = "https://amazon.com",211-                    passkey = PasskeyData(212-                        credentialId = "demo-credential-id",213-                        publicKeyCose = "demo-cose-public-key",214-                        rpId = "amazon.com",215-                        rpName = "Amazon",216-                        userHandle = "demo-user-handle",217-                        userName = "[email protected]",218-                        userDisplayName = "June",219-                    ),220-                    createdAt = now, modifiedAt = now,221-                ),222-            )223-        }224-    }225189 }226190 227191 internal fun filterAndSortVaultEntries(

view file