GRI-1962: push the changed playlist to its devices on a media delete #167

Merged
vivy merged 2 commits from fix/GRI-1962-push-playlist-on-media-delete into dev 2026-11-13 20:37:05 +00:00
Member

Summary

  • DELETE /api/v1/media/{id}?remove_from_playlists=true removed the playlist items referencing the deleted media but never pushed the updated playlist to the devices showing it — a screen kept the deleted document on air until some unrelated edit happened to push it a fresh assignment.
  • media::store::delete_removing_playlist_refs now also returns, inside the same transaction, the distinct playlist ids it detached an item from.
  • media::handlers::delete_media pushes each of those playlists to its assigned devices through a new playlists::handlers::push_playlist_to_assigned_devices, the same MediaManifest/PlaylistPush/TransferOffer sequence a PUT .../items edit already sends — refactored replace_items to share the per-device push loop (push_to_assigned_devices) instead of duplicating it a third time.

Follow-up to #163 (GRI-1962), field feedback from the product owner after merge (forge #155 comment, 2026-11-13T17:54Z).

Test plan

  • New ws_integration::deleting_media_used_by_an_assigned_playlist_pushes_the_change_to_its_device: a connected device, assigned a playlist with the one item being deleted, receives a fresh PlaylistPush (items: []) from the delete itself, no further edit needed.
  • cargo test -p server --test media_integration --test ws_integration --test playlist_integration --test playlist_acceptance_integration -- --include-ignored — 56/56 pass.
  • cargo test -p server --lib — 162/162 pass.
  • cargo clippy -p server --all-targets -- -D warnings — clean.
## Summary - `DELETE /api/v1/media/{id}?remove_from_playlists=true` removed the playlist items referencing the deleted media but never pushed the updated playlist to the devices showing it — a screen kept the deleted document on air until some unrelated edit happened to push it a fresh assignment. - `media::store::delete_removing_playlist_refs` now also returns, inside the same transaction, the distinct playlist ids it detached an item from. - `media::handlers::delete_media` pushes each of those playlists to its assigned devices through a new `playlists::handlers::push_playlist_to_assigned_devices`, the same `MediaManifest`/`PlaylistPush`/`TransferOffer` sequence a `PUT .../items` edit already sends — refactored `replace_items` to share the per-device push loop (`push_to_assigned_devices`) instead of duplicating it a third time. Follow-up to #163 (GRI-1962), field feedback from the product owner after merge (forge #155 comment, 2026-11-13T17:54Z). ## Test plan - [x] New `ws_integration::deleting_media_used_by_an_assigned_playlist_pushes_the_change_to_its_device`: a connected device, assigned a playlist with the one item being deleted, receives a fresh `PlaylistPush` (items: []) from the delete itself, no further edit needed. - [x] `cargo test -p server --test media_integration --test ws_integration --test playlist_integration --test playlist_acceptance_integration -- --include-ignored` — 56/56 pass. - [x] `cargo test -p server --lib` — 162/162 pass. - [x] `cargo clippy -p server --all-targets -- -D warnings` — clean.
GRI-1962: push the changed playlist to its devices on a media delete that detaches it
Some checks failed
CI / the pre-push hook (pull_request) Successful in 28s
CI / cargo fmt (pull_request) Failing after 28s
CI / cargo deny (pull_request) Successful in 1m46s
CI / cargo deny advisories (pull_request) Failing after 1m45s
CI / cargo clippy (pull_request) Successful in 2m32s
CI / repository boundary (pull_request) Successful in 1m16s
CI / frontend-web (pull_request) Successful in 2m2s
CI / cargo test (pull_request) Failing after 14m10s
CI / Notify gate failed (pull_request) Successful in 39s
CI / CI (pull_request) Failing after 39s
16cb9800e6
GRI-1962: run cargo fmt
Some checks failed
CI / the pre-push hook (pull_request) Successful in 1m43s
CI / cargo fmt (pull_request) Successful in 2m3s
CI / cargo clippy (pull_request) Successful in 2m51s
CI / cargo deny (pull_request) Successful in 3m2s
CI / cargo deny advisories (pull_request) Failing after 2m17s
CI / frontend-web (pull_request) Successful in 2m39s
CI / repository boundary (pull_request) Successful in 32s
CI / cargo test (pull_request) Successful in 8m28s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 23s
a1528ce201
vivy merged commit 8b987ab896 into dev 2026-11-13 20:37:05 +00:00
vivy deleted branch fix/GRI-1962-push-playlist-on-media-delete 2026-11-13 20:37:05 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!167
No description provided.