fix(editor): pass workspaceId to useCredentialName in block preview#3418
fix(editor): pass workspaceId to useCredentialName in block preview#3418waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Written by Cursor Bugbot for commit 1d7a9ae. Configure here. |
Greptile SummaryThis is a targeted, one-line bug fix that passes Key points:
Confidence Score: 5/5
Sequence DiagramsequenceDiagram
participant EditorPanel as Editor Panel
participant BlockPreview as Block Preview (SubBlockRow)
participant useCredentialName
participant ReactQuery as React Query Cache
participant API as /api/auth/oauth/credentials
EditorPanel->>useCredentialName: useCredentialName(credId, providerId, workflowId, workspaceId)
useCredentialName->>ReactQuery: queryKey: ['oauthCredentials', providerId, workspaceId, workflowId]
ReactQuery-->>API: fetch (cache miss)
API-->>ReactQuery: credentials[]
ReactQuery-->>useCredentialName: credentials[]
useCredentialName-->>EditorPanel: displayName
Note over BlockPreview: Before fix: missing workspaceId
BlockPreview->>useCredentialName: useCredentialName(credId, providerId, workflowId, undefined)
useCredentialName->>ReactQuery: queryKey: ['oauthCredentials', providerId, 'none', workflowId]
ReactQuery-->>API: fetch (different key → cache miss)
API-->>ReactQuery: credentials[]
ReactQuery-->>useCredentialName: credentials[]
useCredentialName-->>BlockPreview: displayName (blank on initial load)
Note over BlockPreview: After fix: workspaceId passed
BlockPreview->>useCredentialName: useCredentialName(credId, providerId, workflowId, workspaceId)
useCredentialName->>ReactQuery: queryKey: ['oauthCredentials', providerId, workspaceId, workflowId]
ReactQuery-->>BlockPreview: credentials[] (cache hit ✓)
useCredentialName-->>BlockPreview: displayName (correct)
Last reviewed commit: 1d7a9ae |
Summary
Type of Change
Testing
Tested manually
Checklist