Repository navigation
feat(settings): let an administrator set the Next Up defaults for profiles - #2674
Conversation
…files ui.next_up_mode and ui.next_up_new_releases_first declare admin_default (manifest revision 22). Profiles without their own value follow the administrator's choice on Home, library pages and Jellyfin /Shows/NextUp; a profile's own value still wins. One per-node config.AdminDefaults snapshot serves every resolver: one query for all defaults, lock-free reads while fresh, one refresh at a time (in the background once a snapshot exists), last good value on failure with a retry delay. Admin writes reload it before the client event and fence off older reads; other nodes reload on the admin settings_changed event, with a 10 s TTL as the backstop. Admin > Home Sections gets a card for both defaults; Settings > Home Screen names the inherited value and offers Use server default for both settings. Web Home and library rows now refresh when either Next Up setting changes, and a server-default change is re-read once more after the server TTL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…s layout The admin defaults snapshot now refreshes every half TTL in the background, so a node that missed another node's change event converges within the TTL even while idle; before, the web client's delayed re-read only started the refresh and got the old snapshot back. A Next up episodes change now refetches a mounted Home's layout before its rows reload, so switching to a separate row shows the Next Up row instead of only removing the episodes from Continue Watching. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… tests - Start AdminDefaults.Run after the proxy/transcode return, so stream nodes that never resolve viewer settings stop querying server_settings every 5 seconds. - Wait for a refresh to publish before asserting on the snapshot in the AdminDefaults tests; the fake reader reports a read done before the snapshot is stored, which failed 3 of 900 runs under -race. - Say the 10-second staleness bound holds while a node can read its settings. - Reuse refreshForSettingChange in invalidateSettingValueQueries instead of a second copy of the same invalidations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review summaryReviewed Fit: 7/10 · Readiness: 8/10 — conditional (assuming CI is green) AddressedFour minor findings, each fixed in
Checked and not changed
Remaining
Validated featuresNo passed case on the v1.0 board reaches this change. Person browsing (#1143) and server branding (#1227–#1229) share code paths, but their keys declare no User manualCovered by Silo-Server/siloserver.org#233 and draft docs PR Silo-Server/siloserver.org#234. The fixes here don't change what they describe. Apple and AndroidNeither app has a Next Up setting, and both show the rows the server builds, so no app change is needed. Their copied settings-manifest test fixtures will pick up revision 22 on their next sync. Scores
Cross-provider review: Codex ( |
Problem
Closes #2661
Related issue: #2358
Validation tasks: none
An admin can't choose how Next Up works for the people on their server. Next up episodes and Show new episodes first can only be set per profile, so every profile that never opens Settings > Home Screen gets Silo's built-in values (With Continue Watching, off). An admin who wants a separate Next Up row, or new episodes first, has to change each profile by hand, and new profiles start from the built-in values again.
This lets an admin set server-wide defaults for both settings on Admin > Home Sections. Profiles without their own value follow them on Home, on library pages, and in Jellyfin apps' Next Up. A profile's own choice, including With Continue Watching or off, still wins, and Use server default on Settings > Home Screen returns a profile to inheriting.
Stacked on #2365, which adds the
admin_defaultsettings-contract field this uses. Review that one first; this PR's diff is against its branch.Approach
ui.next_up_modeandui.next_up_new_releases_firstdeclareadmin_default(manifest revision 22). The admin's values are the server settingsdefaults.ui.next_up_modeanddefaults.ui.next_up_new_releases_first, written and validated through the existing admin settings API, as feat(settings): let an administrator set the default for title art #2365 does for title art. Effective reads keep reportingsource: "default"for an inherited value.config.AdminDefaults), built incmd/siloand passed to every resolver that reads these keys: the access and policy scope resolvers, home sections, progress sync, jellycompat's/Shows/NextUpordering and scope resolvers, and the settings-values handler (which now shares it instead of feat(settings): let an administrator set the default for title art #2365's per-request read).settings_changedevent, and the refresh loop covers a node that missed it.The admin control sits on Home Sections rather than next to title art on Appearance, because that page already owns what every profile sees on Home.
Native apps need no change. Neither the iOS nor the Android app has a Next Up setting; both show the rows the server builds, so they follow the admin's default as soon as it is set.
Validation
default, and Home had no Next Up row.separatefromdefaultstraight away, and the Home layout gained anext_uprow after Continue Watching, which now held only in-progress titles.combinedwon (no Next Up row); deleting it went back to the admin's value.truefromdefault.off, a string, and1were each rejected with 422.make lint-changedreports 0 issues.tsc -b, eslint and prettier on changed files pass. The web suite passes except one PGS decoder test that timed out under full-suite load; it passes on its own and this change doesn't touch it.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/issue-2661/
Risks
docs/settings-api.mdsays the same for other clients.server_settingsquery every 5 seconds to keep it fresh, including on an idle single node./api/v1bridge. v1 shares the resolver, so v1 clients also see an admin default once one is set. Nothing changes on a server that sets none.Checklist
Follow-ups: none for silo-apple or silo-android (neither app has a Next Up setting). User manual: Silo-Server/siloserver.org#233, draft docs PR Silo-Server/siloserver.org#234.
AI Disclosure
/siloworkflowcapture-web) for browser capturesclaude-opus-5-5(implementation and review),claude-sonnet-5-5(review subagents),gpt-6.1-sol(plan review)gpt-6.1-sol) moved the design from a per-resolver cached read to one shared snapshot. It also asked that the snapshot reload in step with the settings event, and that Home and library rows refresh on both keys. All were adopted.gpt-6.1-sol, reviewedae8cbcc) posted two findings. A Next up episodes change didn't refetch an open Home's layout. An idle node that missed the admin event refreshed only on the client's delayed re-read and returned the old snapshot to it. Both are fixed in319662e./siloreview of319662e(Claude Code subagents onclaude-opus-5-5andclaude-sonnet-5-5, plus one Codexgpt-6.1-solround with no findings) found four minor issues: flaky snapshot tests, the refresh loop polling on transcode and proxy nodes, an overstated staleness bound in the docs, and a duplicated web invalidation list. All four are fixed in720da70.🤖 Generated with Claude Code
Note
Add administrator-settable defaults for Next Up mode and release ordering
Adds server-wide Next Up defaults (
ui.next_up_mode,ui.next_up_new_releases_first) that apply when a profile has no stored preference. Explicit profile choices always win.config.AdminDefaultsshared per-node cache (admin_defaults.go): batch-loads all admin-default keys in one settings read, serves a 10-second snapshot, keeps stale values during failed refreshes with 5-second backoff, refreshes in the background, and reloads immediately on settings-changed events with generation fencing.defaults.server key.adminDefaultin the manifest and contract definitions.NextUpModeandNextUpNewReleasesFirstresolvers,ResolveViewerPreferences/Strict, andViewerResolver.Resolvegained aServerSettingsparameter — external callers of these signatures must pass nil or a provider.progresssyncscope resolution now goes through the configured resolver instead of direct preference resolution.Macroscope summarized 720da70.