Skip to content

feat(requests): let a requester or approving admin choose a request router plugin's settings - #4040

Open
grtn91 wants to merge 8 commits into
Silo-Server:mainfrom
grtn91:grtn91/request-requester-options
Open

grtn91 wants to merge 8 commits into
Silo-Server:mainfrom
grtn91:grtn91/request-requester-options

Conversation

@grtn91

@grtn91 grtn91 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-plugin-sdk#67, Silo-Community/silo-plugins-requests-seerr#10
Validation tasks: none

A request reaches its download server with the settings an admin saved on that server, or a routing rule's. Which quality profile or folder a title gets can only be decided in advance, per server or per rule. A requester can't ask for a different profile, and an admin approving a request can't set one for that request. This matters to anyone whose one Radarr or Sonarr serves several uses.

This change lets a request router plugin declare settings that can be chosen per request. The admin decides per server whether the saved value, the requester, or the approving admin chooses. It needs the manifest field from Silo-Server/silo-plugin-sdk#67.

Approach

A plugin lists config fields in request_router.requester_options. Each entry is a select and a second select in the same form where the admin says who chooses: the saved value, the requester, or the admin on approval.

  • 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. Each list comes with an offer that goes back as options_offer, so picks made from a list the server no longer offers are refused.
  • A pick is refused unless the plugin listed that value for that server. Picks are stored on the request (requester_choices, new migration) and set in the server's config at submission, over its own values and a route's.
  • request_options_supported on the request status tells clients whether the server offers this.
  • 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.

Affected: internal/requests, internal/apiv2 (OpenAPI, web types, fixtures), web, one migration.

Validation

  • golangci-lint v2.12.2 (the CI version) on the branch: 0 issues.
  • Go tests for internal/requests, internal/plugins, internal/api: pass.
  • Full internal/apiv2 suite: pass in a Linux container (golang:1.26). It crashes on SQLite open on my machine, and does so on a clean origin/main too.
  • Postgres: the migration applies cleanly to an empty database, and the request DB tests pass, including the new one for the requester_choices column.
  • Contract checks (verify-local-paths, verify-apiv2-openapi, verify-apiv2-web-types, verify-route-inventory, verify-apiv2-fixtures, verify-migration-ledger, migrate-validate): pass.
  • Web tsc, eslint, prettier and the request and admin tests: pass.

Evidence

How I checked it, by hand in the web UI against a Seerr with one Radarr and one Sonarr, on this commit (304f6a166):

  • Requester chooses: the profile (and folder) set to "requester". The request dialog offered the server's profiles and folders, and the request was sent with the pick.
  • Default: with nothing picked, the request used the server's saved setting.
  • Admin chooses on approval: the setting set to "admin on approval". The approval dialog offered the choices, and the approved request used the admin's pick.
  • The admin queue showed the picks as columns.

Surface and build: web request dialog, seasons dialog, approval dialog and admin request queue; commit 304f6a166.

Settings:
image

Users chooses on request:
image

Admin chooses on approval:
image

Risks

  • go.mod replaces silo-plugin-sdk with a fork commit that carries the new manifest field. It must become a released SDK version before this can merge.
  • A new migration adds a requester_choices column to media_requests.
  • Clients that don't know request options ignore the field and use the saved settings.
  • With requester chosen, everyone who may request sees the choices, including folder paths. The admin turns this on per setting.
  • User manual follow-up: docs: download server settings a requester or approving admin chooses per request siloserver.org#378.
  • Follow-ups not opened yet: silo-apple and silo-android.

Related PR's

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
  • Tool(s): Claude Code
  • Model(s): claude-fable-5-2 (code), claude-sonnet-5-5 (lint fixes, the Postgres test and this description)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

Note

