improvement(credentials): consolidate OAuth modals and auto-fill credential name#3887
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Improves connect flow by auto-prefilling the credential display name using Removes the workflow OAuth modal lazy-loading and renders Written by Cursor Bugbot for commit 71915c5. Configure here. |
68be285 to
c35b396
Compare
Greptile SummaryThis PR consolidates Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User triggers credential action] --> B{Which mode?}
B -->|New connection| C[OAuthModal mode='connect']
B -->|Re-authorize| D[OAuthModal mode='reauthorize']
C --> E[Show display name input\nauto-filled via getDefaultCredentialName]
E --> F[User submits]
F --> G[createDraft.mutateAsync]
G --> H[writeOAuthReturnContext]
D --> I[Show scopes + New badges\nfor missing scopes]
I --> J[User clicks Connect]
J --> K{onConnectOverride?}
K -->|yes| L[Call override → onClose]
K -->|no| M[Proceed to OAuth flow]
H --> M
M --> N{Provider?}
N -->|trello| O[Redirect /api/auth/trello/authorize]
N -->|shopify| P[Redirect /api/auth/shopify/authorize]
N -->|other| Q[client.oauth2.link]
Q --> R[handleClose]
Reviews (2): Last reviewed commit: "fix(credentials): context-aware subtitle..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
…ential name (#3887) * improvement(credentials): consolidate OAuth modals and auto-fill credential name * fix(credentials): context-aware subtitle for KB vs workflow
Summary
ConnectCredentialModalandOAuthRequiredModalinto a singleOAuthModalwithmode: 'connect' | 'reauthorize'discriminated union propsOAuthModalto workspace-level components since it's shared across workflow editor and knowledge baseType of Change
Testing
getDefaultCredentialName(9 cases)Checklist