refactor(api): genres → src/api modules (Effort 1)#60
Conversation
Mechanical move of the genres feature from src/hooks/queries/genres to src/api/genres, adding queryOptions factories for the query hooks. No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K513rsQz6Lg1HbbfYiafrE
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Summary by Qodorefactor(api): move genres queries/mutations to src/api/genres Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
109 rules 1.
|
|
Triage of Qodo's two findings — both pre-existing/codebase-consistent, no behavior impact; keeping #60 a mechanical move: 1. 2. Test mocks internal No code changes here. Generated by Claude Code |
| }); | ||
| } | ||
|
|
||
| export function useGenresQuery() { |
There was a problem hiding this comment.
Collapsed it in 0a8a77f — removed the useGenres() adapter and pointed its two consumers (GenreBadge, FilterSortControls) at useGenresQuery() directly.
useGenresQuery stays: AddArtistDialog and GenresCell consume it directly, and genresQuery() remains as the loader-ready options factory. Typecheck + the 9 GenreBadge tests pass.
Generated by Claude Code
Remove the useGenres() adapter and point its two consumers (GenreBadge, FilterSortControls) at useGenresQuery() directly. Update GenreBadge.test to mock useGenresQuery. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K513rsQz6Lg1HbbfYiafrE
Mechanical move of the
genresfeature fromsrc/hooks/queries/genrestosrc/api/genres, addingqueryOptionsfactories for the query hooks. No behavior change. Part of #52.Manual verification
pnpm run lint && pnpm test && pnpm run buildall pass.Generated by Claude Code