Add requester-selectable request router options to media requests

  • Request router plugins can declare requester-selectable settings. Requesters pick them when creating a request, and approving admins can pick or change them at approval time (requester_options.go, router_seasons.go).
  • New v2 endpoints list the offered options: GET /api/v2/requests/options/{media_type}/{tmdb_id} and GET /api/v2/admin/requests/{id}/options. The request status endpoint now advertises request_options_supported (request_options.go, openapi.json).
  • Picks are validated against a SHA-256 offer token and stored in a new non-null requester_choices JSONB column on media_requests; picks are applied to router connection config at submission without changing the saved server config (repository.go, 20261111012048_request_requester_choices.sql).
  • The web UI shows an options dialog on request creation and on approval, and the admin queue gains one column per option label (RequestOptionsDialog.tsx, ApproveOptionsDialog.tsx, requestQueueModel.ts).
  • Risk: DB migration adds requester_choices to media_requests (default {}); go.mod adds a replace directive pinning the Silo plugin SDK.

Macroscope summarized cd3df81.

grtn91 and others added 2 commits November 11, 2026 17:25
…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>
…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>
@silo-triage silo-triage Bot added the size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. label Nov 12, 2026
@silo-kody

silo-kody Bot commented Nov 12, 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 ❌

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Walkthrough

The pull request adds request-option listing and selection to the v2 API and web client. The backend validates and stores requester and approver choices, then applies eligible choices during fulfillment. The admin queue supports approval choices and displays selected options.

Changes: Request option flow

