Repository navigation
test(web): render MovieContent in a QueryClient in the library scope test - #3282
Conversation
…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 Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
| 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:
Estimated code review effort: 1 (Trivial) | ~4 minutes
Change: Other · Severity of issue fixed: Low
Possibly related PRs
- Silo-Server/silo-server#2721: This PR adds QueryClientProvider to the library-scope test introduced by
#2721. - Silo-Server/silo-server#3009: This PR completes the QueryClientProvider setup for MovieContent test renders.
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: 
5
-
Full details: Linked Issues check
-
Explanation
Directly linked issue
#3281requires 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
#3281requires. 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.
Problem
Closes #3281
Related issue: N/A
Validation tasks: none
The
ci / Web testjob 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", rendersMovieContentwithout aQueryClientProvider.MovieContentreachesuseQueryClientthroughusePrePlayAudioSelectionanduseSetAudioPreference, 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.tsxon main: 1 failed ("No QueryClient set"), 11 passed. With this change: 12 passed.prettier --checkandeslinton the test file: clean.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3282/
Risks
None identified.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Provide
QueryClientProvidertoMovieContentrenders in library scope testWraps both the scoped and unscoped
MovieContentrenders in MovieContent.test.tsx with aQueryClientProvider, each using a freshQueryClient, soMovieContenthas a query-client context during the library-scope test.Macroscope summarized 12296aa.