fix(kb): fix Linear connector GraphQL type errors and tag slot reuse#3961
fix(kb): fix Linear connector GraphQL type errors and tag slot reuse#3961waleedlatif1 merged 5 commits intostagingfrom
Conversation
Clean up newTagSlotMapping into direct assignment, remove unnecessary comment, and revert ID! back to String! to match Linear SDK types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add fieldType check to the tag slot reuse logic so a connector with a matching displayName but different fieldType falls through to fresh slot allocation instead of silently reusing an incompatible slot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR SummaryMedium Risk Overview Makes the add-connector selector UI searchable by enabling Fixes Linear connector GraphQL variable typings by switching issue/team/project IDs from Reviewed by Cursor Bugbot for commit 3f13cb3. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR fixes two bugs in the Linear knowledge base connector and adds a UX improvement to the connector setup UI.
Confidence Score: 5/5PR is safe to merge; all three changes are targeted bug fixes and a small UX improvement with no regressions All changes are precise and well-scoped: the GraphQL type corrections match the Linear API schema, the tag slot reuse logic correctly avoids duplicate DB inserts by scoping createTagDefinition calls to only newTagSlots, and the searchable combobox is a non-breaking UI addition. No P0 or P1 issues found. No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[POST /connectors] --> B{connector has\ntagDefinitions?}
B -- No --> C[Skip tag slot logic]
B -- Yes --> D[Query existing tag\ndefinitions from DB]
D --> E[Build existingByName Map\nkeyed by displayName]
E --> F[For each enabledDef]
F --> G{Match by displayName\n+ fieldType?}
G -- Yes --> H[Reuse existing slot\ntagSlotMapping id = existingSlot]
G -- No --> I[Add to defsNeedingSlots]
H --> J[Continue to next def]
I --> K[allocateTagSlots\ndefsNeedingSlots, usedSlots]
K --> L[newTagSlots = mapping]
L --> M[Merge newTagSlots\ninto tagSlotMapping]
M --> N{skippedTags present AND\ntagSlotMapping empty?}
N -- Yes --> O[Return 422 error]
N -- No --> P[DB transaction]
P --> Q[For each entry in newTagSlots:\ncreateTagDefinition]
Q --> R[Insert knowledgeConnector row]
R --> S[Return 201 Created]
J --> F
Reviews (1): Last reviewed commit: "fix(kb): enable search on connector sele..." | Re-trigger Greptile |
Re-land of #3919 — cherry-picked onto clean staging after accidental branch deletion.