improvement(knowledge): show selector with saved option in connector edit modal#4240
improvement(knowledge): show selector with saved option in connector edit modal#4240waleedlatif1 merged 5 commits intostagingfrom
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The edit connector modal now renders Reviewed by Cursor Bugbot for commit e6f17ca. Configure here. |
Greptile SummaryThis PR fixes the edit-connector modal rendering selector dropdowns (pre-populated with the saved value) instead of raw ID inputs for Confidence Score: 5/5Safe to merge — no logic or data-integrity issues found; all prior review concerns have been addressed. All remaining findings are P2 style suggestions. The canonical-pair logic, dependency clearing, seed-once initialSourceConfig, internal-key preservation, and resolveSourceConfig all behave correctly. Previous thread concerns (shared path, mount lifecycle, memoization) are resolved or deliberately accepted. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[EditConnectorModal / AddConnectorModal] -->|initialSourceConfig| B[useConnectorConfigFields]
B --> C{canonicalGroups}
C -->|mode: basic| D[ConnectorSelectorField\n selector Combobox]
C -->|mode: advanced| E[Input\n raw ID]
B --> F[dependentFieldIds\n sibling-expanded]
F -->|handleFieldChange| G[clear downstream fields]
B --> H[resolveSourceConfig\n canonical-keyed output]
H -->|save| I[updateConnector / createConnector\n ...sourceConfig + changedEntries]
Reviews (4): Last reviewed commit: "refactor(kb-connectors): tighten state p..." | Re-trigger Greptile |
…hanges; share selector field
c0866de to
958d106
Compare
|
@greptile |
|
@cursor review |
…torConfigFields hook
|
@greptile |
|
@cursor review |
…it save Avoids writing spurious empty-string keys for untouched optional fields when another field triggers a save.
|
@greptile |
|
@cursor review |
- edit modal: replace useMemo([]) + eslint-disable with useState lazy initializer for initialSourceConfig — same mount-once semantics without the escape hatch. - add modal: drop useCallback on handleConnectNewAccount (no observer saw the reference) and inline the one call site.
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 e6f17ca. Configure here.
Summary
canonicalParamId, matching the add-connector flow and the selector behavior in the workflow editorteamSelector,channelSelector) rendered as empty inputs because state was canonical-keyed but rendered byfield.idtagSlotMapping,disabledTagIds) via{...connector.sourceConfig, ...resolved}mergeType of Change
Testing
Tested manually against Teams (two canonical pairs with dependency chain), verified dropdown pre-selection, toggle behavior, dependency clearing, and save round-trip.
Checklist