feat: migrate manual artist save flow to dedicated update endpoint#1669
feat: migrate manual artist save flow to dedicated update endpoint#1669sweetmantech merged 4 commits intotestfrom
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 54 minutes and 34 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (12)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
No issues found across 9 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: This PR migrates core artist update logic to a new API endpoint and removes an existing route. Such refactors of API transport layers for core entities require human review.
Replace the chat-local /api/artist/pin endpoint with the unified PATCH
artist endpoint. useArtistPinToggle now calls saveArtist with a
{ pinned } payload using a Privy bearer token, matching the profile save
flow. Removes the dead chat route and toggleArtistPin supabase helper.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Requires human review: This PR migrates core business logic (artist updates) from local API routes to a new dedicated endpoint and introduces new authentication handling, which requires human review to ensure system-stable.
E2E verification on Vercel previewPreview: Network shape (vs. legacy chat-local routes)
Pin toggle clicked in DevTools — default base URL (
|
| Field | Value |
|---|---|
| Method | PATCH ✅ |
| URL | https://test-recoup-api.vercel.app/api/artists/ab1c64cd-... ✅ |
| Body | {"pinned":true} ✅ |
| Auth | Authorization: Bearer <privy-token> ✅ |
| Status | 405 — expected, api test branch doesn't have PATCH route until #431 lands |
Pin toggle clicked again with recoup_api_override → api PR #431 preview
| Field | Value |
|---|---|
| Method | PATCH ✅ |
| URL | https://recoup-api-git-codex-artist-update-e-43aac8.../api/artists/ab1c64cd-... ✅ |
| Body | {"pinned":true} ✅ |
| Status | 200 ✅ |
| Response body | {"artist":{...,"pinned":true}} ✅ |
| Hook follow-up | GET /api/artists? → 200 ✅ |
Confirms the migrated useArtistPinToggle hook calls the new PATCH surface with the correct shape and Privy bearer auth. The 405 on default base URL resolves automatically once api PR #431 merges to test.
| import type { Knowledge } from "@/types/knowledge"; | ||
|
|
||
| export type Knowledge = { | ||
| url: string; | ||
| name: string; | ||
| type: string; | ||
| }; | ||
| export type { Knowledge } from "@/types/knowledge"; |
There was a problem hiding this comment.
DRY - Why are you both importing and exporting the type from here?
Address review feedback — the module was both importing Knowledge from @/types/knowledge and re-exporting it from the same path. Drop the re-export and point the two consumers (KnowledgeBaseSection, UpdateArtistInfoSuccess) at the canonical @/types/knowledge source. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Fixed in |
End-to-end test results — ✅ pin toggle routes through new PATCH endpointTested on the preview deployment via Chrome DevTools MCP against the live Test artist
Observed requests
Both requests carried Verified behavior
Out of scope (not tested this round)
🤖 Generated with Claude Code |
|
Tip For best results, initiate chat on the files or code changes.
Two thoughts before merge: Profile update path (recommended before merge)
This is the primary remaining untested surface from the PR objectives. Concurrent pin toggles (not blocking this PR) If you can run the profile update smoke test and it passes, this looks ready to ship. 🚀 |
Promote test → main: artist update endpoints + chat pin cutover (#1669)
Summary
/api/artist/profileto dedicatedPATCH /api/artists/{id}.types/knowledge.tsand align consumers.Notes