Repository source: docs/concepts/private_message_history.md
Private-message history
Name: History recovery Purpose: Let approved devices with private access read older originals using retained encrypted access from eligible devices. Scenario: A newly approved device visits Messages, validates a donor transfer and the original signature, and can still read after a reload. Private keys and plaintext stay browser-side. Sources: service (source unavailable), browser crypto (source unavailable), operations and API.
Name: Sender assistance Purpose: Let original senders contribute access to their outgoing messages for approved recipient keys. Scenario: A sender visits an ordinary page and supplies encrypted access; subsequent combined checks omit that donor's retained contribution without consulting recipient read or recovery receipts. Another donor and explicit legacy repair remain possible. Sources: service (source unavailable), contribution store (source unavailable).
Name: Pulled history Purpose: Keep history access working after a member pulls their mail into a local clone. Scenario: The clone stores pulled transfers under their original IDs. The browser verifies them like any target device, then confirms them on the source through the local relay, so later donors stop redoing that work. See local development import. Sources: import methods (source unavailable), relay actions (source unavailable).
Name: Messaging history eligibility Purpose: Avoid dedicated background history synchronization for accounts with no messages. Scenario: An unused account browses quietly. Its first send or receipt changes the next unread response and enables synchronization on ordinary refresh, including on a new device. Eligibility is derived account history, not membership or a browser-local usage marker. Sources: message store (source unavailable), coordinator (source unavailable).
Name: Unread status Purpose: Report unread conversations and supply account history eligibility through the existing authenticated status request. Scenario: Navigation and conversation lists refresh the same unread state; the coordinator shares validated identity-bound eligibility with history sync without adding another discovery request. Unread/read semantics and existing retry controls are retained. Sources: unread coordinator (source unavailable), read state (source unavailable).
Name: Private foreground key activity Purpose: Help recently used same-account devices receive recovery material promptly without starving older devices. Scenario: Approved sign-in or foreground unread refresh records private coalesced activity. Three recent-target selections alternate with a stable-order fairness selection; background sync and recipient activity never promote a sender's targets. Sources: activity and schedule store (source unavailable), scheduler (source unavailable).
Name: Bounded history continuation
Purpose: Finish useful recovery during an ordinary visible visit, then stop repeated work.
Scenario: Ten-original, twelve-attempt background turns yield between batches and honor admission delays. Every tab of a key shares one pacing record in browser storage (backoff and sends in the last 10 s, at most 14), so tabs, foreground reads and receipts never spend the same server budget twice; the next turn waits until the window has room for a full turn, and a receipt deferred by backoff stays queued. A public_only refusal stops sync for the page. Foreground readers take priority between turns. Settled revision-aware passes use one small response; new relevant data reopens recovery. A recorded submitting key is a verification hint, not proof of the original encrypted signer; bounded fallback preserves other approved signers and existing send acceptance.
Sources: coordinator (source unavailable), service (source unavailable), acceptance, pacing.
Name: Saved message copies
Purpose: Let a conversation this browser has already read open without decrypting it again.
Scenario: With FORUM_PRIVATE_MESSAGE_CACHE_ENABLED, each verified read on a conversation page or Messages list preview is saved in the browser, encrypted with a key the browser generated and cannot export, and bound to the identity fingerprint. The next visit shows those messages before revealing the transcript (and fills list previews before the list request returns), with no fetch or OpenPGP; new messages read live. Only messages the server still lists are looked up, so retracted messages never reappear. A saved copy keeps the check mark it earned when first read. Any storage failure is a miss. Removing the browser identity deletes the copies and their key. This is the approved exception to keeping plaintext in browser memory only.
Sources: cache (source unavailable), reader (source unavailable), list (source unavailable), plan.