feat(selectors): add dropdown selectors for 14 integrations#3433
feat(selectors): add dropdown selectors for 14 integrations#3433waleedlatif1 merged 32 commits intostagingfrom
Conversation
PR SummaryMedium Risk Overview Introduces new internal selector API routes (Airtable bases/tables, Asana workspaces, Attio lists/objects, Cal.com event types/schedules, Confluence spaces, BigQuery datasets/tables, Google Tasks lists, JSM service desks/request types, Microsoft Planner plans, Notion pages/databases, Pipedrive pipelines, SharePoint lists, Trello boards, Zoom meetings), all using Updates selector plumbing: expands Hardens validation/testing: adds Written by Cursor Bugbot for commit db9a9fa. 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) across 14 integrations, introducing 19 new POST API routes and 20 new registry entries. The overall architecture is consistent and well-executed. Security concerns raised in earlier review rounds have been addressed: credentials are now passed in POST request bodies via Key points:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as SubBlockRow (UI)
participant Setup as useSelectorSetup
participant Query as useSelectorQuery
participant Registry as SelectorRegistry
participant API as API Route
participant Ext as External API
UI->>Setup: dependsOn values
Setup->>Setup: Skip isReference / isEnvVarReference values
Setup->>Query: SelectorContext (credentialId, baseId, datasetId, etc.)
alt fetchList (dropdown open)
Query->>Registry: fetchList(context)
Registry->>Registry: ensureCredential(context)
Registry->>API: POST /api/tools/{service}/{resource}
API->>API: authorizeCredentialUse()
API->>API: refreshAccessTokenIfNeeded()
API->>Ext: GET upstream API
Ext-->>API: data
API-->>Registry: { items: [...] }
Registry-->>Query: SelectorOption[]
Query-->>UI: dropdown list
end
alt fetchById (display name for saved value)
Query->>Query: guard: skip if isReference or isEnvVarReference
Query->>Registry: fetchById(context, detailId)
Registry->>API: POST /api/tools/{service}/{resource}
API-->>Registry: { items: [...] }
Registry->>Registry: find item by id
Registry-->>Query: SelectorOption | null
Query-->>UI: displayName (or raw ID fallback)
end
note over UI,Ext: Cascading (Airtable base→table, BigQuery dataset→table,<br/>JSM serviceDesk→requestType): parent selector value<br/>flows into child context via canonicalIndex
|
…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).
|
@cursor review |
|
@greptile |
…nonical-aware resolution
Use resolveDependencyValue to resolve context values for
useSelectorDisplayName, eliminating manual || getStringValue('*Selector')
fallbacks that required updating for each new selector pair.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rscores SharePoint composite site IDs use hostname,guid,guid format where only alphanumerics, periods, hyphens, and commas are valid characters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@cursor review |
|
@greptile |
…ello closed board filter Pipedrive pipelines and Cal.com event-types/schedules routes now consistently return string IDs via String() conversion. Trello boards route no longer filters out closed boards, preserving them for fetchById lookups. The closed filter is applied only in the registry's fetchList so archived boards don't appear in dropdowns but can still be resolved by ID for display names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d03b467 to
6b301b7
Compare
|
@greptile |
Zoom API returns numeric meeting IDs. Convert with String() to match the string ID convention used by all other selector routes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Routes already convert numeric IDs to strings via String(), so update the registry types (CalcomEventType, CalcomSchedule, PipedrivePipeline, ZoomMeeting) from id: number to id: string and remove the now-redundant String() coercions in fetchList/fetchById. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
Summary
<Block.output>,{{ENV_VAR}}): skip fetchById and context population when values are design-time placeholders rather than real IDsType of Change
Testing
Checklist