Panel: uncheck a device to unassign it from a playlist #224

Closed
opened 2026-11-15 16:53:00 +00:00 by vivy · 2 comments
Owner

#209 landed only the server half: DELETE /devices/{id}/playlist exists and pushes PlaylistCleared. The panel never calls it. PlaylistDevicesTab.tsx disables the checkbox of an assigned device (disabled={alreadyAssigned}, label "(already assigned)"), so the product owner cannot unassign on the test server.

Expected (as #209 described): assigned devices are checked and can be unchecked; Save assigns the new ones and unassigns the unchecked ones. Plus "no playlist" from the Devices screen. Panel tests for both.

#209 landed only the server half: `DELETE /devices/{id}/playlist` exists and pushes PlaylistCleared. The panel never calls it. `PlaylistDevicesTab.tsx` disables the checkbox of an assigned device (`disabled={alreadyAssigned}`, label "(already assigned)"), so the product owner cannot unassign on the test server. Expected (as #209 described): assigned devices are checked and can be unchecked; Save assigns the new ones and unassigns the unchecked ones. Plus "no playlist" from the Devices screen. Panel tests for both.
Member

Fixed in PR #237 (branch fix/GRI-2107-unassign-device-from-playlist): PlaylistDevicesTab's checkbox is no longer disabled for an already-assigned device; Save now diffs the selection against the current assignment, assigning the newly-checked devices and unassigning (DELETE /devices/{id}/playlist) the unchecked ones. DevicesScreen also gets an "Unassign playlist" action for the "no playlist" path.

@astraea two pre-existing assertions in frontend-web/src/screens/PlaylistsScreen.test.tsx now encode the superseded behavior and fail against this change — I did not edit them:

  • adds a media item on the Media tab, saves, then assigns the playlist on the Devices tab asserts the already-assigned checkbox toBeDisabled().
  • assigns a playlist to several devices in one click, on the Devices tab asserts a button named /^assign$/i and status text /^assigned\.$/i.

Both need updating to match #209's own acceptance criteria (checkbox stays enabled and uncheckable; the action is now Save, which both assigns and unassigns). Local gates otherwise green: prettier/oxlint/tsc/build pass, vitest 94/96 (the 2 failures are exactly these two assertions).

Fixed in PR #237 (branch `fix/GRI-2107-unassign-device-from-playlist`): PlaylistDevicesTab's checkbox is no longer disabled for an already-assigned device; Save now diffs the selection against the current assignment, assigning the newly-checked devices and unassigning (DELETE /devices/{id}/playlist) the unchecked ones. DevicesScreen also gets an "Unassign playlist" action for the "no playlist" path. @astraea two pre-existing assertions in `frontend-web/src/screens/PlaylistsScreen.test.tsx` now encode the superseded behavior and fail against this change — I did not edit them: - `adds a media item on the Media tab, saves, then assigns the playlist on the Devices tab` asserts the already-assigned checkbox `toBeDisabled()`. - `assigns a playlist to several devices in one click, on the Devices tab` asserts a button named `/^assign$/i` and status text `/^assigned\.$/i`. Both need updating to match #209's own acceptance criteria (checkbox stays enabled and uncheckable; the action is now Save, which both assigns and unassigns). Local gates otherwise green: prettier/oxlint/tsc/build pass, vitest 94/96 (the 2 failures are exactly these two assertions).
Member

Re-flagging: PlaylistsScreen.test.tsx needs 2 stale assertions updated (checkbox no longer disabled when assigned; button/status text changed) plus a new uncheck->Save->unassign test, per #209's acceptance criteria. Flagged at 17:28, no response from astraea as of 19:3x (~2h). astraea shows idle on the board. I cannot edit QA's tests myself per my role. Escalating availability to Vivy on the board issue.

Re-flagging: PlaylistsScreen.test.tsx needs 2 stale assertions updated (checkbox no longer disabled when assigned; button/status text changed) plus a new uncheck->Save->unassign test, per #209's acceptance criteria. Flagged at 17:28, no response from astraea as of 19:3x (~2h). astraea shows idle on the board. I cannot edit QA's tests myself per my role. Escalating availability to Vivy on the board issue.
vivy closed this issue 2026-11-15 20:49:22 +00:00
Sign in to join this conversation.
No project
No assignees
2 participants
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#224
No description provided.