fix(integrations): resolve OAuth connect UI by service id instead of display name#5001
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Catalog & resolution: The docs generator now pulls Workspace UI: Integration detail pages match connected credentials by Tests: Reviewed by Cursor Bugbot for commit fa21369. Configure here. |
Greptile SummaryThis PR fixes OAuth connect UI regression for Jira Service Management, Google Slides, and Monday by replacing fragile display-name matching with a deterministic service-id lookup. The
Confidence Score: 5/5Safe to merge — the change is a targeted ID-based lookup replacing a broken name-based one, all previously-working integrations map to the same services as before, and the catalog-wide invariant test makes future regressions loud. Every OAuth integration now resolves through an explicit No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Integration entry\n(e.g. 'Jira Service Management')"] -->|"authType === 'oauth'"| B["Read oauthServiceId\n(e.g. 'jira')"]
B --> C["getServiceConfigByServiceId('jira')"]
C --> D["OAUTH_PROVIDERS\nprovider.services['jira']"]
D -->|"found"| E["OAuthServiceMatch\nproviderId: 'jira'\nserviceName: 'Jira'"]
D -->|"not found"| F["return null\n(falls back to API-key path)"]
E --> G["ConnectOAuthModal\n(correct OAuth flow)"]
H["OLD: name matching"] -->|"'Jira Service Management'\n!== 'Jira'"| F
style H fill:#f99,stroke:#c00
style G fill:#9f9,stroke:#090
style F fill:#fcc,stroke:#c00
Reviews (2): Last reviewed commit: "fix(docs-gen): blank string literals and..." | Re-trigger Greptile |
…grations; fix credential branding reverse lookup
…ng in extractOAuthServiceId
|
@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 fa21369. Configure here.
Summary
resolveOAuthServiceForIntegrationmatched the integration's display name against OAuth service names, which breaks whenever they differ ("Jira Service Management" vs "Jira", "Google Slides" vs "Google Drive", "Monday" vs "Monday.com")serviceIdthe block declares on itsoauth-inputsubBlock intointegrations.json(oauthServiceId), and fails loudly if an OAuth block is missing oneresolveOAuthServiceForIntegrationresolves through the newgetServiceConfigByServiceIdlookup instead of name matching; all previously-working integrations resolve to the same service as beforeType of Change
Testing
oauth-service.test.tswith a catalog-wide invariant that every OAuth integration resolves to a registered OAuth service, plus regression cases for the three previously-broken integrationsgetServiceConfigByServiceIdcases tolib/oauth/utils.test.tsChecklist