-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Adding app sort and filter opts, discord async options #18105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding app sort and filter opts, discord async options #18105
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
Warning Rate limit exceeded@dannyroosevelt has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 55 seconds before requesting another review. ⌛ 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. 📒 Files selected for processing (1)
WalkthroughVersion bumped to 1.5.0. Documentation added for app sorting/filtering and a Discord channel array fix. Control.tsx now renders RemoteOptions for Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant SelectApp
participant useApps
participant API
User->>SelectApp: open dropdown / type search
SelectApp->>useApps: get apps ({ ...appsOptions?, q })
useApps->>API: fetch apps with sort/filter params
API-->>useApps: apps list
useApps-->>SelectApp: apps (sorted/filtered)
SelectApp-->>User: render selectable apps
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
packages/connect-react/CHANGELOG.md (1)
16-16: Minor wording polish for clarityTiny grammar tweak reads a bit smoother under “Added”.
-- Support for filtering apps by whether they have actions, triggers, or components +- Support filtering apps based on whether they have actions, triggers, or componentspackages/connect-react/src/components/SelectApp.tsx (1)
11-15: Consider makingappsOptionsreadonly for clearer intentMarking as
Readonlysignals it won’t be mutated and slightly improves IntelliSense.- appsOptions?: Omit<GetAppsOpts, 'q'>; + appsOptions?: Readonly<Omit<GetAppsOpts, 'q'>>;packages/connect-react/README.md (2)
190-201: Docs: includehasComponentsin SelectApp example for parity with CHANGELOGYou mention filtering by components in the changelog; add it here for completeness. Also add a quick note on default sorting for discoverability.
<SelectApp value={selectedApp} onChange={setSelectedApp} appsOptions={{ sortKey: "featured_weight", // Sort by: "name" | "featured_weight" | "name_slug" sortDirection: "desc", // "asc" | "desc" hasActions: true, // Only show apps with actions - hasTriggers: false, // Exclude apps with triggers + hasTriggers: false, // Exclude apps with triggers + hasComponents: true, // Only show apps with components }} /> +// Note: Default sortKey is "name_slug" and default sortDirection is "asc".
206-212: Docs: mirror triggers filter inuseAppsexample for consistencyKeeps both examples aligned on the same set of filters.
const { apps, isLoading } = useApps({ q: "slack", // Search query sortKey: "featured_weight", sortDirection: "desc", hasActions: true, + hasTriggers: false, });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
packages/connect-react/CHANGELOG.md(1 hunks)packages/connect-react/README.md(2 hunks)packages/connect-react/package.json(1 hunks)packages/connect-react/src/components/Control.tsx(1 hunks)packages/connect-react/src/components/SelectApp.tsx(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/connect-react/src/components/SelectApp.tsx (1)
packages/sdk/src/shared/index.ts (2)
AppResponse(127-127)GetAppsOpts(266-299)
🪛 LanguageTool
packages/connect-react/CHANGELOG.md
[grammar] ~15-~15: There might be a mistake here.
Context: ...sorted by name, featured_weight, or name_slug - Support for filtering apps by whether th...
(QB_NEW_EN)
⏰ 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 (5)
packages/connect-react/package.json (1)
3-3: Semver bump to 1.5.0 fits the additive changes — LGTMMinor version increase matches the new optional prop and features documented in README/CHANGELOG.
packages/connect-react/src/components/Control.tsx (1)
35-36: Good fix: handle$.discord.channel[]in the RemoteOptions pathThis ensures channel arrays hit the same RemoteOptions flow. Please confirm RemoteOptionsContainer properly handles multi-select for array types (value shape, create/remove semantics), since this bypasses the generic array handling below.
packages/connect-react/src/components/SelectApp.tsx (2)
6-6: Import ofGetAppsOptsalongsideAppResponse— LGTMMatches the new
appsOptionsprop usage.
18-19: SelectApp signature update — LGTM
appsOptionsis optional, so this remains backward-compatible.packages/connect-react/README.md (1)
485-486: Hooks section update — LGTMClear that
useAppsnow supports sorting and filtering.
There was a problem hiding this 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
♻️ Duplicate comments (1)
packages/connect-react/src/components/SelectApp.tsx (1)
49-51: Parenthesize the nullish coalescing inside spread; good call keeping q lastThis improves readability and avoids any parser/transpiler edge cases around spread + ?? precedence. Keeping q last prevents accidental overrides at runtime.
- ...appsOptions ?? {}, + ...(appsOptions ?? {}), q,
🧹 Nitpick comments (1)
packages/connect-react/src/components/SelectApp.tsx (1)
6-8: Use type-only import to avoid pulling @pipedream/sdk into the browser bundleThese are types only. Switching to a type-only import prevents an unnecessary runtime dependency and reduces bundle size.
-import { - AppResponse, GetAppsOpts, -} from "@pipedream/sdk"; +import type { + AppResponse, GetAppsOpts, +} from "@pipedream/sdk";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
packages/connect-react/src/components/SelectApp.tsx(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/connect-react/src/components/SelectApp.tsx (1)
packages/sdk/src/shared/index.ts (2)
AppResponse(127-127)GetAppsOpts(266-299)
⏰ 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). (1)
- GitHub Check: Lint Code Base
🔇 Additional comments (2)
packages/connect-react/src/components/SelectApp.tsx (2)
13-16: Prop typing for appsOptions looks goodUsing Omit<GetAppsOpts,"q"> cleanly communicates that the component owns the query. Nice.
20-21: Component signature change is appropriateAdding appsOptions while keeping value/onChange unchanged maintains backward compatibility and exposes sorting/filtering cleanly.
WHY
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores