Skip to content

feat(web): say when downloads are turned off server-wide on group and account pages - #4087

Merged
Quick104 merged 3 commits into
mainfrom
claude/download-permissions-simplify-24cab8
Nov 13, 2026
Merged

Quick104 merged 3 commits into
mainfrom
claude/download-permissions-simplify-24cab8

Conversation

@Quick104

@Quick104 Quick104 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #1197 C1 (adds a note beside the download policy controls; the controls and what they save are unchanged)

Other clients: Apple N/A (web admin pages with no client counterpart); Android N/A (same); Roku N/A (same)

Downloads are gated in three places: the server-wide Allow downloads setting, the access group, and a per-account override. The group and account pages showed only their own switch, so an admin could see "Allowed" on a group or an account while the server had downloads off and nobody could download. A fresh server is in exactly that state: Allow downloads defaults to off and the default group allows downloads.

The group and account pages now say when a server-wide switch overrides the permission being edited, and link to Settings → Downloads.

Approach

The three layers and their enforcement are unchanged; this is web admin only, with no server or API change.

  • The access group editor, the account's Downloads card, and the new-account form show a note when Allow downloads is off. When downloads are on but Prepare device-friendly copies is off, the note says every download is the original file instead.
  • The account overview says downloads are off for the whole server instead of "Downloads allowed". The counts of copies already on devices stay.
  • Allow downloads on the Downloads settings page gains a description: groups and accounts decide who may download while it is on.

The group and account controls stay editable while the server switch is off, as the Requests card already does for requests. The note reads the same settings the Downloads settings page edits and stays hidden until they load, so it only appears for a switch known to be off.

The four new strings come from Silo-Server/silo-translations#26, translated into the seven shipped languages. .silo-translations pins catalog release 2026.11.13-734223e, which contains them.

Validation

  • Web lint, format check, build, and bundle budget: pass.
  • Web tests: 7,332 of 7,361 pass on the first two commits; after merging main and re-syncing translations, the typecheck and the 905 tests under the touched admin areas pass. The 29 failures are in four files this change does not touch (request.deadline, authCore.v2, client-context-v3, player-auth-refresh) and fail the same way on the parent commit on the machine that ran them.
  • Browser check on an isolated sandbox built from this branch, at desktop and phone width: both notes, the overview line, and the settings description render, and the pages switch notes without a reload after Allow downloads is saved.
  • Not run: the Go gate and the generated-contract checks. No Go, API, or settings-manifest file changes.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-4087/

Surface and build: web admin, commit 3b6aa9a on an isolated sandbox; before captures from the parent commit against the same data.

Risks

The user, group, and new-account pages now fetch the admin server settings. If that request fails the note stays hidden and the pages behave as before.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code (Claude desktop app, Claude Agent SDK)
  • Tool(s): Claude Code
  • Model(s): claude-fable-5-2
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

Note

Add server-wide downloads-off notices to admin access pages

  • Adds the DownloadsServerNotice component (DownloadsServerNotice.tsx) that shows a warning when downloads or conversion are disabled server-wide. The downloads-off message takes priority when both are off, and the notice is hidden when both switches are on.
  • Places the notice on the access-group editor, account access-policy fields, and user downloads policy card, each near the download toggles. Each message links to the Downloads settings page.
  • New useServerDownloadSwitches hook (useServerDownloadSwitches.ts) reads admin server settings and returns downloadsOff and conversionOff. Both stay false until settings load.
  • Updates the account access summary (AccessSummaryCard.tsx) to reflect server switches: shows a server-off downloads label and omits download policy detail while downloads are off server-wide, and reports original-files-only when conversion is off.
  • Adds a description to the server-wide downloads toggle on the Downloads settings page, plus localized messages for all locales.

Macroscope summarized d58f28f.

Quick104 and others added 2 commits November 13, 2026 13:15
… account pages

An access group or an account can allow downloads while the server-wide
switch is off, and nothing on those pages said so. The access group editor,
the account Downloads card, and the new-account form now show a note that
links to Settings → Downloads, and the account overview stops calling
downloads allowed when the server has them off.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…hook

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Nov 13, 2026
@silo-kody

silo-kody Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T19:26:23.799008Z d58f28f New commits
🔒 Security Review ✅ Completed 2026-11-13T19:28:54.546551Z d58f28f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The web interface now shows notices for server-wide download restrictions and updates download access summaries to reflect server and account settings. The Downloads setting has a translated description, and locale catalogs add the related messages.

Changes: Server-wide download policy