Layer / File(s) Summary
Contracts and capability metadata
contracts/api/v2/*, docs/architecture/*, internal/plugins/request_router.go, internal/api/requests_wiring.go, internal/api/testdata/*, web/src/api/v2/schema.ts, web/src/api/v2/operations.ts, web/src/api/types.ts, go.mod
The API contracts and documentation describe option offers, submitted choices, and capability support. Plugin capability lookup provides admin field labels for declared options. Fixtures and route data include the new response fields and endpoints. go.mod adds a plugin SDK replacement.
API endpoints and response mapping
internal/apiv2/*, internal/api/handlers/requests.go, internal/apiv2/router.go
The v2 API adds requester and admin option-list endpoints, request and approval option fields, response conversions, and request-status capability reporting.
Option resolution, persistence, and fulfillment
internal/requests/*, migrations/sql/*, scripts/ci/db-contracts.txt
The service resolves and validates requester and admin choices, stores them with requests and approvals, and applies eligible choices during fulfillment. The migration adds a JSONB column. Database and service tests cover option validation and stored choices.
Requester option selection
web/src/api/v2/requests.ts, web/src/hooks/queries/*, web/src/components/Request*, web/src/lib/mediaRequests*, web/src/pages/ItemDetail/components/RequestActionBar.tsx, web/src/pages/TitleDetail.test.tsx
The web client loads options and displays selectors in movie and season request flows. It sends valid selections with their offer token. Tests cover default handling and dialog submission.
Admin approval and queue display
web/src/api/v2/adminRequests.ts, web/src/hooks/queries/admin/requests.ts, web/src/pages/admin-requests/*, web/src/pages/AdminRequests.v2.test.tsx
The admin queue loads approval options and presents them for confirmation. The queue and request detail display selected options and deduplicated targets. Tests cover approval and queue helpers.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Requester
  participant WebClient
  participant V2API
  participant RequestService
  participant Repository
  Requester->>WebClient: Open request action
  WebClient->>V2API: Fetch option offer
  V2API->>RequestService: Resolve requester options
  RequestService-->>V2API: Offer and choices
  V2API-->>WebClient: Return option list
  WebClient->>V2API: Submit request, picks, and offer token
  V2API->>RequestService: Validate and create request
  RequestService->>Repository: Store request choices
Loading

Suggested labels: go, javascript, api-v2
Suggested reviewers: quick104

Merge Risk: Low · up to cd3df

Request and approval choices are now bound to the offer the user saw, so a routing or label change is rejected instead of being applied silently. Two small items remain: the user-manual follow-up should be confirmed as linked, and an admin whose approval choices went stale has to reopen the approval dialog manually. Neither blocks merging.

Security architecture risk: Moderate · up to cd3df

Selections are constrained by server-provided choices and administrator permissions. However, queued or retried requests can retain selections after the destination or meaning of a choice changes, potentially applying a different folder or profile than originally selected.

Retained concerns

  • Medium · security · inferred: Queued selections lose their offer identity before fulfillment. Stored choices contain an integration ID and raw values, but that integration can be repointed or rebound without changing its ID. Ordinary approval and retries can subsequently apply those values without checking the original destination incarnation or choice mapping. A previously selected identifier or path can therefore be interpreted differently and override the destination's current saved settings. Admin-only configuration edits, chooser rechecks and expected downstream value validation limit exposure, but do not establish protection against valid identifiers being remapped. The persisted requester-controlled override path is introduced by this PR.
Security review details

Security Blast Radius

  • inferred — The identified exposure concerns stored picks on pending or retried requests associated with a changed integration. Multiple queued requests using that integration could inherit the changed interpretation. The inspected application code modifies a per-submission configuration copy, not the saved server configuration; changing the integration itself requires administrator authority.

Security Findings and Attack Paths

  • inferred — An eligible requester can save a currently valid nondefault selection. If the integration is later repointed or a choice identifier is reassigned while the request waits, ordinary approval or recovery can replay the stored value over current settings. Submission-time token checks do not cover this later transition. Downstream rejection of unknown values is useful counterevidence, but protection against valid remapped identifiers remains unestablished.

Trust Boundaries and Controls

  • observed — Administrator listing and approval operations use ClassActingAdmin, whose gate requires acting-admin authorization. Both service methods also reject non-admin viewers. The ordinary requester operation is profile-scoped and obtains its identity from the authorized request context.
  • observed — The new web listing does not need an explicit profileContext argument to send the active profile. Its shared session transport adds profile and PIN headers. The inspected source therefore does not support the supplied allegation that this call omits profile identity.

Resilience and Maintainability Implications

  • observed — Approval status, selected values and the status event share one guarded transaction, preventing competing approvals from storing a loser's picks. Post-commit submission reuses the existing lease, backoff and recovery flow. Cancellation and decline remain guarded against withdrawing work already submitted; partial fulfillment records missing qualities as failures for later recovery.

Hardening Proposals

  • proposed — Persist a destination generation and relevant choice identity with selections. Before deferred fulfillment, detect endpoint rebinding or choice remapping and require explicit reselection or another defined recovery policy rather than silently interpreting the old value under new settings.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: request router plugin settings that a requester or approving admin can choose per request. The changeset adds requester/approver option offers, validation, storage, AP…
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 is specific and on-topic. It explains the problem (requesters and approving admins cannot choose per-request router settings such as quality profile or folder), the approach (plugin-de…
Full details: Title check

Explanation

The title names the main change: request router plugin settings that a requester or approving admin can choose per request. The changeset adds requester/approver option offers, validation, storage, API endpoints, and web UI for this. The title uses the conventional commit form and is specific, so it passes.

Full details: Description check

Explanation

The description is specific and on-topic. It explains the problem (requesters and approving admins cannot choose per-request router settings such as quality profile or folder), the approach (plugin-declared requester_options, new list endpoints, offer tokens, requester_choices migration, web dialogs and queue columns), validation steps, manual evidence, and risks (go.mod SDK fork replace, new migration, requester-visible folder paths). These match the changeset summaries across the Go API, requests service, migration, OpenAPI, and web files.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added enhancement New feature or request priority: P2 Limited scope, workaround exists, or polish labels Nov 12, 2026
Comment thread internal/requests/requester_options.go Resolved
Comment thread internal/requests/requester_options.go Resolved
Comment thread internal/requests/requester_options.go Resolved
@grtn91 grtn91 changed the title Grtn91/request requester options feat(requests): let a requester or approving admin choose a request router plugin's settings Nov 12, 2026

@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: 4

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: c1ee56b0-f3d9-4653-8253-641950647573
Commits

Reviewing files that changed from the base of the PR and between b0ded7c and 304f6a1.

Files ignored due to path filters: 1

  • go.sum is excluded by !**/*.sum
Files selected for processing: 51

  • contracts/api/v2/fixtures/admin_requests_ok.json
  • contracts/api/v2/fixtures/cancel_request_ok.json
  • contracts/api/v2/fixtures/create_request_ok.json
  • contracts/api/v2/fixtures/list_my_requests_ok.json
  • contracts/api/v2/fixtures/request_status_ok.json
  • contracts/api/v2/openapi.json
  • docs/architecture/api-contract.md
  • docs/architecture/media-requests.md
  • go.mod
  • internal/api/handlers/requests.go
  • internal/api/requests_wiring.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/admin_requests.go
  • internal/apiv2/request_lifecycle.go
  • internal/apiv2/requests.go
  • internal/apiv2/requests_test.go
  • internal/apiv2/router.go
  • internal/plugins/request_router.go
  • internal/requests/repository.go
  • internal/requests/requester_choices_db_test.go
  • internal/requests/requester_options.go
  • internal/requests/requester_options_test.go
  • internal/requests/router_seasons.go
  • internal/requests/service.go
  • internal/requests/service_test.go
  • internal/requests/store.go
  • internal/requests/types.go
  • migrations/sql/20261111012048_request_requester_choices.sql
  • scripts/ci/db-contracts.txt
  • web/src/api/types.ts
  • web/src/api/v2/adminRequests.ts
  • web/src/api/v2/operations.ts
  • web/src/api/v2/requests.ts
  • web/src/api/v2/schema.ts
  • web/src/components/RequestOptionFields.tsx
  • web/src/components/RequestOptionsDialog.tsx
  • web/src/components/RequestSeasonsDialog.test.tsx
  • web/src/components/RequestSeasonsDialog.tsx
  • web/src/hooks/queries/admin/requests.ts
  • web/src/hooks/queries/keys.ts
  • web/src/hooks/queries/useRequests.ts
  • web/src/lib/mediaRequests.test.ts
  • web/src/lib/mediaRequests.ts
  • web/src/pages/AdminRequests.v2.test.tsx
  • web/src/pages/ItemDetail/components/RequestActionBar.tsx
  • web/src/pages/TitleDetail.test.tsx
  • web/src/pages/admin-requests/ApproveOptionsDialog.tsx
  • web/src/pages/admin-requests/RequestQueue.tsx
  • web/src/pages/admin-requests/RequestQueueDialog.tsx
  • web/src/pages/admin-requests/requestQueueModel.test.ts
  • web/src/pages/admin-requests/requestQueueModel.ts

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

Comment thread contracts/api/v2/openapi.json Resolved
Comment thread internal/requests/requester_options.go Resolved
grtn91 and others added 3 commits November 12, 2026 19:32
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>
@silo-kody

silo-kody Bot commented Nov 12, 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 ❌

Comment thread internal/requests/requester_options.go Resolved
@coderabbitai coderabbitai Bot added api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase go Pull requests that update go code javascript Pull requests that update javascript code labels Nov 12, 2026

@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: 1

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: 0fa79fe6-f2ec-4b89-98ce-b6a560729ad3
Commits

Reviewing files that changed from the base of the PR and between 304f6a1 and 4da7dfd.

Files selected for processing: 23

  • contracts/api/v2/openapi.json
  • docs/architecture/media-requests.md
  • internal/apiv2/request_options.go
  • internal/apiv2/requests.go
  • internal/requests/repository.go
  • internal/requests/requester_choices_db_test.go
  • internal/requests/requester_options.go
  • internal/requests/requester_options_test.go
  • internal/requests/service.go
  • internal/requests/service_test.go
  • internal/requests/store.go
  • web/src/api/v2/schema.ts
  • web/src/components/RequestSeasonsDialog.test.tsx
  • web/src/hooks/queries/useRequests.ts
  • web/src/lib/mediaRequests.test.ts
  • web/src/lib/mediaRequests.ts
  • web/src/pages/AdminRequests.v2.test.tsx
  • web/src/pages/ItemDetail/components/RequestActionBar.tsx
  • web/src/pages/TitleDetail.test.tsx
  • web/src/pages/admin-requests/ApproveOptionsDialog.tsx
  • web/src/pages/admin-requests/QueueCells.tsx
  • web/src/pages/admin-requests/RequestQueue.tsx
  • web/src/pages/admin-requests/requestQueueModel.ts
Files with no reviewable changes: 1

  • internal/apiv2/requests.go
