Skip to content

test(web): render MovieContent in a QueryClient in the library scope test - #3282

Merged
Quick104 merged 1 commit into
mainfrom
fix/moviecontent-test-query-client
Oct 30, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/moviecontent-test-query-client

Conversation

@Quick104

@Quick104 Quick104 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #3281
Related issue: N/A
Validation tasks: none

The ci / Web test job fails on main, and so on every pull request, since #2721. Its new MovieContent test, "hands the page's library scope to the match and split dialogs", renders MovieContent without a QueryClientProvider. MovieContent reaches useQueryClient through usePrePlayAudioSelection and useSetAudioPreference, which throws "No QueryClient set, use QueryClientProvider to set one".

Approach

Wrap both renders in that test in <QueryClientProvider client={new QueryClient()}>, the same wrapper the rest of the file uses. Test-only; no production code changes.

Validation

  • vitest run src/pages/ItemDetail/MovieContent.test.tsx on main: 1 failed ("No QueryClient set"), 11 passed. With this change: 12 passed.
  • prettier --check and eslint on the test file: clean.

Evidence

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

Risks

None identified.

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.

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, verified by running the test before and after the change
  • Adversarial review: none (test-only change)

🤖 Generated with Claude Code

Note

Provide QueryClientProvider to MovieContent renders in library scope test

Wraps both the scoped and unscoped MovieContent renders in MovieContent.test.tsx with a QueryClientProvider, each using a fresh QueryClient, so MovieContent has a query-client context during the library-scope test.

Macroscope summarized 12296aa.

…test

The library scope test rendered MovieContent without a QueryClientProvider,
so useQueryClient threw and the web test job failed on main. Wrap both
renders in a QueryClientProvider like the rest of the file does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Oct 30, 2026
@silo-kody

silo-kody Bot commented Oct 30, 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 ❌
⚠️ 2 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T16:03:02.085994Z 12296aa PR opened
🔒 Security Review ✅ Completed 2026-10-30T16:04:04.223202Z 12296aa PR opened
ℹ️ 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.

@silo-triage silo-triage Bot added bug Something isn't working javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish labels Oct 30, 2026
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

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: fb836f25-83ee-40fa-ae5a-95836c060477
Commits

Reviewing files that changed from the base of the PR and between 3cd9e48 and 12296aa.

Files selected for processing: 1
  • web/src/pages/ItemDetail/MovieContent.test.tsx

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

Walkthrough

The library-scope test now wraps both MovieContent renders in QueryClientProvider. The scoped and unscoped library ID assertions remain unchanged.

Changes: MovieContent test setup

Layer / File(s) Summary
Provide query context to library-scope renders
web/src/pages/ItemDetail/MovieContent.test.tsx
Both renders now use QueryClientProvider. The test retains its assertions for scoped dialog library IDs and the unscoped match-dialog fallback.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other · Severity of issue fixed: Low

Possibly related PRs

Suggested reviewers: rhainland

Merge Risk: Minimal · up to 12296

This test-only change supplies the missing query context without affecting production behavior.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main test change: wrapping MovieContent renders in a QueryClientProvider within the library scope test.
Description check Passed The description directly explains the CI failure, the missing QueryClientProvider, the test-only fix, and the reported validation results. It is fully related to the changeset.
Linked Issues check Passed Directly linked issue #3281 requires that the test "hands the page's library scope to the match and split dialogs" in web/src/pages/ItemDetail/MovieContent.test.tsx render MovieContent inside a QueryC…
Out of Scope Changes check Passed The whole-PR diff changes one file, web/src/pages/ItemDetail/MovieContent.test.tsx, and only within the library-scope test (+10/-6 lines in that hunk). No production code, other tests, or configuratio…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

Directly linked issue #3281 requires that the test "hands the page's library scope to the match and split dialogs" in web/src/pages/ItemDetail/MovieContent.test.tsx render MovieContent inside a QueryClientProvider and pass. The whole-PR diff (merge base 3cd9e48 to head 12296aa) wraps both renderToStaticMarkup calls in that test in <QueryClientProvider client={new QueryClient()}>, with MemoryRouter and MovieContent unchanged inside each wrapper. QueryClient and QueryClientProvider are already imported at the top of the file. The other renders in the file use the same wrapper, so the change matches the issue's expected behavior. The PR's reported test runs (1 failed before, 12 passed after) were not re-executed during this review. This assessment relies on the source change and the file content at head.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff changes one file, web/src/pages/ItemDetail/MovieContent.test.tsx, and only within the library-scope test (+10/-6 lines in that hunk). No production code, other tests, or configuration changed. Every change is the QueryClientProvider wrapper that #3281 requires. No unrelated change was found.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@Quick104
Quick104 merged commit 5720a64 into main Oct 30, 2026
26 checks passed
@Quick104
Quick104 deleted the fix/moviecontent-test-query-client branch October 30, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] MovieContent web test fails on main without a QueryClient

1 participant