Layer / File(s) Summary
Read server switches and render notices
web/src/hooks/admin/useServerDownloadSwitches.ts, web/src/components/admin/DownloadsServerNotice.tsx, web/src/components/admin/DownloadsServerNotice.test.tsx
The hook reports whether server-wide downloads or conversion are off after settings load. The notice displays the matching message and a link to Downloads settings. Tests cover unknown and configured switch states.
Show server policy in admin views
web/src/components/UserPolicyFields.tsx, web/src/components/admin/access-groups/AccessGroupEditor.tsx, web/src/pages/admin-users/detail/access/DownloadsPolicyCard.tsx, web/src/pages/admin-users/detail/overview/AccessSummaryCard.tsx, web/src/pages/admin-settings/DownloadsSettings.tsx, web/src/pages/AdminUserDetail.test.tsx
Policy editors display the notice. The user access summary accounts for server-wide and account-level settings. The Downloads setting receives a description, and the user-detail test mock includes server settings.
Add download policy messages
.silo-translations, web/src/locales/keys.ts, web/src/locales/{ar-XB,ar,de,en-XA,en,es,fr,ja,pt-BR,zh-Hans}.json
The locale catalogs and message keys add server-off, conversion-off, Downloads-setting, and user-overview messages. Translation provenance metadata changes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: rangodj

Merge Risk: Minimal · up to d58f2

The admin pages now explain when the server-wide download setting overrides group and account permissions. The translations are synced to a published release and cover every shipped language. No merge-blocking risk remains.

Architecture risk: Low · up to d58f2

The change affects 1 system.

Changed systems: web

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — web (service) was modified; 20 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in web/src/components/UserPolicyFields.tsx: Adds the DownloadsServerNotice import.
  • observed — Modified behavior in web/src/components/UserPolicyFields.tsx: Renders DownloadsServerNotice before the download and download-transcode policy controls in PolicyAccessFields.
  • observed — Modified behavior in web/src/components/admin/DownloadsServerNotice.test.tsx: Adds a hoisted settings mock, mocks useAdminServerSettings to return it, and defines a helper that renders DownloadsServerNotice inside a MemoryRouter. Each test resets settings to unknown.
  • observed — Modified behavior in web/src/components/admin/DownloadsServerNotice.test.tsx: Adds assertions for four settings states: unknown settings and both switches enabled expect an empty container; both switches disabled expect a server-wide-off message and a link to /admin/settings/downloads; downloads enabled with transcoding disabled expects a device-friendly-copies message.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a notice that says downloads are off server-wide, shown on group and account pages. The diff adds a DownloadsServerNotice component to the access-group editor, the dow…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states the problem (downloads gated by a server-wide switch, group, and account; groups and accounts showed 'Allowed' while the server had downloads off), the approach (notes on the ac…
Full details: Title check

Explanation

The title names the main change: a notice that says downloads are off server-wide, shown on group and account pages. The diff adds a DownloadsServerNotice component to the access-group editor, the downloads policy card and the policy fields, and changes the account overview. The title is specific and matches the changeset. It is long (83 characters) but still readable.

Full details: Description check

Explanation

The description states the problem (downloads gated by a server-wide switch, group, and account; groups and accounts showed 'Allowed' while the server had downloads off), the approach (notes on the access group editor, account Downloads card, and new-account form, plus an overview change and a settings description), validation, and risks. It is directly related to the changeset, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb18480d-8203-4ea3-ac0f-e23e083c6f2e
Commits

Reviewing files that changed from the base of the PR and between 7c35323 and d58f28f.

Files selected for processing: 12

  • .silo-translations
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/de.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/fr.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/pt-BR.json
  • web/src/locales/zh-Hans.json
Files skipped from review as they are similar to previous changes: 11

  • .silo-translations
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/de.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/fr.json
  • web/src/locales/ja.json
  • web/src/locales/pt-BR.json
  • web/src/locales/zh-Hans.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@silo-triage silo-triage Bot added enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c35323012

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .silo-translations Resolved
Comment thread .silo-translations Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6b608942-500d-4bf4-8e91-daf63b46cf39
Commits

Reviewing files that changed from the base of the PR and between 8d68c47 and 7c35323.

Files selected for processing: 21

  • .silo-translations
  • web/src/components/UserPolicyFields.tsx
  • web/src/components/admin/DownloadsServerNotice.test.tsx
  • web/src/components/admin/DownloadsServerNotice.tsx
  • web/src/components/admin/access-groups/AccessGroupEditor.tsx
  • web/src/hooks/admin/useServerDownloadSwitches.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/de.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/fr.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/pt-BR.json
  • web/src/locales/zh-Hans.json
  • web/src/pages/AdminUserDetail.test.tsx
  • web/src/pages/admin-settings/DownloadsSettings.tsx
  • web/src/pages/admin-users/detail/access/DownloadsPolicyCard.tsx
  • web/src/pages/admin-users/detail/overview/AccessSummaryCard.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Comment thread .silo-translations Resolved
…ssions-simplify-24cab8

# Conflicts:
#	.silo-translations
#	web/src/locales/keys.ts
@silo-triage silo-triage Bot added size/XL 500–999 added + deleted lines (all files); change volume, not priority. and removed size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. labels Nov 13, 2026
@Quick104
Quick104 merged commit 2e05489 into main Nov 13, 2026
28 checks passed
@Quick104
Quick104 deleted the claude/download-permissions-simplify-24cab8 branch November 13, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/XL 500–999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant