feat(selectors): add dropdown selectors for 14 integrations#3433
feat(selectors): add dropdown selectors for 14 integrations#3433waleedlatif1 wants to merge 25 commits intostagingfrom
Conversation
PR SummaryMedium Risk Overview Implements new internal Expands selector infrastructure ( Written by Cursor Bugbot for commit ed6feb3. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
d700133 to
665e22c
Compare
|
@greptile |
|
@cursor review |
Greptile SummaryThis PR adds dropdown selectors (basic mode) with manual ID fallback (advanced mode) for 14 integrations across 45 files, introducing 19 new internal API routes, 20 new selector registry entries, and cascading selectors for Airtable, BigQuery, and JSM. The implementation is generally consistent and well-structured — all new routes use Key observations:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as Block UI (workflow-block)
participant Hook as useSelectorSetup / useSelector
participant Registry as selector registry
participant API as /api/tools/{integration}/...
participant Ext as External API
Note over UI,Ext: Basic mode: dropdown selector flow
UI->>Hook: context (credentialId, domain, baseId, etc.)
Hook->>Registry: fetchList({ context })
Registry->>API: POST { credential, workflowId, [contextParams] }
API->>API: authorizeCredentialUse()
API->>API: refreshAccessTokenIfNeeded()
API->>Ext: GET/POST with Bearer token
Ext-->>API: raw data
API-->>Registry: { items[] }
Registry-->>Hook: SelectorItem[] (id, label)
Hook-->>UI: dropdown options
Note over UI,Ext: Advanced mode: raw ID input (backward compat)
UI->>UI: user types raw ID into short-input
UI->>UI: canonicalParamId merges both modes
Note over UI,Ext: Cascading selector (e.g. Airtable base→table)
UI->>Hook: context with baseId from baseSelector
Hook->>Registry: fetchList({ context: { baseId } })
Registry->>API: POST { credential, workflowId, baseId }
API->>Ext: GET /meta/bases/{baseId}/tables
Ext-->>API: tables[]
API-->>Registry: { tables[] }
Registry-->>Hook: table SelectorItem[]
Hook-->>UI: table dropdown options
|
…utes Convert JSM selector-servicedesks, selector-requesttypes, and Confluence selector-spaces routes from GET (with access token in URL query params) to POST with authorizeCredentialUse + refreshAccessTokenIfNeeded pattern. Also adds missing ensureCredential guard to microsoft.planner.plans registry entry.
Use serviceDeskIdValidation.sanitized instead of raw serviceDeskId in JSM request types URL. Add encodeURIComponent to SharePoint siteId to prevent URL path injection.
SharePoint site IDs use the format "hostname,guid,guid" with commas that must remain unencoded for the Microsoft Graph API. The encodeURIComponent call would convert commas to %2C and break the API call.
|
@greptile |
|
@cursor review |
Use cloudIdValidation.sanitized instead of raw cloudId in URL construction for consistency with the validation pattern, even though the current validator returns the input unchanged.
|
@greptile |
|
@cursor review |
…ntial to sharepoint.lists, and siteId validation - Add baseId, datasetId, serviceDeskId to SelectorResolutionArgs, ExtendedSelectorContext, extractExtendedContext, useSelectorDisplayName, and resolveSelectorForSubBlock so cascading selectors resolve correctly through the resolution path. - Add ensureCredential guard to sharepoint.lists registry entry. - Add regex validation for SharePoint siteId format (hostname,GUID,GUID).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@cursor review |
…to POST+authorizeCredentialUse - Use planIdValidation.sanitized in MS Planner tasks fetch URL - Convert sharepoint/lists and sharepoint/sites from GET+getSession to POST+authorizeCredentialUse - Update registry entries to match POST pattern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@cursor review |
|
@greptile |
|
@greptile |
…mpatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@cursor review |
|
@greptile |
|
@cursor review |
.../sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx
Outdated
Show resolved
Hide resolved
…tor display name fallbacks - Add validateSharePointSiteId to input-validation.ts - Use validation util in SharePoint lists route instead of inline regex - Add || fallback to selector IDs in workflow-block.tsx so cascading display names resolve in basic mode (baseSelector, planSelector, etc.) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@cursor review |
|
@greptile |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
| @@ -84,7 +84,6 @@ export const ConfluenceBlock: BlockConfig<ConfluenceResponse> = { | |||
| 'write:content.property:confluence', | |||
There was a problem hiding this comment.
read:user:confluence scope silently removed from V1 block
The read:user:confluence OAuth scope has been removed from the V1 ConfluenceBlock credential definition. While the V2 block still requests this scope, users who authenticate through the V1 block will no longer have it in their granted scopes — meaning any Confluence API call that returns user objects (e.g., author/created-by fields on pages and blog posts, contributor lookups) may return incomplete data or a 403 for that sub-resource.
Existing V1 users are unaffected until they re-authorize, but new V1 authentications and token refreshes for expired credentials will be issued without this scope.
Please confirm this removal is intentional and that no V1 block operation path depends on user-profile data. If it is intentional, a migration note or deprecation comment would help future maintainers understand why the scope was dropped.
| @@ -114,7 +141,6 @@ export const ZoomBlock: BlockConfig<ZoomResponse> = { | |||
| title: 'Topic', | |||
There was a problem hiding this comment.
Topic field promoted from advanced to basic mode unexpectedly
The mode: 'advanced' property was removed from the Topic sub-block for zoom_update_meeting. This means Topic is now visible in basic mode, changing the UI for all existing Zoom blocks. Users who previously relied on the field being hidden (i.e., scoped to advanced mode only) will now see an unexpected Topic input in their workflows.
If this is intentional (e.g., making topic a first-class field for updates), consider whether it might confuse users with existing saved workflows that don't expect this field to appear in basic mode.
| const requestId = generateRequestId() | ||
| const body = await request.json() | ||
| const { credential, workflowId } = body | ||
|
|
There was a problem hiding this comment.
requestId declared inside try block, inconsistent with other routes
requestId is generated inside the try block (after the early apiKey check), while every other new route in this PR declares it as the first statement of the handler before try. If an exception is ever thrown and you want to add requestId to the catch-block error log, it will be out of scope.
Consider hoisting const requestId = generateRequestId() to the very top of the handler function (before the try), consistent with sharepoint/lists/route.ts, microsoft_planner/plans/route.ts, and all other new routes in this PR.
Summary
Type of Change
Testing
Checklist