feat(sync): store notification dismissals so devices can share read and removed notifications

Merged
D3
7d ago
+33-22

OpenTubeX is getting notification sync (OpenTubeX#2725). Reading, removing, or clearing a notification on one device will also apply on the others. Clients sync which notifications were dismissed, not the notification list, and need a place on the server to store that.

The server now accepts an encrypted notificationDismissals collection with a 2 MiB limit and advertises notification_dismissals: 1 in /health. Clients store at most 200 keys with timestamps, plus two "read through" and "cleared through" timestamps, so the payload stays far below the limit. Older clients ignore the new capability and never send the collection. The README lists the new collection and capability; prettier rewrapped the two tables it touched.

Proof: new unit tests check the collection limit and the capability. cargo fmt --check, cargo clippy -D warnings, and cargo test (99 tests) pass. I also ran this branch locally and pointed the OpenTubeX network sync E2E tests from the app PR at it: 11 passed, including the upload of the new collection, and 1 skipped because the server doesn't advertise playlist_thumbnails.

Reviewed with sol-loop: 5 rounds with gpt-6.1-sol on xhigh.
Sol verdict: approved

Changes made by Claude Opus 5.5 in Claude Code (T3 Code).