Skip to content

feat(requests): let the requester or approving admin choose download server settings - #1

Closed
grtn91 wants to merge 5 commits into
mainfrom
grtn91/request-requester-options
Closed

grtn91 wants to merge 5 commits into
mainfrom
grtn91/request-requester-options

Conversation

@grtn91

@grtn91 grtn91 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Problem

Related issue: issue 10 of the Silo-Community Seerr plugin repo (written without a link on purpose, so this fork PR does not show up there)
Validation tasks: none

A request always gets the download server settings an admin saved, or a routing rule's. Neither the person requesting nor the admin approving can choose, for example, the quality profile or the folder for one title.

Approach

A router plugin declares which of its config selects may be chosen per request, and a "chosen by" select says who chooses on each server: the admin's setting, the requester, or the admin on approval (plugin SDK change, linked below).

  • The request dialog offers the options the server a title would go to leaves to requesters. The approve dialog offers those and the ones left to the approving admin, preset to the requester's pick.
  • A pick must be one of the values the plugin lists for that server. It is stored on the request and set in that server's config at submission, over the server's own value and a route's.
  • The admin queue shows each option as its own column.
  • New: GET /api/v2/requests/options/{media_type}/{tmdb_id}, GET /api/v2/admin/requests/{id}/options, options on create and approve, request_options_supported on request status, and one migration for the stored picks.

Validation

  • Go tests for internal/requests, internal/plugins, internal/api and the request and contract tests of internal/apiv2: pass.
  • OpenAPI, web types, fixtures, route inventory, migration ledger and local path checks: pass.
  • Web type-check, eslint, prettier and the admin request tests: pass.
  • Not run: golangci-lint, the Postgres-backed tests, and the full internal/apiv2 suite.

Evidence

Not captured yet. The request dialog, the approve dialog and the queue columns change what a user sees.

Risks

  • go.mod replaces the plugin SDK with a fork commit. It has to become a released SDK version before this can merge.
  • The new column and its update query are not covered by a database test.
  • Client follow-ups for the Apple and Android apps and the user manual are not filed.

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 says there is none.

Related PRs

Same feature in the other repos:

Stacked on top: #2

AI Disclosure

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

🤖 Generated with Claude Code

…server settings

A request reaches its download server with the settings an admin saved on
the server, or a routing rule's. Which quality profile or folder a title
gets could only be decided in advance, per server or per rule. A
requester could not ask for a different profile, and an admin approving
a request could not set one for that request.

A request router plugin can now declare config fields that may be chosen
per request (request_router.requester_options in its manifest), each
with a select in which the admin says per server who chooses: the saved
value, the requester, or the admin when approving.

- listRequestOptions and listAdminRequestOptions return the choices the
  plugin's ListConfigOptions reports for the server the request would go
  to. createRequest and adminApproveRequest take the picks as options.
- A pick is refused unless the plugin listed that value for that server.
  Picks are stored on the request (requester_choices) and set in the
  server's config at submission, over its own values and a route's.
- Web: selects in the request dialog and the seasons dialog, a dialog on
  approval, and the picks as columns in the admin request queue. The
  queue shows one server row when both qualities are one download.

go.mod replaces silo-plugin-sdk with a fork commit that carries the new
manifest field. It has to become a released SDK version before this can
merge.

Not run: golangci-lint, and the Postgres-backed tests, so the new column
and SetPendingRequesterChoices are untested against a database. Follow-ups
not opened yet: silo-apple, silo-android and the user manual.

AI disclosure: written with Claude Fable 5.2 in Claude Code. The focused
Go tests, the v2 contract checks and the request web tests pass locally;
checked by hand in the web UI against a Seerr with one Radarr and one
Sonarr.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
grtn91 and others added 4 commits November 12, 2026 19:10
…ings

Add a Postgres test for the requester_choices column and
SetPendingRequesterChoices: choices are stored on create, replaced while
the request is pending, and refused once it is approved or missing. The
test is listed in scripts/ci/db-contracts.txt so the go-db-pins job runs
it instead of skipping it.

Fix the findings golangci-lint reported on the changed lines: a
misspelling, an fmt.Errorf that should be errors.New, an unused test
variable, and an error from json.Marshal that cannot occur because the
value holds only strings. encodeRequesterChoices now returns the bytes
alone.

AI disclosure: written with Claude Sonnet 5.5 in Claude Code. Lint reports
0 issues; the request tests pass, as does the full internal/apiv2 suite in
a Linux container; the new test passes against Postgres.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The web typecheck runs with noUncheckedIndexedAccess, so an array index
is T | undefined. Read the shared queue row before setting shared on it,
and read the first approve call with optional chaining in the approval
test.

AI disclosure: written with Claude Sonnet 5.5 in Claude Code. The repo
typecheck, eslint, prettier and the affected web tests pass locally.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The requester options change pushed internal/apiv2/requests.go past 1000
lines and web/src/pages/admin-requests/RequestQueue.tsx past 800, which
the size ratchet refuses. Move the requester option types and handler to
request_options.go, and the queue's target list, option cells and column
layout helper to QueueCells.tsx and requestQueueModel.ts. Behavior is
unchanged.

AI disclosure: written with Claude Sonnet 5.5 in Claude Code. The size
ratchet, repo typecheck, eslint, prettier, lint-changed, the request web
tests and the request apiv2 tests pass locally.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Approving with picks stores them in the same guarded update that
  approves the request. Before, two admins approving at once could leave
  the winner's approval with the other admin's picks.
- An option's default is the first choice when the server's own setting
  is not on offer. A client now sends the selected value of every option,
  and the server leaves out a pick that is its own setting, so the value a
  form shows is the one that applies.
- Listing a title's options runs the create-time access check, so a
  blocked account cannot read the server's choices.
- Plugin errors are sanitized before they are logged.
- Web: an approval prompt that is open is not replaced by another
  request's, its picks reset per request, and a request made before the
  server reported whether it has request options waits for that answer.

AI disclosure: written with Claude Fable 5.2 in Claude Code. The request
Go tests, the Postgres request tests, the v2 contract checks, lint, the
size ratchet, the web typecheck and the web tests for the touched files
pass locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@grtn91 grtn91 closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant