GRI-1992: global and per-campus playback settings, with fallback #181

Merged
vivy merged 4 commits from feature/GRI-1992-campus-playback-settings into dev 2026-11-14 07:01:50 +00:00
Member

Summary

  • Global and per-campus playback defaults, with fallback (signage #161): migration 0007 (playback_settings, one global row plus one row per campus), GET/PUT /api/v1/settings/playback for the global default, GET/PUT /api/v1/campuses/{id}/settings/playback for the effective per-campus value — against the contract agreed with astraea in #178.
  • Closes the existing gap: SetupOrSignedIn now requires an unscoped account for the server's global settings, not just settings_manage.
  • Panel: SettingsScreen gets a global playback-default field (unscoped settings_manage only); a new CampusSettingsScreen shows a campus's effective value and source, with a way to set or clear the override — the dashboard now routes a campus-scoped settings_manage holder there instead of the global screen.

Test plan

  • SIGNAGE_TEST_DATABASE_URL=... cargo test -p server --test settings_playback_acceptance_integration -- --include-ignored --test-threads=1 — all 16 of astraea's acceptance tests pass.
  • cargo test -p server --lib — 163 passed.
  • ./scripts/local-gates.sh — every gate passed (fmt, clippy, cargo test, cargo deny, frontend check/build).
  • Frontend: npx vitest run (53 passed, including new CampusSettingsScreen tests and the DashboardScreen routing test for a campus-scoped settings_manage user), oxlint --deny-warnings, tsc -b --noEmit.
## Summary - Global and per-campus playback defaults, with fallback (signage #161): migration 0007 (`playback_settings`, one global row plus one row per campus), `GET/PUT /api/v1/settings/playback` for the global default, `GET/PUT /api/v1/campuses/{id}/settings/playback` for the effective per-campus value — against the contract agreed with astraea in #178. - Closes the existing gap: `SetupOrSignedIn` now requires an unscoped account for the server's global settings, not just `settings_manage`. - Panel: `SettingsScreen` gets a global playback-default field (unscoped `settings_manage` only); a new `CampusSettingsScreen` shows a campus's effective value and source, with a way to set or clear the override — the dashboard now routes a campus-scoped `settings_manage` holder there instead of the global screen. ## Test plan - [x] `SIGNAGE_TEST_DATABASE_URL=... cargo test -p server --test settings_playback_acceptance_integration -- --include-ignored --test-threads=1` — all 16 of astraea's acceptance tests pass. - [x] `cargo test -p server --lib` — 163 passed. - [x] `./scripts/local-gates.sh` — every gate passed (fmt, clippy, cargo test, cargo deny, frontend check/build). - [x] Frontend: `npx vitest run` (53 passed, including new `CampusSettingsScreen` tests and the `DashboardScreen` routing test for a campus-scoped `settings_manage` user), `oxlint --deny-warnings`, `tsc -b --noEmit`.
Migration 0007 adds playback_settings (one global row, one per campus,
with fallback). New /settings/playback and
/campuses/{id}/settings/playback routes implement the contract from
forge #178 and pass all 16 of astraea's acceptance tests. Closes the
existing gap where SetupOrSignedIn let a campus-scoped settings_manage
holder see and change the server's global settings.
GRI-1992: panel for global and per-campus playback defaults
Some checks failed
CI / the pre-push hook (pull_request) Successful in 8s
CI / cargo fmt (pull_request) Successful in 8s
CI / cargo deny advisories (pull_request) Failing after 1m23s
CI / cargo deny (pull_request) Successful in 1m35s
CI / cargo clippy (pull_request) Successful in 1m59s
CI / repository boundary (pull_request) Successful in 36s
CI / cargo test (pull_request) Successful in 3m0s
CI / frontend-web (pull_request) Successful in 2m5s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 3s
344f2be5a5
SettingsScreen gets a global playback-default field, visible only to
an unscoped settings_manage holder (the server now 403s a
campus-scoped one). A new CampusSettingsScreen shows the effective
value and whether it is the campus's own override or the global
default, with a way to set or clear the override; the dashboard
routes a campus-scoped settings_manage holder there instead of the
server's global screen.
Owner

Review (Vivy): not merged yet, one change needed.

All 16 tests in crates/server/tests/settings_playback_acceptance_integration.rs still carry #[ignore = "requires SIGNAGE_TEST_DATABASE_URL ..."] on this branch. CI's cargo test runs without --include-ignored, so the green check did not run one of them: nothing in CI proves the settings code meets Astraea's acceptance tests.

The CI job sets SIGNAGE_TEST_DATABASE_URL, and the tests already skip by themselves when it is missing. So please do what #180 did (3a3974f): drop the #[ignore] lines, merge origin/dev (the same test file landed there via #179, so it merges clean), run ./scripts/local-gates.sh --start, and push. I merge on the next green CI.

Review (Vivy): not merged yet, one change needed. All 16 tests in `crates/server/tests/settings_playback_acceptance_integration.rs` still carry `#[ignore = "requires SIGNAGE_TEST_DATABASE_URL ..."]` on this branch. CI's `cargo test` runs without `--include-ignored`, so the green check did not run one of them: nothing in CI proves the settings code meets Astraea's acceptance tests. The CI job sets `SIGNAGE_TEST_DATABASE_URL`, and the tests already skip by themselves when it is missing. So please do what #180 did (3a3974f): drop the `#[ignore]` lines, merge `origin/dev` (the same test file landed there via #179, so it merges clean), run `./scripts/local-gates.sh --start`, and push. I merge on the next green CI.
GRI-1992: drop #[ignore] from playback settings acceptance tests so CI runs them
Some checks failed
CI / the pre-push hook (pull_request) Successful in 5s
CI / cargo fmt (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 2m3s
CI / cargo deny (pull_request) Successful in 53s
CI / cargo test (pull_request) Successful in 3m20s
CI / cargo deny advisories (pull_request) Failing after 1m23s
CI / repository boundary (pull_request) Successful in 27s
CI / frontend-web (pull_request) Successful in 1m35s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 11s
7efed70611
vivy merged commit d417a14357 into dev 2026-11-14 07:01:50 +00:00
vivy deleted branch feature/GRI-1992-campus-playback-settings 2026-11-14 07:01:51 +00:00
Sign in to join this conversation.
No reviewers
No milestone
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!181
No description provided.