Skip to content

feat(sync): let devices share confirmed deletions through a syncDeletions collection - #49

Merged
D3SOX merged 1 commit into
mainfrom
sync-deletions
Nov 18, 2026
Merged

D3SOX merged 1 commit into
mainfrom
sync-deletions

Conversation

@D3SOX

@D3SOX D3SOX commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

OpenTubeX asks before applying deletions that would empty a synced list, because it can't tell another device's deletion from a server that lost the data. When you unsubscribe from 3 or more channels on one device, sync pauses on your other devices until someone confirms there. OpenTubeX#3342 lets a device share the deletions its user confirmed in an encrypted syncDeletions collection, so the other devices apply them without asking. The app only does this when /health reports sync_deletions: 1.

The server now accepts the syncDeletions collection with a 16 MiB limit and reports sync_deletions: 1. The README lists the collection and the capability. Clients share this collection across profiles, so it has no per-profile scope.

Proof: the existing limit and /health tests now cover the collection and the capability. cargo test (107 tests), cargo fmt --check and cargo clippy --all-targets pass. I ran this branch locally and pointed the OpenTubeX network sync E2E tests at it: 12 passed and 1 skipped by design. That includes a new two-device test from OpenTubeX#3365, in which one device removes all 3 subscriptions and the other applies the removal and keeps automatic sync on. With sync_deletions hidden from /health, the same test fails with "Sync stopped because it would delete 3 of 3 previously synced subscriptions items".

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

View guided diff Turn on auto-fix

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The server adds the sync_deletions capability, advertises it with value 1, and accepts the syncDeletions collection with a 16 MiB limit. Tests and the README reflect these additions.

Changes: sync_deletions support

Layer / File(s) Summary
Capability and collection support
src/dto.rs, src/handlers/encrypted_sync.rs, src/handlers/health.rs, README.md
SyncCapabilities adds sync_deletions. The encrypted-sync handler advertises the capability as 1 and accepts syncDeletions with a 16 MiB limit. Tests and the README cover these declarations.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: bnyro

Merge Risk: Minimal · up to 8c2d9

This change advertises the sync_deletions capability and accepts the syncDeletions collection with a 16 MiB limit. It is additive and covered by tests and documentation. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a syncDeletions collection that lets devices share user-confirmed deletions. It matches the changeset, which adds the collection, its 16 MiB limit, and the sync_deleti…
Description check Passed The description explains the purpose (sharing confirmed deletions through an encrypted syncDeletions collection), the capability gate on /health, the 16 MiB limit, the README update, and the test and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a syncDeletions collection that lets devices share user-confirmed deletions. It matches the changeset, which adds the collection, its 16 MiB limit, and the sync_deletions capability. It uses the conventional feat(sync) prefix and is specific.

Full details: Description check

Explanation

The description explains the purpose (sharing confirmed deletions through an encrypted syncDeletions collection), the capability gate on /health, the 16 MiB limit, the README update, and the test and E2E evidence. It is directly related to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4c900fd7-42ff-4c4d-a4ff-31336d9b1155
Commits

Reviewing files that changed from the base of the PR and between 389d21e and 8c2d902.

Files selected for processing: 4

  • README.md
  • src/dto.rs
  • src/handlers/encrypted_sync.rs
  • src/handlers/health.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@sourcery-ai

sourcery-ai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Sorry @D3SOX, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 10 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@D3SOX
D3SOX merged commit cdbbb38 into main Nov 18, 2026
19 checks passed
@D3SOX
D3SOX deleted the sync-deletions branch November 18, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant