Playlist ignores a later change of the default playtime #277

Closed
opened 2026-11-16 09:41:49 +00:00 by vivy · 25 comments
Owner

Product owner demo feedback, 2026-11-16 (GRI-2051): "I changed NO campus default playtime to 20 sec and the already existing playlist didn't use it."

Cause

playlists.default_duration_seconds is NOT NULL. When a playlist is created, the panel copies the current effective default (global or campus, playback_settings) into the playlist row (crates/server/src/playlists/store.rs:110). After that, the playlist never reads playback_settings again. So a later change of the global or campus default only reaches playlists created afterwards.

Same class: a PPTX video bakes the default dwell in at upload (crates/server/src/media/handlers.rs:430). A later default change does not reach it either. Decide and document whether that is intended (a re-render costs minutes).

Fix

  • playlists.default_duration_seconds becomes nullable. NULL = inherit (campus override, else global). A value = this playlist's own override.
  • Migration: every existing playlist whose value equals the default that was in effect becomes NULL. If that cannot be known, set all to NULL and say so in the release notes.
  • The effective value is resolved when the playlist is pushed to devices, and a change of the global or campus default re-pushes every affected playlist.
  • Panel: the playlist settings show "Default (20 s, from All campuses)" or the own value, with a way back to inherit.

Done when

A test: playlist created at default 10 s, global default changed to 20 s, the device receives 20 s without touching the playlist. A playlist with its own value keeps it.

Product owner demo feedback, 2026-11-16 (GRI-2051): *"I changed NO campus default playtime to 20 sec and the already existing playlist didn't use it."* ## Cause `playlists.default_duration_seconds` is `NOT NULL`. When a playlist is created, the panel copies the **current** effective default (global or campus, `playback_settings`) into the playlist row (`crates/server/src/playlists/store.rs:110`). After that, the playlist never reads `playback_settings` again. So a later change of the global or campus default only reaches playlists created afterwards. Same class: a PPTX video bakes the default dwell in at upload (`crates/server/src/media/handlers.rs:430`). A later default change does not reach it either. Decide and document whether that is intended (a re-render costs minutes). ## Fix - `playlists.default_duration_seconds` becomes nullable. `NULL` = **inherit** (campus override, else global). A value = this playlist's own override. - Migration: every existing playlist whose value equals the default that was in effect becomes `NULL`. If that cannot be known, set all to `NULL` and say so in the release notes. - The effective value is resolved when the playlist is pushed to devices, and a change of the global or campus default re-pushes every affected playlist. - Panel: the playlist settings show *"Default (20 s, from All campuses)"* or the own value, with a way back to *inherit*. ## Done when A test: playlist created at default 10 s, global default changed to 20 s, the device receives 20 s without touching the playlist. A playlist with its own value keeps it.
Member

Read the forge issue and the repo. Checked for a live branch of aetherforge's touching the same files: feature/GRI-2011-pptx-to-slide-images touches crates/server/src/media/handlers.rs (the PPTX-bake-in half of this issue), so I am leaving that file alone — scoping this fix to the playlist half only (playlists.default_duration_seconds, crates/server/src/playlists/store.rs, the push path). The PPTX "bake in at upload" decision stays open and undocumented; flagging separately.

No QA-written tests exist yet for this issue's scenario. I checked crates/server/tests/playlist_integration.rs, playlist_acceptance_integration.rs and settings_playback_acceptance_integration.rs: every existing test treats default_duration_seconds as a required, non-null field on create (one even asserts a zero value is refused), and none exercise the "a later default change reaches an existing playlist" scenario. This is also an interface-contract question I shouldn't decide alone: the existing campus/global settings endpoints already use a {"value": ..., "source": "global"|"campus"} shape for "where does this come from" (settings_playback_acceptance_integration.rs:536); whether the playlist GET/PUT contract mirrors that shape, and what a PUT sends to mean "go back to inherit" (null? a sentinel?), is a contract the front-end (Prismancer) will also consume.

Blocked on: QA-written acceptance tests for the "Done when" scenario in the issue (playlist created at default 10s, global default changed to 20s, device receives 20s untouched; a playlist with its own value keeps it) plus the nullable/inherit GET/PUT contract shape, so I don't invent the wire contract unilaterally. Requesting nexus-warden route this to astraea for the tests and confirm the contract shape, then hand back to me.

Everything else about this issue stands: migration (nullable column, best-effort backfill of rows matching the default in effect to NULL, else document all-NULL in release notes), resolving the effective value at push time, and re-pushing every playlist affected by a default change.

Read the forge issue and the repo. Checked for a live branch of aetherforge's touching the same files: `feature/GRI-2011-pptx-to-slide-images` touches `crates/server/src/media/handlers.rs` (the PPTX-bake-in half of this issue), so I am leaving that file alone — scoping this fix to the playlist half only (`playlists.default_duration_seconds`, `crates/server/src/playlists/store.rs`, the push path). The PPTX "bake in at upload" decision stays open and undocumented; flagging separately. No QA-written tests exist yet for this issue's scenario. I checked `crates/server/tests/playlist_integration.rs`, `playlist_acceptance_integration.rs` and `settings_playback_acceptance_integration.rs`: every existing test treats `default_duration_seconds` as a required, non-null field on create (one even asserts a zero value is refused), and none exercise the "a later default change reaches an existing playlist" scenario. This is also an interface-contract question I shouldn't decide alone: the existing campus/global settings endpoints already use a `{"value": ..., "source": "global"|"campus"}` shape for "where does this come from" (`settings_playback_acceptance_integration.rs:536`); whether the playlist GET/PUT contract mirrors that shape, and what a PUT sends to mean "go back to inherit" (`null`? a sentinel?), is a contract the front-end (Prismancer) will also consume. Blocked on: QA-written acceptance tests for the "Done when" scenario in the issue (playlist created at default 10s, global default changed to 20s, device receives 20s untouched; a playlist with its own value keeps it) plus the nullable/inherit GET/PUT contract shape, so I don't invent the wire contract unilaterally. Requesting nexus-warden route this to astraea for the tests and confirm the contract shape, then hand back to me. Everything else about this issue stands: migration (nullable column, best-effort backfill of rows matching the default in effect to NULL, else document all-NULL in release notes), resolving the effective value at push time, and re-pushing every playlist affected by a default change.
Member

GRI-2145 / signage#277 — concrete contract proposal

Schema

playlists.default_duration_seconds becomes nullable. NULL = inherit
(campus override if one exists, else global). Migration: set every existing
row to NULL (we cannot reconstruct "was this value actually the default in
effect when the playlist was created, or a deliberate override", so per the
issue's own fallback we treat all of them as inherited and say so in release
notes — nobody loses a deliberate override that happens to equal today's
default, because there is no way to tell one from the other anyway).

Wire shape — reuses the pattern already in playback_settings.rs

playback_settings::Setting<T> already carries {value, source} with
source: "campus" | "global" for the campus playback-settings GET. Extending
it to "own" | "campus" | "global" for playlists keeps one convention
instead of inventing a second one.

GET /playlists, GET /playlists/{id} — default_duration_seconds becomes:

"default_duration_seconds": { "value": 20, "source": "global" }

("own" when the playlist has its own value, "campus" / "global" when
inherited — enough for the panel's "Default (20 s, from All campuses)" plus
"own value" distinction without a second field.)

POST /playlists — unchanged: default_duration_seconds: i32, required.
A new playlist still starts with an explicit value (the panel can offer
"use the default" as a UX convenience that just sends today's effective
value — no need for create to accept null).

PUT /playlists/{id} — real contract problem, not just a type change.
Today: default_duration_seconds: Option<i32> with #[serde(default)],
where omitted means "leave unchanged" (store::update coalesces). Plain
Option<i32> cannot also give null a distinct meaning ("clear to
inherit") — serde collapses "key absent" and "key present with null" to the
same None. Needs the double-option pattern:

#[serde(default, deserialize_with = "deserialize_some")]
pub default_duration_seconds: Option<Option<i32>>,
// None            -> omitted, leave unchanged
// Some(None)       -> {"default_duration_seconds": null}, clear to inherit
// Some(Some(secs)) -> {"default_duration_seconds": secs}, set own value

(deserialize_some is the standard few-line helper for this; no new crate
needed, or pull in serde_with::rust::double_option if preferred — ours to
pick once the shape is agreed.)

Resolution point

crate::playback_settings::effective_default_duration_seconds(pool, campus_id) already exists and does exactly this lookup (today only called
from the PPTX dwell-time path). playlists::handlers::build_wire_playlist
is the one place a playlist's duration reaches a device
(push_to_device → PlaylistPush) — resolve there, right before building
the wire struct, using the playlist's own campus_id. GET views resolve the
same way, tagging source.

Re-push on default change

playback_settings::put_global / put_campus (after the write): find every
playlist with default_duration_seconds IS NULL (global change: all of
them; campus change: that campus's playlists, which also inherit the global
change until they get their own campus override) and call the existing
playlists::handlers::push_playlist_to_assigned_devices for each. That
function is already pub(crate) for exactly this cross-module push need
(media deletion uses it the same way).

Scope

crates/server/src/media/handlers.rs (PPTX dwell-time bake-in at upload) is
explicitly left alone — aetherforge's live branch
feature/GRI-2011-pptx-to-slide-images touches that file. Whether a later
default change should re-render an already-converted PPTX stays open,
flagged separately, not blocking this fix.

What's needed before I write code

  1. Front-end engineer: sign off on the GET/PUT shapes above (or propose a
    different one) — the panel consumes this directly.
  2. QA engineer: no test exercises "a later default change reaches an
    existing playlist", or the own-vs-inherited distinction, or the
    PUT null-vs-omitted distinction. Per my working rules I don't implement
    ahead of QA's tests.
GRI-2145 / signage#277 — concrete contract proposal ## Schema `playlists.default_duration_seconds` becomes nullable. `NULL` = inherit (campus override if one exists, else global). Migration: set every existing row to `NULL` (we cannot reconstruct "was this value actually the default in effect when the playlist was created, or a deliberate override", so per the issue's own fallback we treat all of them as inherited and say so in release notes — nobody loses a deliberate override that happens to equal today's default, because there is no way to tell one from the other anyway). ## Wire shape — reuses the pattern already in `playback_settings.rs` `playback_settings::Setting<T>` already carries `{value, source}` with `source: "campus" | "global"` for the campus playback-settings GET. Extending it to `"own" | "campus" | "global"` for playlists keeps one convention instead of inventing a second one. **GET /playlists, GET /playlists/{id}** — `default_duration_seconds` becomes: ```json "default_duration_seconds": { "value": 20, "source": "global" } ``` (`"own"` when the playlist has its own value, `"campus"` / `"global"` when inherited — enough for the panel's "Default (20 s, from All campuses)" plus "own value" distinction without a second field.) **POST /playlists** — unchanged: `default_duration_seconds: i32`, required. A new playlist still starts with an explicit value (the panel can offer "use the default" as a UX convenience that just sends today's effective value — no need for create to accept null). **PUT /playlists/{id}** — real contract problem, not just a type change. Today: `default_duration_seconds: Option<i32>` with `#[serde(default)]`, where *omitted* means "leave unchanged" (`store::update` coalesces). Plain `Option<i32>` cannot also give `null` a distinct meaning ("clear to inherit") — serde collapses "key absent" and "key present with null" to the same `None`. Needs the double-option pattern: ```rust #[serde(default, deserialize_with = "deserialize_some")] pub default_duration_seconds: Option<Option<i32>>, // None -> omitted, leave unchanged // Some(None) -> {"default_duration_seconds": null}, clear to inherit // Some(Some(secs)) -> {"default_duration_seconds": secs}, set own value ``` (`deserialize_some` is the standard few-line helper for this; no new crate needed, or pull in `serde_with::rust::double_option` if preferred — ours to pick once the shape is agreed.) ## Resolution point `crate::playback_settings::effective_default_duration_seconds(pool, campus_id)` already exists and does exactly this lookup (today only called from the PPTX dwell-time path). `playlists::handlers::build_wire_playlist` is the one place a playlist's duration reaches a device (`push_to_device` → `PlaylistPush`) — resolve there, right before building the wire struct, using the playlist's own `campus_id`. GET views resolve the same way, tagging `source`. ## Re-push on default change `playback_settings::put_global` / `put_campus` (after the write): find every playlist with `default_duration_seconds IS NULL` (global change: all of them; campus change: that campus's playlists, which also inherit the global change until they get their own campus override) and call the existing `playlists::handlers::push_playlist_to_assigned_devices` for each. That function is already `pub(crate)` for exactly this cross-module push need (media deletion uses it the same way). ## Scope `crates/server/src/media/handlers.rs` (PPTX dwell-time bake-in at upload) is explicitly left alone — `aetherforge`'s live branch `feature/GRI-2011-pptx-to-slide-images` touches that file. Whether a later default change should re-render an already-converted PPTX stays open, flagged separately, not blocking this fix. ## What's needed before I write code 1. Front-end engineer: sign off on the GET/PUT shapes above (or propose a different one) — the panel consumes this directly. 2. QA engineer: no test exercises "a later default change reaches an existing playlist", or the own-vs-inherited distinction, or the PUT null-vs-omitted distinction. Per my working rules I don't implement ahead of QA's tests.
Member

Routing directly since the CTO is out of scope for this repo (GRI-72/GRI-1099) and the chief of staff hasn't answered yet. Added both of you as assignees.

@prismancer — need sign-off on the wire shape for the playlist-duration contract (comment 14113 above): Setting<T> {value, source: "own"|"campus"|"global"} on GET, a double-option PUT to distinguish omitted/null/value. It's what the panel needs to show "Default (20s, from All campuses)" vs an own override. Reply here with approve or changes — I can't start the handler/migration work without it.

@astraea — need a written test for this scenario before I implement (no existing test covers it): create a playlist at the then-current default (10s), change the global default to 20s, assert the device receives 20s without the playlist being touched. Plus the inverse: a playlist with its own override keeps it across a default change. Point me at the test file/PR when it's up.

I'll pick this back up once either lands. Not implementing ahead of the contract sign-off or the tests, per my own working rules.

Routing directly since the CTO is out of scope for this repo (GRI-72/GRI-1099) and the chief of staff hasn't answered yet. Added both of you as assignees. @prismancer — need sign-off on the wire shape for the playlist-duration contract (comment 14113 above): `Setting<T>` `{value, source: "own"|"campus"|"global"}` on GET, a double-option PUT to distinguish omitted/null/value. It's what the panel needs to show "Default (20s, from All campuses)" vs an own override. Reply here with approve or changes — I can't start the handler/migration work without it. @astraea — need a written test for this scenario before I implement (no existing test covers it): create a playlist at the then-current default (10s), change the global default to 20s, assert the device receives 20s without the playlist being touched. Plus the inverse: a playlist with its own override keeps it across a default change. Point me at the test file/PR when it's up. I'll pick this back up once either lands. Not implementing ahead of the contract sign-off or the tests, per my own working rules.
Member

Sign-off on the wire contract (comment 14113), from the front end — approve with one risk to flag and one pointer.

Approve

  • GET shape: default_duration_seconds: { value, source: "own"|"campus"|"global" } on both GET /playlists and GET /playlists/{id}. This is exactly the CampusPlaybackSettings shape the panel already consumes (httpPlaybackSettingsApi.ts + CampusSettingsScreen.tsx:75), just with a third source. Nothing new for the front end to invent — I'll extend the existing WireCampus-style type and the existing source === 'campus' branching pattern.
  • PUT double-option: agreed, and needed — name and default_duration_seconds are independent optional fields on the same PATCH-like body, so plain Option<i32> can't carry "omit" and "clear to inherit" separately. One pointer: you don't need deserialize_some or serde_with for this — crates/server/src/settings.rs:407 (mod patch) already has this exact double-option deserializer, used today by SettingsChange for the same omitted/null/value distinction. Reuse it rather than adding a second implementation of the same four lines.

Risk to flag before you implement

The issue's "Done when" test reads: "playlist created at default 10 s, global default changed to 20 s, the device receives 20 s without touching the playlist." Read literally, that's a playlist created through the normal create flow (not one explicitly PUT to null afterward). Your proposal keeps POST as default_duration_seconds: i32, required — so a playlist created today still snapshots an explicit value and would NOT inherit, same bug as now, just moved from "always" to "only playlists nobody later clears to inherit."

Two ways to resolve, and I'd like this nailed down before I build the "revert to inherit" control, since it changes what the create dialog needs to send:

  1. POST keeps requiring an explicit value (your proposal) — new playlists do not auto-inherit, and the done-when test's "created at default 10s" implicitly means "then PUT to null" as a setup step. I'll need the create dialog to stay as-is (still has its own unrelated bug — see below) and ship the "inherit" control as a separate, explicit action.
  2. POST makes default_duration_seconds optional (omitted = inherit, same NULL semantics as PUT) — new playlists inherit by default unless the panel user picks a value explicitly. This matches the done-when test literally and is also the more honest fix for the reported bug, since otherwise every freshly created playlist reintroduces the exact gap this issue exists to close.

@astraea — this is really a question for how you write the test: does "playlist created at default 10s" call POST /playlists and then assert it already tracks a later global change, or does it call POST then an explicit PUT null? Whichever it is pins down (1) vs (2) above, so I'd rather get that from the written test than guess.

Separate, pre-existing bug while I'm in this code

Not part of this issue's fix, but worth fixing in the same change since the create dialog needs touching anyway for the "inherit" UX: frontend-web/src/screens/PlaylistsScreen.tsx:148 hardcodes createPlaylist(name, 10, ...) — every new playlist is created with a literal 10, regardless of the actual current effective default (which could already be 20, 30, whatever a campus or the global setting says). I'll fix that alongside wiring up the new contract rather than filing it separately, unless someone would rather it be its own issue.

What I'll build once the contract and test land

  • httpPlaylistsApi.ts: PlaylistSummaryWire/PlaylistDetailWire.default_duration_seconds to the {value, source} shape on GET; a double-option-shaped PUT body (undefined omitted, null clears to inherit, a number sets an override) on the existing update_playlist path (there's already a PUT/PATCH UpdatePlaylistRequest handler server-side — crates/server/src/playlists/handlers.rs:293 — the front end just never calls it for this field yet, only for name).
  • A playlist settings control mirroring CampusSettingsScreen.tsx's existing "Default (Ns, from All campuses)" / own-value copy, with a way back to inherit.

Blocked on: the done-when test (to resolve the POST question above) before I implement the panel side. Not blocking nyssa's migration/resolution/re-push work, which doesn't depend on this.

Sign-off on the wire contract (comment 14113), from the front end — approve with one risk to flag and one pointer. ## Approve - **GET shape**: `default_duration_seconds: { value, source: "own"|"campus"|"global" }` on both `GET /playlists` and `GET /playlists/{id}`. This is exactly the `CampusPlaybackSettings` shape the panel already consumes (`httpPlaybackSettingsApi.ts` + `CampusSettingsScreen.tsx:75`), just with a third `source`. Nothing new for the front end to invent — I'll extend the existing `WireCampus`-style type and the existing `source === 'campus'` branching pattern. - **PUT double-option**: agreed, and needed — `name` and `default_duration_seconds` are independent optional fields on the same PATCH-like body, so plain `Option<i32>` can't carry "omit" and "clear to inherit" separately. One pointer: you don't need `deserialize_some` or `serde_with` for this — `crates/server/src/settings.rs:407` (`mod patch`) already has this exact double-option deserializer, used today by `SettingsChange` for the same omitted/null/value distinction. Reuse it rather than adding a second implementation of the same four lines. ## Risk to flag before you implement The issue's "Done when" test reads: *"playlist created at default 10 s, global default changed to 20 s, the device receives 20 s without touching the playlist."* Read literally, that's a playlist created through the normal create flow (not one explicitly PUT to `null` afterward). Your proposal keeps POST as `default_duration_seconds: i32, required` — so a playlist created today still snapshots an explicit value and would NOT inherit, same bug as now, just moved from "always" to "only playlists nobody later clears to inherit." Two ways to resolve, and I'd like this nailed down before I build the "revert to inherit" control, since it changes what the create dialog needs to send: 1. POST keeps requiring an explicit value (your proposal) — new playlists do not auto-inherit, and the done-when test's "created at default 10s" implicitly means "then PUT to null" as a setup step. I'll need the create dialog to stay as-is (still has its own unrelated bug — see below) and ship the "inherit" control as a separate, explicit action. 2. POST makes `default_duration_seconds` optional (omitted = inherit, same NULL semantics as PUT) — new playlists inherit by default unless the panel user picks a value explicitly. This matches the done-when test literally and is also the more honest fix for the reported bug, since otherwise every freshly created playlist reintroduces the exact gap this issue exists to close. @astraea — this is really a question for how you write the test: does "playlist created at default 10s" call `POST /playlists` and then assert it already tracks a later global change, or does it call POST then an explicit PUT `null`? Whichever it is pins down (1) vs (2) above, so I'd rather get that from the written test than guess. ## Separate, pre-existing bug while I'm in this code Not part of this issue's fix, but worth fixing in the same change since the create dialog needs touching anyway for the "inherit" UX: `frontend-web/src/screens/PlaylistsScreen.tsx:148` hardcodes `createPlaylist(name, 10, ...)` — every new playlist is created with a literal `10`, regardless of the actual current effective default (which could already be 20, 30, whatever a campus or the global setting says). I'll fix that alongside wiring up the new contract rather than filing it separately, unless someone would rather it be its own issue. ## What I'll build once the contract and test land - `httpPlaylistsApi.ts`: `PlaylistSummaryWire`/`PlaylistDetailWire.default_duration_seconds` to the `{value, source}` shape on GET; a double-option-shaped PUT body (`undefined` omitted, `null` clears to inherit, a number sets an override) on the existing `update_playlist` path (there's already a PUT/PATCH `UpdatePlaylistRequest` handler server-side — `crates/server/src/playlists/handlers.rs:293` — the front end just never calls it for this field yet, only for `name`). - A playlist settings control mirroring `CampusSettingsScreen.tsx`'s existing "Default (Ns, from All campuses)" / own-value copy, with a way back to inherit. Blocked on: the done-when test (to resolve the POST question above) before I implement the panel side. Not blocking nyssa's migration/resolution/re-push work, which doesn't depend on this.
Member

Test is up: #281 (branch test/GRI-2147-playlist-default-duration-inheritance, not yet merged — waiting on gates/review).

One test, a_global_default_change_reaches_an_inheriting_playlist_but_not_an_overridden_one in crates/server/tests/ws_integration.rs, covering the "Done when" scenario verbatim (both halves in one test, since only together do they fail first for the right reason — your "inverse" half already holds on dev today by accident, nothing reacts to a settings change at all yet):

  • a playlist with default_duration_seconds = NULL resolves to the global default at push time, and gets re-pushed when the global default changes, with the row itself never written (checked directly in the DB: stays NULL, not pinned to the new value);
  • a playlist with its own value is unaffected and gets no spurious push.

Fail-first run (SIGNAGE_TEST_DATABASE_URL=... cargo test -p server --test ws_integration a_global_default_change_reaches_an_inheriting_playlist_but_not_an_overridden_one -- --include-ignored --nocapture):

panicked at crates/server/tests/ws_integration.rs:1868:6:
inserting the playlist must succeed; a None default_duration_seconds fails here on the column's NOT NULL constraint until GRI-2147 makes it nullable: ... code: "23502" ... null value in column "default_duration_seconds" of relation "playlists" violates not-null constraint ...

The other 15 tests in that file still pass unmodified.

Deliberately independent of your wire-contract proposal (comment 14113): the test never sends GET/PUT /playlists/{id}, it drives playlists.default_duration_seconds directly in the DB (insert_playlist, same shortcut insert_approved_device already uses for /devices). So it doesn't need the {value, source} / double-option question resolved to be useful to you now — it proves the resolve-at-push-time + re-push behaviour underneath whatever that admin contract ends up being. You and prismancer still need to settle that contract for the handler/migration work itself; this just unblocks the behavioural half you asked for.

Not covered, flagged rather than guessed: the campus-override half of your "Fix" bullet 3 (only global is in the issue's own "Done when"), and a migration-backfill test (no migration file exists yet to test against — once you land it, happy to add one asserting existing rows end up NULL).

Test is up: https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/pulls/281 (branch `test/GRI-2147-playlist-default-duration-inheritance`, not yet merged — waiting on gates/review). One test, `a_global_default_change_reaches_an_inheriting_playlist_but_not_an_overridden_one` in `crates/server/tests/ws_integration.rs`, covering the "Done when" scenario verbatim (both halves in one test, since only together do they fail first for the right reason — your "inverse" half already holds on `dev` today by accident, nothing reacts to a settings change at all yet): - a playlist with `default_duration_seconds = NULL` resolves to the global default at push time, and gets re-pushed when the global default changes, with the row itself never written (checked directly in the DB: stays `NULL`, not pinned to the new value); - a playlist with its own value is unaffected and gets no spurious push. Fail-first run (`SIGNAGE_TEST_DATABASE_URL=... cargo test -p server --test ws_integration a_global_default_change_reaches_an_inheriting_playlist_but_not_an_overridden_one -- --include-ignored --nocapture`): ``` panicked at crates/server/tests/ws_integration.rs:1868:6: inserting the playlist must succeed; a None default_duration_seconds fails here on the column's NOT NULL constraint until GRI-2147 makes it nullable: ... code: "23502" ... null value in column "default_duration_seconds" of relation "playlists" violates not-null constraint ... ``` The other 15 tests in that file still pass unmodified. Deliberately independent of your wire-contract proposal (comment 14113): the test never sends `GET`/`PUT /playlists/{id}`, it drives `playlists.default_duration_seconds` directly in the DB (`insert_playlist`, same shortcut `insert_approved_device` already uses for `/devices`). So it doesn't need the `{value, source}` / double-option question resolved to be useful to you now — it proves the resolve-at-push-time + re-push behaviour underneath whatever that admin contract ends up being. You and prismancer still need to settle that contract for the handler/migration work itself; this just unblocks the behavioural half you asked for. Not covered, flagged rather than guessed: the campus-override half of your "Fix" bullet 3 (only global is in the issue's own "Done when"), and a migration-backfill test (no migration file exists yet to test against — once you land it, happy to add one asserting existing rows end up `NULL`).
Member

CI on PR #281: clippy/fmt/deny/frontend/boundary/pre-push hook all green; cargo test fails on the fail-first result already documented above (23502 not_null_violation on playlists.default_duration_seconds) — not a regression I introduced. Correction to my earlier note: this PR's cargo test job will stay red until the schema change + resolve-at-push-time logic lands; that's by design for a test-first PR, so it's not a gate to wait on before implementation starts. Test-writer deliverable is complete (criterion-to-test mapping + fail-first output in the comment above). Over to nyssa for implementation on top of this branch.

CI on PR #281: clippy/fmt/deny/frontend/boundary/pre-push hook all green; cargo test fails on the fail-first result already documented above (23502 not_null_violation on playlists.default_duration_seconds) — not a regression I introduced. Correction to my earlier note: this PR's cargo test job will stay red until the schema change + resolve-at-push-time logic lands; that's by design for a test-first PR, so it's not a gate to wait on before implementation starts. Test-writer deliverable is complete (criterion-to-test mapping + fail-first output in the comment above). Over to nyssa for implementation on top of this branch.
Member

Implementation on top of PR #281, pushed to the same branch (both commits: the schema/resolve-at-push-time/re-push logic, then a merge of origin/dev which had moved a long way — renumbered this branch's own migration 0011 -> 0012 since dev gained its own 0011_user_locale.sql meanwhile).

What landed

  • playlists.default_duration_seconds is now nullable (migration 0012). Every existing row is set to NULL (cannot distinguish a deliberate override from a value that happened to match the then-current default, so all are treated as inherited, as the issue's own fallback says).
  • Resolution happens in build_wire_playlist (now async, takes pool), the one place a playlist's duration reaches a device: Some(value) is used as-is, None falls back to playback_settings::effective_default_duration_seconds.
  • playback_settings::put_global / put_campus now re-push every playlist currently inheriting the changed default (two new lookups, playlists::store::playlist_ids_inheriting_{global,campus}), via two new pub(crate) wrappers in playlists::handlers.
  • GET/list default_duration_seconds is now {value, source: "own"|"campus"|"global"} per @prismancer's sign-off (comment 14150), resolved per request via a new playback_settings::Defaults (one query pair for the whole list, not one per row).
  • PUT /playlists/{id} gains the double-option field (reuses settings::patch, made pub(crate)) — omitted leaves it, null clears to inherit, a number sets the playlist's own value. This also now re-pushes the playlist to its assigned devices on a duration change, which PATCH didn't do for any field before this (same "content changed but never pushed" class of bug this issue is about — flagging in case that silence was deliberate for name, but duration is wire content so I pushed it).
  • POST /playlists is unchanged: still a required value (prismancer's option 1). A freshly created playlist therefore still snapshots a value and does not auto-inherit until explicitly PUT back to null — same tradeoff prismancer flagged in 14150, left as proposed since the issue's own "Done when" is read literally as "an existing playlist", and GRI-2147's own test (below) doesn't exercise POST either way.

Verified

SIGNAGE_TEST_DATABASE_URL=... cargo test -p server --test ws_integration a_global_default_change_reaches_an_inheriting_playlist_but_not_an_overridden_one -- --include-ignored --nocapture — passes, both halves. Also ran clean (post-merge, fresh DB): the full ws_integration, settings_playback_acceptance_integration, media_integration, campus_integration, devices_integration suites, plus cargo fmt --check, clippy -D warnings, cargo deny check.

@astraea — three incidental test breaks, need your call

Changing default_duration_seconds from a plain number to {value, source} on GET/list (the contract you and prismancer settled on) breaks three assertions in tests that aren't about this field at all — they just happen to read it:

  • playlist_acceptance_integration.rs:202 and :228 (ac_4_02_an_items_duration_override_is_kept_distinct_from_the_playlist_default) — assert_eq!(playlist["default_duration_seconds"], 30) / detail["default_duration_seconds"], 30).
  • playlist_integration.rs:326 (a_created_playlist_is_listed_with_a_zero_item_count) and :427 (a_partial_update_changes_only_the_given_field) — same shape, values 10 and 20.

I'm not editing these myself per my own working rules (never edit a test to make it pass) — the fix is one line each, e.g. assert_eq!(playlist["default_duration_seconds"]["value"], 30), but it's your file and your call whether that's the right fix or the AC needs a different assertion. These four are the only known breaks from this contract change; full suite run above is otherwise green. CI on #281 is running now and will show the same three red.

Implementation on top of PR #281, pushed to the same branch (both commits: the schema/resolve-at-push-time/re-push logic, then a merge of `origin/dev` which had moved a long way — renumbered this branch's own migration `0011` -> `0012` since dev gained its own `0011_user_locale.sql` meanwhile). ## What landed - `playlists.default_duration_seconds` is now nullable (migration 0012). Every existing row is set to `NULL` (cannot distinguish a deliberate override from a value that happened to match the then-current default, so all are treated as inherited, as the issue's own fallback says). - Resolution happens in `build_wire_playlist` (now `async`, takes `pool`), the one place a playlist's duration reaches a device: `Some(value)` is used as-is, `None` falls back to `playback_settings::effective_default_duration_seconds`. - `playback_settings::put_global` / `put_campus` now re-push every playlist currently inheriting the changed default (two new lookups, `playlists::store::playlist_ids_inheriting_{global,campus}`), via two new `pub(crate)` wrappers in `playlists::handlers`. - `GET`/list `default_duration_seconds` is now `{value, source: "own"|"campus"|"global"}` per @prismancer's sign-off (comment 14150), resolved per request via a new `playback_settings::Defaults` (one query pair for the whole list, not one per row). - `PUT /playlists/{id}` gains the double-option field (reuses `settings::patch`, made `pub(crate)`) — omitted leaves it, `null` clears to inherit, a number sets the playlist's own value. This also now re-pushes the playlist to its assigned devices on a duration change, which `PATCH` didn't do for *any* field before this (same "content changed but never pushed" class of bug this issue is about — flagging in case that silence was deliberate for `name`, but duration is wire content so I pushed it). - `POST /playlists` is unchanged: still a required value (prismancer's option 1). A freshly created playlist therefore still snapshots a value and does not auto-inherit until explicitly PUT back to `null` — same tradeoff prismancer flagged in 14150, left as proposed since the issue's own "Done when" is read literally as "an *existing* playlist", and GRI-2147's own test (below) doesn't exercise POST either way. ## Verified `SIGNAGE_TEST_DATABASE_URL=... cargo test -p server --test ws_integration a_global_default_change_reaches_an_inheriting_playlist_but_not_an_overridden_one -- --include-ignored --nocapture` — passes, both halves. Also ran clean (post-merge, fresh DB): the full `ws_integration`, `settings_playback_acceptance_integration`, `media_integration`, `campus_integration`, `devices_integration` suites, plus `cargo fmt --check`, `clippy -D warnings`, `cargo deny check`. ## @astraea — three incidental test breaks, need your call Changing `default_duration_seconds` from a plain number to `{value, source}` on `GET`/list (the contract you and prismancer settled on) breaks three assertions in tests that aren't about this field at all — they just happen to read it: - `playlist_acceptance_integration.rs:202` and `:228` (`ac_4_02_an_items_duration_override_is_kept_distinct_from_the_playlist_default`) — `assert_eq!(playlist["default_duration_seconds"], 30)` / `detail["default_duration_seconds"], 30)`. - `playlist_integration.rs:326` (`a_created_playlist_is_listed_with_a_zero_item_count`) and `:427` (`a_partial_update_changes_only_the_given_field`) — same shape, values `10` and `20`. I'm not editing these myself per my own working rules (never edit a test to make it pass) — the fix is one line each, e.g. `assert_eq!(playlist["default_duration_seconds"]["value"], 30)`, but it's your file and your call whether that's the right fix or the AC needs a different assertion. These four are the only known breaks from this contract change; full suite run above is otherwise green. CI on #281 is running now and will show the same three red.
Author
Owner

Decision on the three incidental test breaks (nyssa, comment 14296): update them to the new contract.

default_duration_seconds on GET/list is now {value, source} by the agreed contract (prismancer, comment 14150). The four assertions read that field only by accident; their intent (the playlist's own value is 30 / 10 / 20) is unchanged. So the right fix is to read .value, and also assert source == "own" where the test set the value itself:

  • playlist_acceptance_integration.rs:202, :228
  • playlist_integration.rs:326, :427

@astraea owns these files, so she makes the change on the #281 branch (test/GRI-2147-…, which already carries nyssa's implementation). When #281 is green and up to date with dev, I review and merge it, and #277 closes.

**Decision on the three incidental test breaks (nyssa, comment 14296):** update them to the new contract. `default_duration_seconds` on `GET`/list is now `{value, source}` by the agreed contract (prismancer, comment 14150). The four assertions read that field only by accident; their intent (the playlist's own value is 30 / 10 / 20) is unchanged. So the right fix is to read `.value`, and also assert `source == "own"` where the test set the value itself: - `playlist_acceptance_integration.rs:202`, `:228` - `playlist_integration.rs:326`, `:427` @astraea owns these files, so she makes the change on the #281 branch (`test/GRI-2147-…`, which already carries nyssa's implementation). When #281 is green and up to date with `dev`, I review and merge it, and #277 closes.
Member

CI is green on PR #281 (commit 5e4fc155) after astraea's assertion update (894d9f2). Both the implementation and the fail-first test are in one PR, mergeable onto dev with no conflicts. Ready for merge.

CI is green on PR #281 (commit 5e4fc155) after astraea's assertion update (894d9f2). Both the implementation and the fail-first test are in one PR, mergeable onto dev with no conflicts. Ready for merge.
Author
Owner

PR #281 review: changes requested (review #522). Server inheritance is good, but (1) the panel creates every playlist with its own 10 s (PlaylistsScreen.tsx:149, POST requires the value), so new playlists still ignore a later default change, and (2) the panel still reads default_duration_seconds as a number (httpPlaylistsApi.ts, PlaylistMediaTab.tsx). Fix: POST value optional = inherit, panel omits it, panel reads {value, source}. Details in the review.

PR #281 review: changes requested (review #522). Server inheritance is good, but (1) the panel creates every playlist with its own 10 s (PlaylistsScreen.tsx:149, POST requires the value), so new playlists still ignore a later default change, and (2) the panel still reads default_duration_seconds as a number (httpPlaylistsApi.ts, PlaylistMediaTab.tsx). Fix: POST value optional = inherit, panel omits it, panel reads {value, source}. Details in the review.
Author
Owner

Assigned to nyssa: both fixes on the #281 branch (POST optional + panel wire shape; the panel part is small, prismancer can take it if you prefer). astraea: if the new create-without-value test is yours, add it there.

Assigned to nyssa: both fixes on the #281 branch (POST optional + panel wire shape; the panel part is small, prismancer can take it if you prefer). astraea: if the new create-without-value test is yours, add it there.
Member

Server-side fix for review point 1 pushed to the branch (test/GRI-2147-playlist-default-duration-inheritance). CreatePlaylistRequest.default_duration_seconds is now Option<i32>: omitted or null on POST means inherit (the row gets NULL, same as PUT with null already did), and the response resolves it through Defaults like every other read path does, so it comes back {value, source: "campus"|"global"} instead of always "own".

store::create now takes Option<i32>; its one call site is create_playlist. cargo check, cargo fmt clean. Running local-gates.sh --rust-only now; will report the result.

Not done by me:

  • The create-without-value test (change the campus default after creating with no value, expect the new value with source: "campus") — astraea, this is the one you flagged as possibly yours.
  • Review point 2, the panel (httpPlaylistsApi.ts, PlaylistMediaTab.tsx, PlaylistsScreen.tsx:149) reading {value, source} instead of a bare number, and PlaylistsScreen omitting the field on create — that's front-end, routing to prismancer rather than doing it myself (backend engineer boundary).
Server-side fix for review point 1 pushed to the branch (`test/GRI-2147-playlist-default-duration-inheritance`). `CreatePlaylistRequest.default_duration_seconds` is now `Option<i32>`: omitted or `null` on `POST` means inherit (the row gets `NULL`, same as `PUT` with `null` already did), and the response resolves it through `Defaults` like every other read path does, so it comes back `{value, source: "campus"|"global"}` instead of always `"own"`. `store::create` now takes `Option<i32>`; its one call site is `create_playlist`. `cargo check`, `cargo fmt` clean. Running `local-gates.sh --rust-only` now; will report the result. Not done by me: - The create-without-value test (change the campus default after creating with no value, expect the new value with `source: "campus"`) — astraea, this is the one you flagged as possibly yours. - Review point 2, the panel (`httpPlaylistsApi.ts`, `PlaylistMediaTab.tsx`, `PlaylistsScreen.tsx:149`) reading `{value, source}` instead of a bare number, and `PlaylistsScreen` omitting the field on create — that's front-end, routing to prismancer rather than doing it myself (backend engineer boundary).
Member

Pushed the review-point-1 fix (commit 9e5cfa9): CreatePlaylistRequest.default_duration_seconds is now Option<i32>. An omitted/null value on create now resolves through Defaults::load(&pool).await?.resolve(...), the same path GET/PUT already use, instead of always writing the playlist's own value. store::create already took an Option<i32> for the column bind, so no SQL change needed.

Review point 2 (panel reading the old number shape) is frontend — left for prismancer.

cargo check -p server and cargo fmt --check -p server are clean. Full local-gates.sh --rust-only is running now; will report once it finishes and CI picks up the new commit.

Pushed the review-point-1 fix (commit 9e5cfa9): `CreatePlaylistRequest.default_duration_seconds` is now `Option<i32>`. An omitted/null value on create now resolves through `Defaults::load(&pool).await?.resolve(...)`, the same path GET/PUT already use, instead of always writing the playlist's own value. `store::create` already took an `Option<i32>` for the column bind, so no SQL change needed. Review point 2 (panel reading the old number shape) is frontend — left for prismancer. `cargo check -p server` and `cargo fmt --check -p server` are clean. Full `local-gates.sh --rust-only` is running now; will report once it finishes and CI picks up the new commit.
Member

Panel work pushed to PR #281 (test/GRI-2147-playlist-default-duration-inheritance, f3dded0), on top of nyssa's server contract:

  • types.ts: PlaylistSummary/Playlist defaultDurationSeconds is now {value, source: 'own'|'campus'|'global'} instead of a plain number.
  • httpPlaylistsApi.ts: createPlaylist no longer sends default_duration_seconds at all — the server resolves the live campus/global default. Every reader (PlaylistMediaTab's duration placeholder / item-default) now reads .value.
  • PlaylistsScreen.tsx:149's hardcoded 10 is gone — that was the pre-existing bug I flagged earlier; a created playlist now actually inherits rather than freezing in the default at creation time.
  • mockPlaylistsApi.ts stores a playlist's own override as ownDefaultDurationSeconds: number | null and resolves {value, source} the same way the server does, reusing mockPlaybackSettingsApi's existing campus/global fallback so the resolution logic isn't duplicated.
  • Test fixtures (PlaylistsScreen.test.tsx, DevicesScreen.test.tsx, httpPlaylistsApi.test.ts) updated to the new shape; added a test asserting createPlaylist's POST body omits default_duration_seconds entirely.

Verified: ./scripts/local-gates.sh --frontend-only — prettier, oxlint, tsc, vitest (183/183 passed), vite build all green. Did not re-run the Rust gates myself since I touched no Rust; that's nyssa's/CI's call on this branch.

Not in this change: a Settings-tab control to set or clear a playlist's own override (the issue's "Default (20s, from All campuses)… way back to inherit" UI). Scope for this PR, per my earlier sign-off comment, was just making create/read honor the new contract — the inherit-toggle UI reads like a separate, smaller follow-up if the PM wants it. Flagging rather than assuming.

CI just started on the PR (fj ci: queued/running). Watching it.

Panel work pushed to PR #281 (test/GRI-2147-playlist-default-duration-inheritance, f3dded0), on top of nyssa's server contract: - types.ts: `PlaylistSummary`/`Playlist` `defaultDurationSeconds` is now `{value, source: 'own'|'campus'|'global'}` instead of a plain number. - httpPlaylistsApi.ts: `createPlaylist` no longer sends `default_duration_seconds` at all — the server resolves the live campus/global default. Every reader (PlaylistMediaTab's duration placeholder / item-default) now reads `.value`. - PlaylistsScreen.tsx:149's hardcoded `10` is gone — that was the pre-existing bug I flagged earlier; a created playlist now actually inherits rather than freezing in the default at creation time. - mockPlaylistsApi.ts stores a playlist's own override as `ownDefaultDurationSeconds: number | null` and resolves `{value, source}` the same way the server does, reusing `mockPlaybackSettingsApi`'s existing campus/global fallback so the resolution logic isn't duplicated. - Test fixtures (PlaylistsScreen.test.tsx, DevicesScreen.test.tsx, httpPlaylistsApi.test.ts) updated to the new shape; added a test asserting `createPlaylist`'s POST body omits `default_duration_seconds` entirely. Verified: `./scripts/local-gates.sh --frontend-only` — prettier, oxlint, tsc, vitest (183/183 passed), vite build all green. Did not re-run the Rust gates myself since I touched no Rust; that's nyssa's/CI's call on this branch. Not in this change: a Settings-tab control to set or clear a playlist's own override (the issue's "Default (20s, from All campuses)… way back to inherit" UI). Scope for this PR, per my earlier sign-off comment, was just making create/read honor the new contract — the inherit-toggle UI reads like a separate, smaller follow-up if the PM wants it. Flagging rather than assuming. CI just started on the PR (fj ci: queued/running). Watching it.
Author
Owner

PR #281 is merged into dev (f3dded08, my review approved, CI green on all 7 required contexts).

Landed: NULL = inherit; the effective value is resolved at push and a global/campus default change re-pushes inheriting playlists (astraea's fail-first test passes); POST without a value inherits; the panel creates inheriting playlists and reads {value, source}.

Still open on this issue, so I keep it open:

  1. @prismancer — the playlist Settings control from the Fix list: show "Default (20 s, from All campuses)" or the own value, and a way back to inherit (PATCH with null already works on the server).
  2. @astraea — a server test: POST /playlists with no default_duration_seconds stores NULL and returns source campus/global.
  3. Release notes: the migration sets every existing playlist to inherit (an own value cannot be told apart from the old default).
  4. The PPTX dwell baked in at upload (media/handlers.rs:430): decide and document whether that is intended. nyssa, please write one line on this.

I merge the follow-up PR on green.

PR #281 is merged into `dev` (f3dded08, my review approved, CI green on all 7 required contexts). **Landed:** `NULL` = inherit; the effective value is resolved at push and a global/campus default change re-pushes inheriting playlists (astraea's fail-first test passes); POST without a value inherits; the panel creates inheriting playlists and reads `{value, source}`. **Still open on this issue, so I keep it open:** 1. @prismancer — the playlist Settings control from the Fix list: show *"Default (20 s, from All campuses)"* or the own value, and a way back to inherit (`PATCH` with `null` already works on the server). 2. @astraea — a server test: `POST /playlists` with no `default_duration_seconds` stores `NULL` and returns `source` campus/global. 3. Release notes: the migration sets **every** existing playlist to inherit (an own value cannot be told apart from the old default). 4. The PPTX dwell baked in at upload (`media/handlers.rs:430`): decide and document whether that is intended. nyssa, please write one line on this. I merge the follow-up PR on green.
Member

Item 4 (PPTX dwell baked in at upload, media/handlers.rs:430/:342-347): intended, not changing it under this issue.

Reason: the playlist fix works because default_duration_seconds stays a reference (NULL = inherit) that's resolved fresh on every push. The PPTX case is different in kind, not degree — effective_default_duration_seconds is read once at upload and baked directly into the encoded MP4's frame timing via join_slides_into_mp4/ffmpeg. There is no stored reference left afterward, only pixels. Making a later default change reach it would mean re-running the whole render (the issue's own estimate: minutes) for every affected video, and would first need to record which uploads were "inheriting" the default at upload time vs. given an explicit per-upload duration — a field that doesn't exist today.

That's a real feature (re-render-on-default-change for baked video), not a one-line fix, so it's out of scope for GRI-2147/this issue. It should be a separate issue if the product owner wants it, and it would also need to coordinate with aetherforge's live branch feature/GRI-2011-pptx-to-slide-images, which touches this same code path.

Current/intended behavior: the dwell time a PPTX-to-video upload gets is a snapshot of the default at upload time, fixed for the life of that video file.

Item 4 (PPTX dwell baked in at upload, `media/handlers.rs:430`/`:342-347`): **intended, not changing it under this issue.** Reason: the playlist fix works because `default_duration_seconds` stays a *reference* (`NULL` = inherit) that's resolved fresh on every push. The PPTX case is different in kind, not degree — `effective_default_duration_seconds` is read once at upload and baked directly into the encoded MP4's frame timing via `join_slides_into_mp4`/`ffmpeg`. There is no stored reference left afterward, only pixels. Making a later default change reach it would mean re-running the whole render (the issue's own estimate: minutes) for every affected video, and would first need to record which uploads were "inheriting" the default at upload time vs. given an explicit per-upload duration — a field that doesn't exist today. That's a real feature (re-render-on-default-change for baked video), not a one-line fix, so it's out of scope for GRI-2147/this issue. It should be a separate issue if the product owner wants it, and it would also need to coordinate with aetherforge's live branch `feature/GRI-2011-pptx-to-slide-images`, which touches this same code path. Current/intended behavior: the dwell time a PPTX-to-video upload gets is a snapshot of the default at upload time, fixed for the life of that video file.
Member

Item 1 (the playlist Settings control for the default-playtime override) done: PR #292.

PlaylistSettingsTab shows Default (N s, from <campus / All campuses>) with an Override with a custom value... button when inheriting, and the seconds field with Save default playtime / Use the default (...) (clears to inherit via PATCH with null) when overriding. Used the existing PATCH /playlists/{id} double-option contract from #281 -- only the missing client call (updatePlaylistDefaultDuration) was needed.

local-gates.sh --frontend-only green (prettier/oxlint/tsc/vitest 184/184/build), including a new end-to-end test for the inherit <-> override <-> inherit flow. CI running on PR #292.

Item 1 (the playlist Settings control for the default-playtime override) done: PR #292. PlaylistSettingsTab shows Default (N s, from <campus / All campuses>) with an Override with a custom value... button when inheriting, and the seconds field with Save default playtime / Use the default (...) (clears to inherit via PATCH with null) when overriding. Used the existing PATCH /playlists/{id} double-option contract from #281 -- only the missing client call (updatePlaylistDefaultDuration) was needed. local-gates.sh --frontend-only green (prettier/oxlint/tsc/vitest 184/184/build), including a new end-to-end test for the inherit <-> override <-> inherit flow. CI running on PR #292.
Member

Item 3 (release notes) is already covered, nothing further for me to add: the migration itself (0012_playlist_default_duration_nullable.sql) documents the lossy backfill in its header comment, and my implementation comment above (14296-era) states the same reasoning. There's no CHANGELOG/release-notes file anywhere in this repo (checked plan/ and the tree) and no other migration here references one, so a header comment plus the issue thread is the existing convention, not a gap I'm leaving open. If the product owner wants a tracked release-notes file going forward, that's a separate call for him, not something to invent under this issue.

Still open, not mine: item 2 (astraea's POST-with-no-value server test) and merging PR #292 (prismancer's, CI green, open). Nothing further for me to do on GRI-2147/#277 right now.

Item 3 (release notes) is already covered, nothing further for me to add: the migration itself (`0012_playlist_default_duration_nullable.sql`) documents the lossy backfill in its header comment, and my implementation comment above (14296-era) states the same reasoning. There's no `CHANGELOG`/release-notes file anywhere in this repo (checked `plan/` and the tree) and no other migration here references one, so a header comment plus the issue thread is the existing convention, not a gap I'm leaving open. If the product owner wants a tracked release-notes file going forward, that's a separate call for him, not something to invent under this issue. Still open, not mine: item 2 (astraea's POST-with-no-value server test) and merging PR #292 (prismancer's, CI green, open). Nothing further for me to do on GRI-2147/#277 right now.
Author
Owner

PR #292 merged into dev (playlist Settings: inherited default shown, override, back to default). Follow-up 1 of this issue is done.

Small point for a later PR (not blocking): when a campus playlist already has its own value, inheritedFromLabel falls back to "All campuses" because source is own. The button then reads "Use the default (All campuses)" even if the campus default would apply. Suggest the plain "Use the default" in that case, or read the campus default.

Still open here: astraea's POST-without-value server test, the release note, nyssa's PPTX dwell note.

PR #292 merged into `dev` (playlist Settings: inherited default shown, override, back to default). Follow-up 1 of this issue is done. Small point for a later PR (not blocking): when a **campus** playlist already has its own value, `inheritedFromLabel` falls back to "All campuses" because `source` is `own`. The button then reads "Use the default (All campuses)" even if the campus default would apply. Suggest the plain "Use the default" in that case, or read the campus default. Still open here: astraea's POST-without-value server test, the release note, nyssa's PPTX dwell note.
Author
Owner

Status of the four follow-ups:

  1. Settings control — done, PR #292 merged.
  2. @astraea — still open: a server test that POST /playlists with no default_duration_seconds stores NULL and returns source campus/global. Branch from dev; I merge on green.
  3. Release note — done. I added it to the release PR #136 under Migrations: 0012 sets every existing playlist to inherit, and the operator re-sets an own value where one must stay.
  4. PPTX dwell — decided by nyssa (comment 14377): intended, baked in at upload, because a re-render costs minutes.

When item 2 is merged, I close this issue.

Status of the four follow-ups: 1. Settings control — done, PR #292 merged. 2. @astraea — **still open**: a server test that `POST /playlists` with no `default_duration_seconds` stores `NULL` and returns `source` `campus`/`global`. Branch from `dev`; I merge on green. 3. Release note — done. I added it to the release PR #136 under *Migrations*: 0012 sets every existing playlist to inherit, and the operator re-sets an own value where one must stay. 4. PPTX dwell — decided by nyssa (comment 14377): intended, baked in at upload, because a re-render costs minutes. When item 2 is merged, I close this issue.
Member

Item 2 (comment 14402): wrote the server test for POST /playlists with no default_duration_seconds.

Branch test/GRI-2147-playlist-create-inherits-default (from current dev), two tests in crates/server/tests/playlist_integration.rs:

  • creating_a_playlist_with_no_default_duration_stores_null_and_inherits_the_global_default — no campus override: value = global default, source == "global", row stays NULL.
  • creating_a_playlist_with_no_default_duration_inherits_the_campus_override — campus has its own override: value = campus override, source == "campus", row stays NULL.

Both pass against current dev (the behaviour already landed in #281/#292):

SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable \
  cargo test -p server --test playlist_integration creating_a_playlist_with_no_default_duration -- --include-ignored --nocapture
-> test creating_a_playlist_with_no_default_duration_stores_null_and_inherits_the_global_default ... ok
-> test creating_a_playlist_with_no_default_duration_inherits_the_campus_override ... ok

Fail-first, checked separately against 281aede (dev one commit before #281 merged, i.e. before this item's own feature landed): the same two tests against that commit fail with 422 Unprocessable Entity, "missing field default_duration_seconds" — the old contract required the value, so omitting it was simply rejected. That is the exact defect item 2 asks to cover.

Running local gates now; will push and open the PR once green, then hand back for merge.

Item 2 (comment 14402): wrote the server test for `POST /playlists` with no `default_duration_seconds`. Branch `test/GRI-2147-playlist-create-inherits-default` (from current `dev`), two tests in `crates/server/tests/playlist_integration.rs`: - `creating_a_playlist_with_no_default_duration_stores_null_and_inherits_the_global_default` — no campus override: value = global default, `source == "global"`, row stays `NULL`. - `creating_a_playlist_with_no_default_duration_inherits_the_campus_override` — campus has its own override: value = campus override, `source == "campus"`, row stays `NULL`. Both pass against current `dev` (the behaviour already landed in #281/#292): ``` SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable \ cargo test -p server --test playlist_integration creating_a_playlist_with_no_default_duration -- --include-ignored --nocapture -> test creating_a_playlist_with_no_default_duration_stores_null_and_inherits_the_global_default ... ok -> test creating_a_playlist_with_no_default_duration_inherits_the_campus_override ... ok ``` Fail-first, checked separately against `281aede` (`dev` one commit before #281 merged, i.e. before this item's own feature landed): the same two tests against that commit fail with `422 Unprocessable Entity`, `"missing field default_duration_seconds"` — the old contract required the value, so omitting it was simply rejected. That is the exact defect item 2 asks to cover. Running local gates now; will push and open the PR once green, then hand back for merge.
Member

Pushed test/GRI-2147-playlist-create-inherits-default and opened PR #293 (dev <- test/GRI-2147-playlist-create-inherits-default): #293

Adds the two tests from item 2 (comment 14402): POST /playlists with no default_duration_seconds stores NULL and resolves to the global default, and separately to a campus override. Fail-first confirmed against dev before #281 (422 missing field). Both pass on current dev.

CI is running (fj ci 293: exit 3, queue position 0). Will report the verdict and hand to vivy to merge and close #277 once green.

Pushed test/GRI-2147-playlist-create-inherits-default and opened PR #293 (dev <- test/GRI-2147-playlist-create-inherits-default): https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/pulls/293 Adds the two tests from item 2 (comment 14402): POST /playlists with no default_duration_seconds stores NULL and resolves to the global default, and separately to a campus override. Fail-first confirmed against dev before #281 (422 missing field). Both pass on current dev. CI is running (fj ci 293: exit 3, queue position 0). Will report the verdict and hand to vivy to merge and close #277 once green.
Author
Owner

PR #293 merged into dev (GRI-2147): server tests that POST /playlists without default_duration_seconds stores NULL and inherits global or campus default. Server-test follow-up (comment 14402 item 2) is done. Still open on #277: release note, PPTX dwell note.

PR #293 merged into dev (GRI-2147): server tests that POST /playlists without default_duration_seconds stores NULL and inherits global or campus default. Server-test follow-up (comment 14402 item 2) is done. Still open on #277: release note, PPTX dwell note.
Member

All four follow-ups are done, including the two the 21:10 comment lists as still open:

  1. Settings control — done, PR #292 merged.
  2. astraea's server test — done, PR #293 merged.
  3. Release note — done, added to release PR #136 under Migrations (per the 20:09 comment).
  4. PPTX dwell — decided (comment 14377): intended, baked in at upload, out of scope here.

@vivy the 21:10 comment listing "release note, PPTX dwell note" as still open looks stale against the 20:09 comment, which already marked both done. Nothing left on my side — ready to close whenever confirmed.

All four follow-ups are done, including the two the 21:10 comment lists as still open: 1. Settings control — done, PR #292 merged. 2. astraea's server test — done, PR #293 merged. 3. Release note — done, added to release PR #136 under *Migrations* (per the 20:09 comment). 4. PPTX dwell — decided (comment 14377): intended, baked in at upload, out of scope here. @vivy the 21:10 comment listing "release note, PPTX dwell note" as still open looks stale against the 20:09 comment, which already marked both done. Nothing left on my side — ready to close whenever confirmed.
Author
Owner

Confirmed: all four follow-ups landed (#281, #292, #293 merged; release note on #136; PPTX dwell decided in 14377). My 21:10 note was stale. Closing.

Confirmed: all four follow-ups landed (#281, #292, #293 merged; release note on #136; PPTX dwell decided in 14377). My 21:10 note was stale. Closing.
vivy closed this issue 2026-11-17 09:19:01 +00:00
Sign in to join this conversation.
No project
No assignees
4 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#277
No description provided.