Skip to content

fix(socials): key artist-social lists on social_id (not the dropped id)#1834

Merged
sweetmantech merged 1 commit into
mainfrom
fix/socials-react-keys
Jul 1, 2026
Merged

fix(socials): key artist-social lists on social_id (not the dropped id)#1834
sweetmantech merged 1 commit into
mainfrom
fix/socials-react-keys

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Part of #1833 — companion to recoupable/api#735 (which drops the dead account_socials.id from /api/artists/{id}/socials, keeping social_id). Base: main.

Change

  • types/Social.ts: add social_id (shared type — id kept for other consumers).
  • GetArtistSocialsResult.tsx + ArtistSocial.tsx: React key={social.id}key={social.social_id}.
  • docs field name socials[].idsocials[].social_id.

Merge alongside/after api#735 (the api response then carries social_id, not id). tsc clean — no Social type 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.id is removed; pairs with recoupable/api#735.

  • Bug Fixes
    • Use key={social.social_id} in GetArtistSocialsResult and ArtistSocial.
    • Add social_id to Social type (keep id for other consumers).
    • Update docs field name to socials[].social_id.

Written for commit a28647f. Summary will update on new commits.

Review in cubic

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>
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview Jul 1, 2026 4:12pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@sweetmantech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0f83b1c4-90a2-4438-b6df-b78e0c539123

📥 Commits

Reviewing files that changed from the base of the PR and between 0df5044 and a28647f.

⛔ Files ignored due to path filters (1)
  • types/Social.ts is excluded by none and included by none
📒 Files selected for processing (3)
  • app/docs/account/constants.ts
  • components/VercelChat/tools/ArtistSocial.tsx
  • components/VercelChat/tools/GetArtistSocialsResult.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/socials-react-keys

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.

❤️ Share

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Confidence score: 4/5

  • In app/docs/account/constants.ts, the docs rename the field to socials[].social_id but exampleResponse and the TypeScript interface example still show id, which can mislead integrators into implementing the wrong contract; align both examples to social_id before 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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note to the issue noting to delete the /docs directory. We use the official docs codebase, not this subroute, for documentation.

@sweetmantech sweetmantech merged commit 56b6223 into main Jul 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant