Bug: Settings > Vault Enabled switch flips visually but doesn't enable vault #162
Labels
No labels
blocked:depends-p1
blocked:gate-research
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
data-loss
documentation
enhancement
feature-request
in-progress
needs-decompose
needs-triage
pwa
quickfix
security
security/high
security/medium
test
test-coverage
triage-approved
vault
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_kin_app_sync#162
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
On the Settings page, toggling the Vault Enabled Radix switch shows it visually flipping to "checked" (aria-checked=true, data-state="checked"), but the conditional vault sub-rows (Auto-lock Delay, Change PIN, Lock Vault Now, Reset Vault Data, Quick-Hide) do not render, and navigating to
#/vaultshows "Vault Disabled - Enable the vault in Settings to protect sensitive contacts" even though the Settings switch reads as ON.Repro
#/settingspointerdown+pointerup+click)aria-checked="true",data-state="checked"#/vault#/settings- switch is still shown as checked, sub-rows still missingWhat's known
<Switch checked={vaultSettings.vaultEnabled}>and the conditional{vaultSettings.vaultEnabled && (...)}read the samevaultSettingsfromuseStore(useShallow((s) => s.vaultSettings))(Settings.tsx:163)setVaultEnabled(store.ts:1219-1223) does bothset({ vaultSettings: newSettings })andbatchPrefSet("vaultSettings", ...)PersonDetail.tsxtoggles and persists correctly across navigationSuggested investigation paths
src/components/ui/switch.tsx- the wrapper spreads...propsonto SwitchRoot; verify Radix'schecked/onCheckedChangepair is being honoreduseShallowonvaultSettingsreturning the wrong reference somehow - instrument with a console.log insidesetVaultEnabledto confirmset({ vaultSettings: newSettings })runsbatchPrefSet's async round-trip viaPreferences.setreverting in-memory state before React commits - possible if a hydration step re-reads preferences from CapacitorSeverity
Functional. The whole Vault feature is unreachable from Settings because the enable-toggle doesn't actually enable it.
Source pointers
src/pages/Settings.tsx:1043-1053(Switch binding)src/pages/Settings.tsx:1055(conditional that doesn't render)src/lib/store.ts:1219-1223(setVaultEnabled action)src/pages/Vault.tsx:120(vaultDisabled = !vaultSettings.vaultEnabled)src/components/ui/switch.tsx(Switch wrapper)