bb109f184adb

fix: always show password-history toggle on entry detail — discoverability (v2.10.6)

Queue item #2. Password history was fully implemented and its capture is unit-proven (VaultRepositoryTest: newest-first capture, ignores metadata-only updates, carries prior age, skips identical resave, re-records on restore). The real gap was visibility: the entry detail screen hid the history toggle behind if (history.isNotEmpty()), so an entry with no captured change showed nothing — unlike the browser, which always shows a history affordance. - EntryDetailScreen: always render PasswordHistoryToggle; expanding an empty history shows the existing empty-state explainer. Matches edit screen + browser. UI-only; compile-verified. On-device visual QA pending.

time
2026-08-02 20:08 UTC · 2 months ago
machine
koh2
parent
7f1a2d6e3a0b
2 files VERSION+1 −1app/src/main/java/com/peachpasswords/ui/vault/EntryDetailScreen.kt+16 −14
VERSION+1 −1
@@ -1 +1 @@1-2.10.51+2.10.6

view file

app/src/main/java/com/peachpasswords/ui/vault/EntryDetailScreen.kt+16 −14
@@ -329,21 +329,23 @@329329                             onGenerate = { generatorOpen = true },330330                         )331331                     }332+                    // Always show the history affordance (browser parity) — visible333+                    // even before any password change, expanding to an empty-state334+                    // explainer so the feature is discoverable rather than hidden335+                    // until history already exists.332336                     val history = e.passwordHistory.orEmpty()333-                    if (history.isNotEmpty()) {334-                        PasswordHistoryToggle(335-                            count = history.size,336-                            expanded = historyExpanded,337-                            onToggle = { historyExpanded = !historyExpanded },338-                        )339-                        AnimatedVisibility(visible = historyExpanded) {340-                            Column(Modifier.padding(top = 8.dp, bottom = 6.dp)) {341-                                PasswordHistoryList(342-                                    history = history,343-                                    onRestore = { oldPw -> vm.restorePassword(e.id, oldPw) },344-                                    onCopy = { oldPw -> vm.copy("password", oldPw) },345-                                )346-                            }337+                    PasswordHistoryToggle(338+                        count = history.size,339+                        expanded = historyExpanded,340+                        onToggle = { historyExpanded = !historyExpanded },341+                    )342+                    AnimatedVisibility(visible = historyExpanded) {343+                        Column(Modifier.padding(top = 8.dp, bottom = 6.dp)) {344+                            PasswordHistoryList(345+                                history = history,346+                                onRestore = { oldPw -> vm.restorePassword(e.id, oldPw) },347+                                onCopy = { oldPw -> vm.copy("password", oldPw) },348+                            )347349                         }348350                     }349351                     if (e.hasTOTP()) {

view file