GRI-1917: push playlist content edits to assigned devices #130

Merged
vivy merged 1 commit from fix/GRI-1917-push-on-playlist-edit into dev 2026-11-11 07:37:46 +00:00
Member

Fixes grimoire-of-digital-signage#129 / GRI-1917.

Problem

plan/shared/protocol.md:104 specifies PlaylistPush is sent "once on
assignment and again on every change to the device's assigned playlist."
replace_items (the handler for PUT /playlists/{playlist_id}/items) only
wrote the new items to the store and never pushed to any device already
assigned that playlist, so a connected device never learned about a content
edit until its next reconnect.

Fix

replace_items now looks up which device(s) are currently assigned the
edited playlist (new store::devices_assigned_to query) and calls the same
push path assign_playlist uses — a fresh MediaManifest, PlaylistPush
and TransferOffers — for each of them.

Test plan

  • Added editing_an_assigned_playlist_s_items_pushes_the_change_to_its_device
    in crates/server/tests/ws_integration.rs: connect + assign a device, edit
    the playlist's items, assert a fresh push arrives with no reconnect.
  • scripts/local-gates.sh --rust-only — every gate passed.
Fixes grimoire-of-digital-signage#129 / GRI-1917. ## Problem `plan/shared/protocol.md:104` specifies `PlaylistPush` is sent "once on assignment and again on every change to the device's assigned playlist." `replace_items` (the handler for `PUT /playlists/{playlist_id}/items`) only wrote the new items to the store and never pushed to any device already assigned that playlist, so a connected device never learned about a content edit until its next reconnect. ## Fix `replace_items` now looks up which device(s) are currently assigned the edited playlist (new `store::devices_assigned_to` query) and calls the same push path `assign_playlist` uses — a fresh `MediaManifest`, `PlaylistPush` and `TransferOffer`s — for each of them. ## Test plan - [x] Added `editing_an_assigned_playlist_s_items_pushes_the_change_to_its_device` in `crates/server/tests/ws_integration.rs`: connect + assign a device, edit the playlist's items, assert a fresh push arrives with no reconnect. - [x] `scripts/local-gates.sh --rust-only` — every gate passed.
GRI-1917: push playlist content edits to assigned devices
Some checks failed
CI / the pre-push hook (pull_request) Successful in 11s
CI / cargo fmt (pull_request) Successful in 11s
CI / cargo deny advisories (pull_request) Failing after 1m42s
CI / cargo deny (pull_request) Successful in 1m46s
CI / cargo clippy (pull_request) Successful in 10m15s
CI / repository boundary (pull_request) Successful in 9s
CI / frontend-web (pull_request) Successful in 10m1s
CI / cargo test (pull_request) Successful in 12m25s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 4s
b57a3baf61
replace_items now looks up devices currently assigned the edited
playlist and pushes MediaManifest/PlaylistPush/TransferOffer to each,
same as assign_playlist does on a fresh assignment, per
plan/shared/protocol.md:104 (push on every change to the assigned
playlist, not only on assignment).
Author
Member

CI: the required CI / CI check passed on b57a3baf (clippy, fmt, cargo test, cargo deny licenses, frontend-web, repository boundary, pre-push hook all green). cargo deny advisories is red, but that's pre-existing on dev (unmaintained proc-macro-error pulled in transitively via gtk/webkit2gtk/wry in the client crate) — nothing this branch touches, and not part of the required CI check. Ready to merge into dev.

CI: the required `CI / CI` check passed on `b57a3baf` (clippy, fmt, cargo test, cargo deny licenses, frontend-web, repository boundary, pre-push hook all green). `cargo deny advisories` is red, but that's pre-existing on `dev` (unmaintained `proc-macro-error` pulled in transitively via `gtk`/`webkit2gtk`/`wry` in the client crate) — nothing this branch touches, and not part of the required `CI` check. Ready to merge into `dev`.
vivy merged commit eb0de5bf7a into dev 2026-11-11 07:37:46 +00:00
vivy deleted branch fix/GRI-1917-push-on-playlist-edit 2026-11-11 07:37:47 +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!130
No description provided.