Skip to content

Conversation

@dannyroosevelt
Copy link
Collaborator

@dannyroosevelt dannyroosevelt commented Aug 1, 2025

WHY

Summary by CodeRabbit

  • New Features

    • Added support for specifying custom OAuth client IDs for different integrations via a new configuration option.
    • Users can now provide an oauthAppConfig property to customize OAuth app IDs for specific apps.
  • Documentation

    • Updated the documentation with a new section explaining how to configure custom OAuth app IDs, including usage examples and reference links.
  • Chores

    • Updated the package version to 1.4.0 in the changelog and package metadata.

@vercel
Copy link

vercel bot commented Aug 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Aug 1, 2025 7:28pm
pipedream-docs ⬜️ Ignored (Inspect) Aug 1, 2025 7:28pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Aug 1, 2025 7:28pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces support for custom OAuth client configuration in the connect-react package. It adds an optional oauthAppConfig property to relevant types and components, updates documentation to explain its usage, and modifies the logic in the ControlApp component to utilize this configuration for OAuth app selection. The package version is incremented to 1.4.0.

Changes

Cohort / File(s) Change Summary
Documentation Updates
packages/connect-react/README.md, packages/connect-react/CHANGELOG.md
Added documentation for the new oauthAppConfig prop and a changelog entry for version 1.4.0 describing custom OAuth client support.
Type and Prop Additions
packages/connect-react/src/components/ComponentForm.tsx, packages/connect-react/src/hooks/form-context.tsx
Extended ComponentFormProps and FormContext types to include optional oauthAppConfig?: Record<string, string>. Updated FormContextProvider to pass this config.
OAuth App Logic Integration
packages/connect-react/src/components/ControlApp.tsx
Modified to extract oauthAppConfig from context and use it to dynamically determine the oauthAppId for account fetching and connection.
Package Version Bump
packages/connect-react/package.json
Updated the package version from 1.3.3 to 1.4.0.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ComponentFormContainer
    participant FormContextProvider
    participant ControlApp
    participant useAccounts
    participant connectAccount

    User->>ComponentFormContainer: Passes oauthAppConfig prop
    ComponentFormContainer->>FormContextProvider: Receives oauthAppConfig in formProps
    FormContextProvider->>ControlApp: Provides oauthAppConfig via context
    ControlApp->>useAccounts: Calls with oauthAppId from oauthAppConfig[app.name_slug]
    ControlApp->>connectAccount: Calls with oauthAppId from oauthAppConfig[app.name_slug]
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A bunny hopped through OAuth fields anew,
With configs in its paws, and docs to review.
Now each app can bring its own client ID,
No longer one-size-fits-all, oh my!
Version bumped, the code is spry—
Custom OAuth, give it a try!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 944cba7 and 3623945.

📒 Files selected for processing (2)
  • packages/connect-react/README.md (2 hunks)
  • packages/connect-react/src/components/ComponentForm.tsx (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch danny/connect-react/custom-oauth

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/connect-react/README.md (2)

156-160: Clarify where the “slug” value comes from

The term “app name slug” may not be obvious to all users. Consider adding a short parenthetical note or link indicating where to find the slug for a Pipedream app (e.g. “the slug returned by the /apps API or shown in the app URL”).


162-183: Minor DX improvements for the example snippet

  1. The comment above declares oauthAppConfig as a Record<string, string>, which is fine, but readers may wonder whether these IDs are safe to embed client-side. A brief sentence such as “OAuth app IDs are public identifiers (they are not secrets)” would pre-empt that question.
  2. Mixing github-create-issue (componentKey) with slack-send-message in the earlier example may confuse newcomers. Using the same component across examples or adding a note that the change is intentional would avoid second-guessing.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa09fba and 857031a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • packages/connect-react/CHANGELOG.md (1 hunks)
  • packages/connect-react/README.md (1 hunks)
  • packages/connect-react/package.json (1 hunks)
  • packages/connect-react/src/components/ComponentForm.tsx (1 hunks)
  • packages/connect-react/src/components/ControlApp.tsx (2 hunks)
  • packages/connect-react/src/hooks/form-context.tsx (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/connect-react/src/components/ControlApp.tsx (1)
packages/connect-react/src/hooks/form-context.tsx (1)
  • useFormContext (60-69)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (10)
packages/connect-react/CHANGELOG.md (1)

5-10: LGTM! Well-documented changelog entry.

The changelog entry properly documents the new custom OAuth clients feature with appropriate semantic versioning (minor bump) and clear description.

packages/connect-react/package.json (1)

3-3: LGTM! Appropriate version bump.

The minor version increment correctly reflects the addition of the new custom OAuth clients feature without breaking changes.

packages/connect-react/src/components/ComponentForm.tsx (1)

32-37: LGTM! Well-designed type definition.

The optional oauthAppConfig property is properly typed and includes excellent documentation with a practical example. The Record<string, string> type clearly represents the app slug to OAuth app ID mapping.

packages/connect-react/src/hooks/form-context.tsx (3)

47-47: LGTM! Proper type integration.

The optional oauthAppConfig property is correctly added to the FormContext type definition.


85-85: LGTM! Consistent prop extraction.

The oauthAppConfig is properly extracted from formProps following the established pattern for other properties.


598-598: LGTM! Complete context integration.

The oauthAppConfig is properly included in the context value, completing the integration from props to context consumers.

packages/connect-react/src/components/ControlApp.tsx (4)

32-32: LGTM! Proper context consumption.

The oauthAppConfig is correctly extracted from the form context alongside externalUserId.


70-70: LGTM! Dynamic OAuth app ID derivation.

The oauthAppId is properly derived from the configuration using the app's slug (app.name_slug), replacing the previous hardcoded undefined value. This enables custom OAuth app selection per integration.


80-80: LGTM! Correct hook integration.

The oauthAppId is properly passed to the useAccounts hook, enabling custom OAuth app support for account fetching.


93-93: LGTM! Complete OAuth integration.

The oauthAppId is correctly passed to the connectAccount method, completing the custom OAuth app integration for the connection flow.

jsendo
jsendo previously approved these changes Aug 1, 2025
@dannyroosevelt dannyroosevelt merged commit e53351b into master Aug 1, 2025
7 of 8 checks passed
@dannyroosevelt dannyroosevelt deleted the danny/connect-react/custom-oauth branch August 1, 2025 19:28
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.

3 participants