Repository navigation
Conversation
Tiny Code Reviewthe AI provider rate-limited the request This is advice, not a gate. Re-run with the |
unRekable
left a comment
There was a problem hiding this comment.
Code Review
🟢 No findings.
chatd's Signal adapter now mirrors Signal Desktop's delete model: delete-for-me syncs from the phone remove named messages or whole chats locally with no time limit, and a delete past Signal's one-day send window becomes a self-only sync instead of a delete for everyone. Incoming edits and deletes-for-everyone older than two days are ignored, Note to Self is exempt, and the existing edit_window capability is now reported for Signal. The design holds: no protocol field changes, the new enum variants stay inside the adapter, malformed sync entries are skipped without panicking, and the windows are covered by unit tests plus a lab prove hook in the established TINYCLIENT_PROVE pattern.
Residual risk
- In real.rs send(), group_context(to)? runs before the match, so a delete-for-me to a group whose master key is no longer in self.groups fails with "This group isn't one Signal still knows for you" and the local removal never runs; a self-sync needs no group key, but this gate predates the diff and every other send path shares it.
- deleted_for_me iterates the sync's message lists without a count cap; the source is the account's own devices (the sync is encrypted to self), the same pre-existing shape as the sync.read handling.
- An incoming delete-for-everyone whose target is older than two days is ignored, so this client can keep a message that other clients dropped; this mirrors the upstream receive window the change implements, and the divergence is cosmetic.
- A partial conversation delete removes only the newest messages the sync names; older history survives a phone-side partial chat delete, matching the proto's most-recent semantics the comment documents.
A message or chat deleted on the phone now leaves here. Past one day, Delete tells only this account's other devices. An edit or a delete for everyone older than two days is ignored. Closes #714
709c8ed to
3141ea1
Compare
What changed and why
A Signal message or chat deleted for me on the phone now disappears here, and a delete older than a day is no longer sent to everyone else. Within a day, Delete is still delete for everyone. Past that, it tells only this account's other devices and removes the message locally. An incoming edit or delete for everyone older than two days is ignored. Note to Self keeps delete for everyone with no time limit. The account reports a one-day edit window.
The message menu still offers Edit and Delete on every message of yours, because that menu is outside this change, and there is no delete-window field to report beside
edit_window. Earlier versions of an edit are not kept, because a message has no place for them. An attachment-only delete is not applied. A partial conversation delete removes the messages the sync names. Deleting a whole chat from this app is not sent: closing a direct chat is defined as hiding it without deleting. A full delete that arrives from the phone does drop the chat from the list.Type
Platforms
Proof
Scenario: e2e/scenarios/signal-delete-for-me
Lab run: the lab posts this under
e2e-proof.Tested with
cargo test -p chatd --no-default-features --test signalandcargo clippy -p chatd --no-default-features --all-targets. The Signal library build typechecks. Not tested against a live Signal account: the scripted wire covers the adapter, and the sync message is not sent to Signal's servers.Compatibility
No protocol field was added. Signal now reports the existing
edit_windowas one day. An older shell that does not read it is unchanged.Risk and rollback
A delete older than a day no longer reaches the other person. If that is wrong, revert this commit.
Release note
A Signal delete made on the phone now syncs, and a delete older than a day stays on this account only.