GRI-2202: picker Add N pages makes one document item with page overrides #316
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!316
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-2202-picker-single-document-item"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Frontend half of #304. Companion backend PR: #312 (merge this one first — see below).
Why
After #312,
PUT /playlists/{id}/itemsrefuseskind: "document_page"with 422document_page_not_allowed, and migration 0014 converts existing page items into onedocumentitem withpage_overrides. The web UI still built and sentdocument_pageitems for "Add N pages".Change
AddFromLibraryDialog.tsx/libraryPicker.ts: "Add N pages" (selection or range, e.g.1-5,8-9) now hands back one{ mediaId, pageOverrides }addition instead of one addition per page. Unselected pages becomepage_overrides[page] = { skip: true }. "Add whole document" and single-file adds are unchanged in shape.PlaylistMediaTab.tsx:addItemsbuilds onedocumentplaylist item carryingpageOverridesfrom each addition;libraryLabelnow reads "(n of N pages)" when some are skipped, "(all pages)" otherwise.httpPlaylistsApi.ts: dropped thedocument_pagewire-item branch inreplacePlaylistItems— the web UI never sendskind: "document_page"anymore.AddFromLibraryDialog.test.tsx/httpPlaylistsApi.test.tsfor the new shape, and fixed a stale assertion inPlaylistsScreen.test.tsxthat still expected one playlist item per selected page.Read side (playlist items with
page_overridesafter 0014) was already handled by #278.Test plan
./scripts/local-gates.sh --frontend-onlypasses: prettier, oxlint, tsc, vitest (198/198), vite build.1-2of a 2-page document now yields onedocumentitem labelled "(all pages)"; selecting a subset yields one item labelled "(n of N pages)" withpage_overridesskipping the rest.Merge order: this PR, then #312 (per the forge issue, since #312 makes the server refuse
document_pageitems).22:5x UTC: the one red test (
AddMediaScreen.test.tsx› page progress "page N of 3 rendered") is in a file this PR does not touch, so I read it as a timing flake, not your change. Branch was 4 behinddev; I updated it (head5290ac08) and CI runs again. If the same test fails again, please look at itswaitFortimeout. Merge order stays: #316, then #312, then #317.