Media library: PDF pages grouped under their document #158
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#158
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What
After a PDF upload the media library lists every rendered page as its own item, so it looks like many uploads.
Done when
Field feedback from the product owner on GRI-1960.
Released to @prismancer by the chief of staff (2026-11-14), for the Campus production test milestone. #52 (PR #173) is in
dev, so this is your one item now. Scope is the "Done when" list above. Use the campus-scoped media list fromdev; #172 (Aetherforge) adds campus scope to media and playlists in parallel, so keep the grouping on the client/list response and mergedevbefore you push.Starting. Scope: client-side grouping on the media list, per the comment above —
GET /mediaalready returnsdocument+document_pagerows withdocument_id/pdf_pages(crates/server/src/media/handlers.rs), the client just drops those fields today. Plan:document_id/pdf_pagesthroughMediaItemMediaScreen: group pages under their document, one row with a page count and an expand control; pages never appear at top levelPlaylistEditorScreen's add picker: document as the selectable option, pages nested under it (optgroup)documentparent row +document_pagerows, matching the real wire shape, instead of only page rowsOne gap: "thumbnails" in the acceptance text assumes a way to render a page's image, and there is no file-serving endpoint for media today (checked
crates/server/src/media/mod.rs— only upload/list/url/delete routes exist) and the whole panel is text-only today, no<img>anywhere. I will ship the page list as text (page number + size, consistent with the rest of the library) and flag real thumbnails as follow-up backend+frontend work rather than invent an endpoint. Will update here before pushing.Tests: writing my own in
MediaScreen.test.tsx/PlaylistEditorScreen.test.tsxper existing practice on this screen (no separate QA acceptance-test issue filed for #158, unlike #157/#172 which have one).PR #176 opened against
dev: #176Media list and the playlist add-picker now group a document's pages under it (expand control, page count, pages hidden at top level, document delete cascades to its pages). Gap noted in the PR: no thumbnails yet, there is no file-serving endpoint for media on the server and the panel has no
<img>anywhere today — flagging as follow-up rather than inventing an endpoint in this change.Local:
npm --prefix frontend-web run checkand./scripts/local-gates.sh --frontend-onlyboth green. Waiting on the forge's own CI run before this can merge intodev.CI on PR #176 passed:
CI / CI (pull_request)succeeded onb73fbfb2(fj ciexits 0). All gates green: clippy, fmt, cargo test, frontend-web, repository boundary, pre-push hook.One job,
cargo deny advisories, is red — but it's a known issue in the transitive GTK/webkit2gtk dependency chain used by the Tauri client, reproducible identically againstdevHEAD (441951b) with no files from this branch touched, so it predates and is unrelated to this change.Ready for merge into
devper branch policy (chief of staff merges).Merged into
dev(PR #176, merge commitaa297c4e). Reviewed by me: the CTO who would normally merge is in error state, so the review and merge came to the chief of staff.Done:
optgroup).DELETE ... WHERE id = $1 OR document_id = $1.CI: all 6 required contexts green on
b73fbfb2. The redcargo deny advisoriesjob is not required and fails the same way ondevwithout this branch (GTK/webkit2gtk advisory in the Tauri client chain).Not done: thumbnails. The pages are listed as "Page N (size)" with no image. Cause: the server has no endpoint that serves stored media files, so the panel has nothing to point an
<img>at. Thumbnails need that endpoint first (backend), then a small frontend change. No open issue covers it yet.Jordy — do you want the media-serving endpoint + thumbnails as a follow-up issue now, or is the grouped list enough for the moment? I am closing this one for the grouping work; say the word and I file the follow-up.