fix(socials): key artist-social lists on social_id (not the dropped id)#1834
Conversation
Companion to recoupable/api#735, which drops the dead account_socials.id from the /api/artists/{id}/socials response (kept social_id). Add social_id to the Social type and switch the two React keys (GetArtistSocialsResult, ArtistSocial) from social.id → social.social_id, and fix the docs field name. Merge alongside api#735. Part of #1833. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✨ 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 |
There was a problem hiding this comment.
1 issue found across 4 files
Confidence score: 4/5
- In
app/docs/account/constants.ts, the docs rename the field tosocials[].social_idbutexampleResponseand the TypeScript interface example still showid, which can mislead integrators into implementing the wrong contract; align both examples tosocial_idbefore merging to avoid downstream API confusion.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/docs/account/constants.ts">
<violation number="1" location="app/docs/account/constants.ts:94">
P2: Doc field renamed to `socials[].social_id` but `exampleResponse` and TypeScript interface example still use `id` — mismatch will confuse developers.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| }, | ||
| { | ||
| name: "socials[].id", | ||
| name: "socials[].social_id", |
There was a problem hiding this comment.
P2: Doc field renamed to socials[].social_id but exampleResponse and TypeScript interface example still use id — mismatch will confuse developers.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/docs/account/constants.ts, line 94:
<comment>Doc field renamed to `socials[].social_id` but `exampleResponse` and TypeScript interface example still use `id` — mismatch will confuse developers.</comment>
<file context>
@@ -91,7 +91,7 @@ export const responseProperties = [
},
{
- name: "socials[].id",
+ name: "socials[].social_id",
type: "string",
description: "Unique identifier for the social account",
</file context>
There was a problem hiding this comment.
Add a note to the issue noting to delete the /docs directory. We use the official docs codebase, not this subroute, for documentation.
Part of #1833 — companion to recoupable/api#735 (which drops the dead
account_socials.idfrom/api/artists/{id}/socials, keepingsocial_id). Base:main.Change
types/Social.ts: addsocial_id(shared type —idkept for other consumers).GetArtistSocialsResult.tsx+ArtistSocial.tsx: Reactkey={social.id}→key={social.social_id}.socials[].id→socials[].social_id.Merge alongside/after api#735 (the api response then carries
social_id, notid).tscclean — noSocialtype errors.🤖 Generated with Claude Code
Summary by cubic
Use social_id for React keys in artist social lists and add social_id to the Social type to match the API. Prevents key warnings/mismatches when
account_socials.idis removed; pairs with recoupable/api#735.Written for commit a28647f. Summary will update on new commits.