diff --git a/README.md b/README.md index 4d527146..71373636 100644 --- a/README.md +++ b/README.md @@ -505,7 +505,7 @@ The data directory is `~/Library/Application Support/tinyclient` on macOS, `$XDG - **Calls** connect mediad to Discord's voice servers, Telegram's voice reflectors/SFU, or the Tiny server's own media port. Telegram 1:1 voice calls use MTProto 2.0 end-to-end encryption with 4 verification emoji; Telegram group voice chats join via WebRTC (DTLS-SRTP) and are not end-to-end encrypted. A Tiny server call is end-to-end encrypted only when that server offers `e2ee_calls` and every app in the call can do it. Otherwise the call says "Encrypted to the server". What that lock does and does not promise is in [SECURITY.md](SECURITY.md). When a Tiny call turns on screen share, camera, or watching a picture, and Cisco's OpenH264 library is not already on disk, mediad downloads it from Cisco. A voice-only call does not. - **Messages** texts go through the paired Android phone. The phone has to stay online. - **TLS** is the operating system's (Security.framework, SChannel, OpenSSL) for every network but Signal, whose libraries use rustls pinned to Signal's own certificate authority. -- **Retention.** By default, the newest 2,000 messages per conversation, and nothing older than 90 days unless you opened the conversation in that time. Settings can keep messages for 7, 30, or 90 days. Unsent messages stay. Signing out of an account asks the network to end the session where it can, takes that account out of the network's credential item, and deletes the item when it was the last account. It deletes that account's rows and its media files. The database is not vacuumed, so deleted text can remain in free pages of `chat.sqlite` until SQLite reuses them. +- **Retention.** By default, the newest 2,000 messages per conversation, and nothing older than 90 days unless you opened the conversation in that time. Settings can keep messages for 7, 30, or 90 days. Signal messages are the exception and are kept until you clear them, because Signal does not send them again. Unsent messages stay. Signing out of an account asks the network to end the session where it can, takes that account out of the network's credential item, and deletes the item when it was the last account. It deletes that account's rows and its media files. The database is not vacuumed, so deleted text can remain in free pages of `chat.sqlite` until SQLite reuses them. - **The local socket** is not authenticated. Any process running as your user can connect to it, as it can read your files. - **Signal** does not show safety numbers yet, and a contact's new identity key is trusted automatically, as presage's own stores do. diff --git a/docs/architecture.md b/docs/architecture.md index 846ea8fd..f0e050ca 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -260,7 +260,7 @@ changing again replaces its entry, so the list is bounded (256) by how many thin | Presence and activity, typing, voice occupants, what the shell watches, links and capabilities, the change list, the call, upload progress, previews asked, and five minutes of profiles, info panes and catalog pages (64 / 64 / 16 / 32 at most) | chatd memory, bounded, gone at restart. | | Files opened in another app under their own names | `open/` in the support directory: hard links into the cache, emptied when the shell starts. | | Panics, chatd's stderr | `crash.log` (cut at 256 KB), `chatd.log` (cut at 4 MB at start) in the support directory. | -| Retention | Newest 2,000 messages per conversation (`KEEP_MESSAGES`). Nothing older than the retention the user chose, 7, 30 or 90 days, default 90, unless the conversation was opened in that time. A thread row that names its parent goes when its parent goes, or when its root message has aged out and nobody opened the thread in that same window. `Store::prune`, at start and daily. | +| Retention | Newest 2,000 messages per conversation (`KEEP_MESSAGES`). Nothing older than the retention the user chose, 7, 30 or 90 days, default 90, unless the conversation was opened in that time. Neither rule touches Signal: no server serves its messages again. A thread row that names its parent goes when its parent goes, or when its root message has aged out and nobody opened the thread in that same window. `Store::prune`, at start and daily. | ## What an adapter must do diff --git a/docs/design/09-settings.md b/docs/design/09-settings.md index 62f90cdb..1a374de2 100644 --- a/docs/design/09-settings.md +++ b/docs/design/09-settings.md @@ -182,7 +182,7 @@ Caption: "Text size is also ⌘+, ⌘− and ⌘0. Reduce Motion and Increase Co | | "Keep messages on this Mac for" (P4) | Segmented: "7 days" / "30 days" / "90 days" | | | Calls | "Only join end-to-end encrypted calls" (PE) | Switch | Caption: "When a server turns a call's encryption off, the call stops until you choose to carry on unencrypted. With this on you can't: you leave instead, and a Tiny server that cannot encrypt calls is not joined. Always the case on Incognito servers and in rooms that require it. Takes effect the next time you join." | -Captions. Under the read group: "Discord and Slack have no read receipts." If no signed-in account has receipts, the group is just that caption under the label. Under P4: "Older messages are deleted here, never on the networks. Each conversation also keeps at most its newest 2,000." +Captions. Under the read group: "Discord and Slack have no read receipts." If no signed-in account has receipts, the group is just that caption under the label. Under P4: "Older messages are deleted here, never on the networks. Each conversation also keeps at most its newest 2,000. Signal messages are kept until you clear them: Signal does not send them again." **Shortening P4 asks first**, because it deletes. Modal (01, 440): "Delete messages older than 7 days?" / "41,210 messages, about 12 MB, are removed from this Mac. They stay on Slack, Discord and the others." / "Cancel" · danger "Delete". Unknown counts are dropped from the sentence, as in 08 §6. Lengthening applies without a question. diff --git a/docs/product/05-navigation.md b/docs/product/05-navigation.md index 0bb0a72f..b5b23c79 100644 --- a/docs/product/05-navigation.md +++ b/docs/product/05-navigation.md @@ -173,6 +173,6 @@ The Inbox is directs and group directs, starred channels, and channels that ment Discord subscribes to a large server when one of its channels is open, and drops that subscription on leaving. -Search retention is 2,000 messages and 90 days (`KEEP_MESSAGES`, `KEEP_DAYS`). Settings › Privacy can shorten the age. The cache is unencrypted. See `07-budgets-and-risk.md`. There is no FTS index. +Search retention is 2,000 messages and 90 days (`KEEP_MESSAGES`, `KEEP_DAYS`), except for Signal, which keeps everything. Settings › Privacy can shorten the age. The cache is unencrypted. See `07-budgets-and-risk.md`. There is no FTS index. N17 (preview and join an unjoined Slack channel) and N23 (join a public Telegram channel) were not confirmed. Keyboard shortcuts were not diffed one by one against `shortcuts.rs`. diff --git a/docs/product/07-budgets-and-risk.md b/docs/product/07-budgets-and-risk.md index 4f7d9bdd..0a2952e4 100644 --- a/docs/product/07-budgets-and-risk.md +++ b/docs/product/07-budgets-and-risk.md @@ -64,7 +64,7 @@ Per-item costs behind the heavy-account row (decoded pixels are 4 bytes each, at | Slack boot | Keep `client.counts` as the only listing call. Page channel lists on demand when the browser is opened. No `client.userBoot`, no `users.list`. | Boot payloads are MBs on large workspaces *(unverified size)*. | | Emoji | Unicode emoji come from the system font. Custom emoji are fetched when first drawn, at 48 px, into the avatar-style cache. The picker loads one server's set at a time. | A bundled emoji set is 10+ MB on disk and in memory. | | Search | Search on Enter asks the network (`SearchNetwork`). Local search is `SearchMessages` over the cache. There is no FTS index. | An FTS index would add roughly 30 to 50% to the message table. It is not in this commit. | -| SQLite growth | Keep the newest 2,000 messages per conversation and nothing older than 90 days unless the conversation was opened in that time (`KEEP_MESSAGES`, `KEEP_DAYS`). Settings › Privacy can shorten the age. Prune at start and daily. | At about 300 B a row, 1,000 conversations x 2,000 = 600 MB without the age rule; with it, under 200 MB. | +| SQLite growth | Keep the newest 2,000 messages per conversation and nothing older than 90 days unless the conversation was opened in that time (`KEEP_MESSAGES`, `KEEP_DAYS`). Signal keeps everything, because no request brings one of its messages back. Settings › Privacy can shorten the age. Prune at start and daily. | At about 300 B a row, 1,000 conversations x 2,000 = 600 MB without the age rule; with it, under 200 MB. A Signal account's store grows with the history its phone synced to it, outside this budget. | | grammers | Runs on the adapter's thread inside chatd, and only while a Telegram account exists or a sign-in has started. It does not keep a second database. If a later measurement blows the chatd budget, that is a new decision. It is not the current design. | The TDLib 30–50 MB row does not apply. The +0.2 MB / +1.2 MB figures are the comment in `telegram.rs`. | | Message window | The shell holds at most 300 messages; older ones page in 50 at a time from chatd and fall off the other end. | 5,000 shaped messages would otherwise cost tens of MB. | @@ -169,7 +169,7 @@ Rules: `TINYCLIENT_DIR` replaces it for tests. `chat.sqlite` and `media//` (avatars, thumbnails, custom emoji) live there, files named by content hash. Sessions stay in the keychain or the system keyring, one item per network. Slack workspaces and Tiny servers share that one item and are split by the adapter. Nothing goes to temp directories; logs hold no message bodies or tokens. -- Caps: media 500 MB (`CACHE_BYTES`), least recently used evicted; messages default to 2,000 per conversation and 90 days (`KEEP_MESSAGES`, `KEEP_DAYS`), unless the conversation was opened in that window. Settings › Privacy can shorten the age. Under 1 GB in total, checked with `du -sk`. +- Caps: media 500 MB (`CACHE_BYTES`), least recently used evicted; messages default to 2,000 per conversation and 90 days (`KEEP_MESSAGES`, `KEEP_DAYS`), unless the conversation was opened in that window. Signal's messages are not capped, since no server serves them again. Settings › Privacy can shorten the age. Under 1 GB in total without Signal history, checked with `du -sk`. - Full-size images and files are fetched when opened and saved only where the user chooses. - Sign-out deletes that network's rows, its `media/` directory and its session, then vacuums so the bytes leave the file. e2e check: no row and no file for that network remains. - The cache is unencrypted and relies on the disk's own encryption. The README already says so. diff --git a/docs/product/09-settings.md b/docs/product/09-settings.md index 06266e84..8be9a6c6 100644 --- a/docs/product/09-settings.md +++ b/docs/product/09-settings.md @@ -226,7 +226,7 @@ no control. | PL | Confirm before opening links | Switch | On | G | s | A click on a web link in a message shows the site it really goes to (registrable domain, with punycode decoded and the `xn--` form beside it for an internationalised name) and offers Open, Copy link and Cancel, plus "Don't ask again for ", kept on this device (`link_ok` lines in `shell.prefs`; "Forget all" is PF). Off: links open at once. A name that mixes alphabets or passes for Latin letters, or an address with a user name before the `@`, is always asked about, and never gets "Don't ask again". Only http and https are ever links | in | | PS | Strip tracking parameters when opening | Switch | Off | G | s | On: `utm_*`, `fbclid`, `gclid`, `mc_eid`, `igshid` and the like are taken out of the address as it opens; the rest of the address is untouched. The address is handed to the system's opener alone, so no page is the referrer | in | | PF | Sites that open without asking | Button "Forget all" | | G | s | Shown only when "Don't ask again" has been used. Clears the list | in | -| P4 | Keep messages on this computer for | Segmented: "7 days" / "30 days" / "90 days" | 90 days | G | d | The age half of the retention rule (`store.rs`); the 2,000 per conversation cap stays. Pruned within 1 min of the change and daily | in | +| P4 | Keep messages on this computer for | Segmented: "7 days" / "30 days" / "90 days" | 90 days | G | d | The age half of the retention rule (`store.rs`); the 2,000 per conversation cap stays. Neither touches Signal, which keeps its history whole. Pruned within 1 min of the change and daily | in | | PE | Only join end-to-end encrypted calls | Switch | Off | G | s | Off on purpose: a server or an app that cannot encrypt calls would stop working. Either way a Tiny call whose server turns encryption off stops sending and playing ("Encryption was turned off" on the call badge); off, the security panel offers "Carry on without encryption", on, it offers only leaving, and a server with no end-to-end calls is not joined. Incognito hosts (`incognito.tinyclient.io` and names under it) and `e2ee_required` rooms behave as on whatever the switch says. Read when a call is joined | in | | P5 | Hide tinyclient from screen sharing and recordings | Switch | | G | s | | Later (spike: macOS 15 capture may ignore `sharingType`) | | P6 | Lock tinyclient | Off, after 1 minute, after 5 minutes, after 1 hour, and when the screen locks | Off | G | s | Covers the window. A notification then says "New message" with no sender or text, and Reply is refused. A ring can still be answered. Unlock uses device approval; Linux keeps a passphrase hash in the window prefs. The cache is not encrypted. A phone hides the app switcher while the lock is on. | in |