Files skipped from review as they are similar to previous changes: 1

  • web/src/api/v2/schema.ts

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

Comment thread internal/requests/requester_options.go Resolved
A requester's pick the admin submitted unchanged stayed the requester's.
When the server had moved that option from requesters to the approver
while the request waited, the pick was left out at submit and the saved
setting applied instead of the value the admin confirmed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@silo-kody

silo-kody Bot commented Nov 14, 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 ❌

Conflicts: the request status line (keeps upstream's profile-block check
and adds request_options_supported) and the DB contract list (both sides'
tests). RequesterOptions passes the viewer to ensureViewerRequestsAllowed,
whose signature changed upstream.

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

@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: 9d41e111-4615-4302-8f7d-c664992fcb34
Commits

Reviewing files that changed from the base of the PR and between efd6bb3 and 735d3ed.

Files ignored due to path filters: 1

  • go.sum is excluded by !**/*.sum
Files selected for processing: 21

  • contracts/api/v2/openapi.json
  • docs/architecture/api-contract.md
  • docs/architecture/media-requests.md
  • go.mod
  • internal/api/handlers/requests.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/request_lifecycle.go
  • internal/apiv2/requests.go
  • internal/apiv2/router.go
  • internal/requests/repository.go
  • internal/requests/requester_options.go
  • internal/requests/service.go
  • internal/requests/service_test.go
  • internal/requests/store.go
  • internal/requests/types.go
  • scripts/ci/db-contracts.txt
  • web/src/api/types.ts
  • web/src/api/v2/schema.ts
  • web/src/hooks/queries/keys.ts
  • web/src/lib/mediaRequests.test.ts
  • web/src/lib/mediaRequests.ts

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

Comment thread internal/apiv2/requests.go Resolved
Comment thread internal/requests/requester_options.go Resolved
Picks were checked against the server a title goes to when they are
submitted. When routing had moved the title to another server while a
dialog was open, or the server had relabelled a value, the same value
could pass and mean another choice.

Each list of options now comes with an offer token, a digest of the
server and its choices. createRequest and adminApproveRequest take it
back as options_offer and refuse picks when it is missing or no longer
the current offer. The web app sends it, reads the choices again after a
refusal, and drops picks made from a replaced list.

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 15, 2026
@silo-triage silo-triage Bot removed the size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. label Nov 15, 2026
@silo-kody

silo-kody Bot commented Nov 15, 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 ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@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: 1

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: bfe71e8b-548e-4cad-a2bb-fcab9db71627
Commits

Reviewing files that changed from the base of the PR and between 735d3ed and cd3df81.

Files selected for processing: 28

  • contracts/api/v2/openapi.json
  • docs/architecture/media-requests.md
  • internal/api/handlers/requests.go
  • internal/apiv2/admin_requests.go
  • internal/apiv2/request_options.go
  • internal/apiv2/requests.go
  • internal/apiv2/requests_test.go
  • internal/apiv2/router.go
  • internal/requests/requester_options.go
  • internal/requests/requester_options_test.go
  • internal/requests/service.go
  • internal/requests/types.go
  • web/src/api/types.ts
  • web/src/api/v2/adminRequests.ts
  • web/src/api/v2/requests.ts
  • web/src/api/v2/schema.ts
  • web/src/components/RequestOptionsDialog.tsx
  • web/src/components/RequestSeasonsDialog.test.tsx
  • web/src/components/RequestSeasonsDialog.tsx
  • web/src/hooks/queries/admin/requests.ts
  • web/src/hooks/queries/useRequests.ts
  • web/src/lib/mediaRequests.test.ts
  • web/src/lib/mediaRequests.ts
  • web/src/pages/AdminRequests.v2.test.tsx
  • web/src/pages/ItemDetail/components/RequestActionBar.tsx
  • web/src/pages/TitleDetail.test.tsx
  • web/src/pages/admin-requests/ApproveOptionsDialog.tsx
  • web/src/pages/admin-requests/RequestQueue.tsx

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase enhancement New feature or request go Pull requests that update go code javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/XXXL 3000+ added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant