feat(chat): sensitive-conversation UI (mark/unmark, setup/unlock, lock)

Wires sensitive mode into the chat tab:
- A per-conversation lock toggle in the header (next to delete) opens a dialog
  that, by vault state, sets up / unlocks the vault and marks or unmarks the
  conversation. The mark dialog shows the honest warning (lose the passphrase =
  gone forever; sent fully protected vs received still chain-recoverable; prior
  history stays recoverable).
- A "Lock sensitive" / "Unlock sensitive (N)" opener beside Blocked/Restore
  locks or unlocks the vault; unlocking surfaces the withheld sensitive threads.
- Passphrase fields use the password flag and are memset on close; marking
  requires the vault unlocked (the App layer migrates rows + broadcasts the
  on-chain signal).

~29 new English strings (fall back to English until translated). Phase B
complete (policy level); the cryptographic re-key level remains out of scope.
Needs a live smoke test (built unverified, like the delete UI).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 18:25:12 -05:00
co-authored by Claude Opus 4.8
parent 6e285bd4a4
commit f0be72ac36
2 changed files with 199 additions and 1 deletions
+29
View File
@@ -331,6 +331,35 @@ void I18n::loadBuiltinEnglish()
strings_["chat_restore_toast"] = "Restoring conversation - it reappears after the next scan";
strings_["chat_restore_paste_label"] = "Restore by chat address";
strings_["chat_restore_paste_hint"] = "Paste the conversation's chat (z) address";
strings_["chat_sensitive_mark_tip"] = "Make sensitive";
strings_["chat_sensitive_unmark_tip"] = "Sensitive - tap to change";
strings_["chat_sensitive_mark_title"] = "Make this conversation sensitive?";
strings_["chat_sensitive_unmark_title"] = "Make this conversation normal?";
strings_["chat_sensitive_unlock_title"] = "Unlock sensitive conversations";
strings_["chat_sensitive_warn_1"] = "Its messages will be encrypted on this device under a separate passphrase - not your seed phrase. Anyone who later restores your wallet from your seed alone won't see this conversation.";
strings_["chat_sensitive_warn_lose"] = "If you lose this passphrase, these messages are gone forever - they can't be recovered from your seed.";
strings_["chat_sensitive_warn_dir"] = "Your sent messages here are protected completely. Received messages are still on the blockchain and could, in theory, be recovered by someone who has your seed and other software - DragonX itself will never show them without your passphrase.";
strings_["chat_sensitive_warn_hist"] = "Messages already in this conversation stay recoverable from the chain; this fully protects messages from here on.";
strings_["chat_sensitive_unmark_body"] = "This conversation will no longer be encrypted under your sensitive-chat passphrase. New messages will be stored like any other conversation.";
strings_["chat_sensitive_unlock_body"] = "Enter your sensitive-chat passphrase to show your sensitive conversations again.";
strings_["chat_sensitive_setup_label"] = "Create a passphrase for sensitive conversations";
strings_["chat_sensitive_unlock_label"] = "Enter your sensitive-chat passphrase";
strings_["chat_sensitive_pass_hint"] = "Passphrase";
strings_["chat_sensitive_pass2_hint"] = "Confirm passphrase";
strings_["chat_sensitive_btn_setup"] = "Set up & make sensitive";
strings_["chat_sensitive_btn_mark"] = "Make sensitive";
strings_["chat_sensitive_btn_unmark"] = "Make normal";
strings_["chat_sensitive_btn_unlock"] = "Unlock";
strings_["chat_sensitive_btn_unlock_mark"] = "Unlock & make sensitive";
strings_["chat_sensitive_btn_unlock_unmark"] = "Unlock & make normal";
strings_["chat_sensitive_lock_btn"] = "Lock sensitive";
strings_["chat_sensitive_unlock_btn"] = "Unlock sensitive";
strings_["chat_sensitive_toast_marked"] = "Conversation is now sensitive";
strings_["chat_sensitive_toast_unmarked"] = "Conversation is no longer sensitive";
strings_["chat_sensitive_toast_unlocked"] = "Sensitive conversations unlocked";
strings_["chat_sensitive_err_pass"] = "Passphrases don't match, or are empty.";
strings_["chat_sensitive_err_unlock"] = "Wrong passphrase.";
strings_["chat_sensitive_err_create"] = "Couldn't set up the sensitive-chat vault.";
strings_["chat_pick_contact"] = "Choose from contacts\xE2\x80\xA6";
strings_["chat_no_z_contacts"] = "No shielded-address contacts yet";
strings_["chat_contact_needs_z"] = "Needs a shielded (z) address to chat";