feat(connectors): use resource selectors for KB connector config#5116
Conversation
Replace raw ID text inputs with selector pickers (canonical selector + manual-input pairs) across Google Drive/Docs/Forms/Sheets, Notion, Monday, and Webflow KB connectors, so users pick folders/spreadsheets/pages/boards/ collections instead of pasting IDs — matching the workflow blocks. - Add multi-select where the sync handler supports it (Drive/Docs/Forms folders, Monday boards, Webflow collections) via parseMultiValue - Add shared escapeDriveQueryValue/buildDriveParentsClause helpers for safe multi-folder Drive queries - Add ConnectorConfigField.mimeType, plumbed into the selector context - Fix Webflow listingCapped not set on maxItems truncation (deletion- reconciliation data-loss safety) Fully backward compatible: legacy single-string IDs and CSV both normalize via parseMultiValue; resolved canonical keys are unchanged.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Google Drive, Docs, and Forms gain multi-folder folder pickers and comma-separated advanced IDs; listing/validation use
Webflow now treats Reviewed by Cursor Bugbot for commit 345bc5a. Configure here. |
Greptile SummaryThis PR replaces raw ID text inputs with resource selector pickers across KB connectors (Google Drive/Docs/Forms, Google Sheets, Notion, Monday, Webflow), adding multi-select support where the sync handler supports it. It also introduces shared
Confidence Score: 5/5Safe to merge — the changes are additive UI wiring with no breaking changes to stored config keys or connector handler contracts. All connector handlers normalize inputs through No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens KB connector config] --> B{Mode toggle}
B -->|basic| C[Selector picker]
B -->|advanced| D[Manual text input]
C --> E[Value stored via canonicalParamId]
D --> E
E --> F[parseMultiValue normalizes to string array]
F --> G{Provider}
G -->|Drive/Docs/Forms| H[buildDriveParentsClause OR-joined parents clauses with escaping]
G -->|Webflow| I[fetchCollectionIds returns selected or all site collections]
G -->|Notion| J[rootPageId single value]
G -->|Monday| K[boardIds array]
H --> L[Drive q query: trashed=false AND mimeType AND clause]
I --> M[CursorState with collectionIndex]
M --> N{maxItems reached?}
N -->|yes plus items dropped or hasMore| O[listingCapped = true skip deletion reconciliation]
N -->|exact boundary nothing dropped| P[Normal reconciliation safe to delete stale docs]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[User opens KB connector config] --> B{Mode toggle}
B -->|basic| C[Selector picker]
B -->|advanced| D[Manual text input]
C --> E[Value stored via canonicalParamId]
D --> E
E --> F[parseMultiValue normalizes to string array]
F --> G{Provider}
G -->|Drive/Docs/Forms| H[buildDriveParentsClause OR-joined parents clauses with escaping]
G -->|Webflow| I[fetchCollectionIds returns selected or all site collections]
G -->|Notion| J[rootPageId single value]
G -->|Monday| K[boardIds array]
H --> L[Drive q query: trashed=false AND mimeType AND clause]
I --> M[CursorState with collectionIndex]
M --> N{maxItems reached?}
N -->|yes plus items dropped or hasMore| O[listingCapped = true skip deletion reconciliation]
N -->|exact boundary nothing dropped| P[Normal reconciliation safe to delete stale docs]
Reviews (2): Last reviewed commit: "fix(webflow): set listingCapped on withi..." | Re-trigger Greptile |
When a collection's items fit in a single API page but maxItems cuts the list within that page, neither hasMoreInCollection nor hasMoreCollections is true, so listingCapped was not set and the sync engine could hard-delete still-existing documents. Add the within-page drop signal to the guard.
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 345bc5a. Configure here.
Summary
google.drive, folder mime)google.drive, spreadsheet mime)notion.pages)monday.boards)webflow.collections)selector(basic) + the original manual-input field (advanced, reachable via the ↔ toggle), sharingcanonicalParamIdso the resolved config key is unchanged.parseMultiValue.escapeDriveQueryValue/buildDriveParentsClausehelpers for safe multi-folder Driveqqueries (single-quote/backslash escaped, OR-joined).ConnectorConfigField.mimeType, plumbed into the selector context so the Drive picker can be scoped to folders vs spreadsheets.listingCappednot being set onmaxItemstruncation — prevents the sync engine from hard-deleting still-existing documents.Backward compatibility
parseMultiValue(string | string[]); a single stored ID produces the identical single-value query as before, empty stays "all".folderId,spreadsheetId,rootPageId,boardIds,collectionId) are unchanged, so existing connectors and sync handlers are unaffected; opening + saving an unchanged connector is a no-op.Type of Change
Testing
/validate-connectoragainst all 7 connectors, cross-checked each against live API docs (Drive/Docs/Sheets/Forms, Notion, monday.com GraphQL, Webflow Data API v2) — all pass.bunx tscclean,bun run lintclean,bun run check:api-validationpasses.Checklist