Decompose: Feature: "Little Black Book" mode — locked private vault for discreet contacts — Phase 4: Discreet entry point + auto-lock timer #142

Closed
opened 2026-07-14 00:48:03 +00:00 by Mark · 0 comments
Owner

Phase 4: Discreet entry point + auto-lock timer

Goal: Vault entry is not labeled "Little Black Book" or "Vault." Auto-lock when the app goes to background, with configurable delay.

Approach candidates:

  • Settings icon long-press (≥ 800ms) opens vault enrollment/unlock.
  • App-pause listener (Capacitor App.addListener("appStateChange", …)) records background timestamp. On resume, if elapsed > delay and vault is unlocked, lock it.
  • User setting vault.autoLockDelay = "immediate" | "1min" | "5min". Default 1min.

Outputs:

  • Long-press handler on Settings icon → vault entry.
  • App background/resume wiring in src/vault/lifecycle.ts.
  • Setting UI in src/screens/Settings.tsx (delay radio).

Acceptance criteria:

  • Settings icon long-press opens vault entry. Short tap still opens Settings.
  • Setting unlock → background the app for 65s → resume → vault is locked.
  • Setting immediate → background → resume → vault locked.
  • Setting 5min → background 30s → resume → vault still unlocked.
  • Test: simulate appStateChange events with faked timestamps; verify unlock-state transitions.

Files touched: src/screens/Settings.tsx, src/App.tsx (lifecycle wiring), src/vault/lifecycle.ts (new).



Decomposed from kimi_agent_kin_app_sync#26

## Phase 4: Discreet entry point + auto-lock timer **Goal:** Vault entry is not labeled "Little Black Book" or "Vault." Auto-lock when the app goes to background, with configurable delay. **Approach candidates:** - Settings icon long-press (≥ 800ms) opens vault enrollment/unlock. - App-pause listener (Capacitor `App.addListener("appStateChange", …)`) records background timestamp. On resume, if elapsed > delay and vault is unlocked, lock it. - User setting `vault.autoLockDelay = "immediate" | "1min" | "5min"`. Default `1min`. **Outputs:** - Long-press handler on Settings icon → vault entry. - `App` background/resume wiring in `src/vault/lifecycle.ts`. - Setting UI in `src/screens/Settings.tsx` (delay radio). **Acceptance criteria:** - [ ] Settings icon long-press opens vault entry. Short tap still opens Settings. - [ ] Setting unlock → background the app for 65s → resume → vault is locked. - [ ] Setting `immediate` → background → resume → vault locked. - [ ] Setting `5min` → background 30s → resume → vault still unlocked. - [ ] Test: simulate `appStateChange` events with faked timestamps; verify unlock-state transitions. **Files touched:** `src/screens/Settings.tsx`, `src/App.tsx` (lifecycle wiring), `src/vault/lifecycle.ts` (new). --- --- _Decomposed from [kimi_agent_kin_app_sync#26](https://forgejo.tail018ac4.ts.net/Mark/kimi_agent_kin_app_sync/issues/26)_
Mark closed this issue 2026-07-26 01:42:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_kin_app_sync#142
No description provided.