Playlist editor: cogwheel and page list for per-page overrides on a PDF item #185

Closed
opened 2026-11-14 06:13:37 +00:00 by vivy · 3 comments
Owner

Follow-up to #157. The backend landed in dev with PR #182 (Nyssa, tests by Astraea in #175). The editor part of #157 did not, and #157 closed with the merge.

What is in dev now

  • A document playlist item stores sparse page_overrides {page_number -> seconds | skip} (migration 0007). No override = item default.
  • Pages are expanded at push time, so the wire protocol and the device client are unchanged. Offline playback works from the synced playlist.
  • GET /media/{id}/file serves page images for thumbnails.
  • Re-upload with fewer pages drops overrides for missing pages.

Wanted (editor)

  • A cogwheel on a document item in the playlist editor opens its page list, with page thumbnails.
  • Per page: own time in seconds, or skip. Empty = item default.
  • Save sends page_overrides on the item in PUT /playlists/{id}/items.

Done when

  • The cogwheel and page list work against the API in dev.
  • Frontend tests cover set, clear and skip of a page override.

Field feedback from the product owner on GRI-1960.

Follow-up to #157. The backend landed in `dev` with PR #182 (Nyssa, tests by Astraea in #175). The editor part of #157 did not, and #157 closed with the merge. ## What is in dev now - A `document` playlist item stores sparse `page_overrides` `{page_number -> seconds | skip}` (migration 0007). No override = item default. - Pages are expanded at push time, so the wire protocol and the device client are unchanged. Offline playback works from the synced playlist. - `GET /media/{id}/file` serves page images for thumbnails. - Re-upload with fewer pages drops overrides for missing pages. ## Wanted (editor) - A cogwheel on a `document` item in the playlist editor opens its page list, with page thumbnails. - Per page: own time in seconds, or skip. Empty = item default. - Save sends `page_overrides` on the item in `PUT /playlists/{id}/items`. ## Done when - The cogwheel and page list work against the API in dev. - Frontend tests cover set, clear and skip of a page override. Field feedback from the product owner on GRI-1960.
Member

Implemented: PR #186 (dev <- feature/GRI-2010-playlist-page-overrides-editor).

  • PlaylistItem gained an optional pageOverrides field, mirroring the server's sparse page_overrides map.
  • httpPlaylistsApi sends page_overrides on a document item when non-empty and reads it back from the server; omitted entirely when empty so the existing GRI-1937 wire test stays untouched.
  • PlaylistEditorScreen gained a cogwheel (⚙ Page overrides) on a document item, opening a per-page list with a thumbnail (GET /media/{id}/file), an own-time-in-seconds field and a skip checkbox. Empty = item default.
  • Tests: httpPlaylistsApi.test.ts (send/receive page_overrides, omit when empty) and PlaylistsScreen.test.tsx (set, clear and skip a page override, including after a save round-trip).

Verified locally with scripts/local-gates.sh --frontend-only (prettier, oxlint, tsc, vitest — 53 tests passing — and the production build), all green. CI is now running on #186.

Implemented: PR #186 (dev <- feature/GRI-2010-playlist-page-overrides-editor). - `PlaylistItem` gained an optional `pageOverrides` field, mirroring the server's sparse page_overrides map. - `httpPlaylistsApi` sends `page_overrides` on a `document` item when non-empty and reads it back from the server; omitted entirely when empty so the existing GRI-1937 wire test stays untouched. - `PlaylistEditorScreen` gained a cogwheel (⚙ Page overrides) on a `document` item, opening a per-page list with a thumbnail (`GET /media/{id}/file`), an own-time-in-seconds field and a skip checkbox. Empty = item default. - Tests: `httpPlaylistsApi.test.ts` (send/receive page_overrides, omit when empty) and `PlaylistsScreen.test.tsx` (set, clear and skip a page override, including after a save round-trip). Verified locally with `scripts/local-gates.sh --frontend-only` (prettier, oxlint, tsc, vitest — 53 tests passing — and the production build), all green. CI is now running on #186.
Member

CI is green on PR #186 (CI / CI aggregate passed on d34a7575). One sub-job, cargo deny advisories, is failing — that's a dependency-advisory check on the Rust workspace, unrelated to this frontend-only change, and not in scope here. Handing to the CTO for review/merge into dev.

CI is green on PR #186 (CI / CI aggregate passed on d34a7575). One sub-job, cargo deny advisories, is failing — that's a dependency-advisory check on the Rust workspace, unrelated to this frontend-only change, and not in scope here. Handing to the CTO for review/merge into dev.
Author
Owner

Done: merged into dev with PR #186 (CI green). Closing. Chief of staff.

Done: merged into dev with PR #186 (CI green). Closing. Chief of staff.
vivy closed this issue 2026-11-14 07:04:04 +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#185
No description provided.