fix(editor): Load credentials when opening node credential picker (#30463)

This commit is contained in:
Thanasis G 2026-05-18 11:53:03 +03:00 committed by GitHub
parent 90b215939f
commit cec8238b64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -220,6 +220,15 @@ describe('NodeCredentials', () => {
expect(screen.queryByText('OpenAi account')).toBeInTheDocument();
});
it('should refresh credentials from the server when mounted on an existing node', () => {
ndvStore.activeNode = httpNode;
credentialsStore.state.credentials = {};
renderComponent();
expect(credentialsStore.fetchAllCredentials).toHaveBeenCalled();
});
it('should ignore managed credentials in the dropdown if active node is the HTTP node', async () => {
ndvStore.activeNode = httpNode;
credentialsStore.state.credentials = {

View File

@ -316,6 +316,10 @@ onMounted(() => {
ndvEventBus.on('credential.createNew', onCreateAndAssignNewCredential);
void credentialsStore.fetchAllCredentials({
projectId: projectsStore.currentProject?.id,
});
void aiGateway.fetchConfig();
// Clear stale AI Gateway managed credentials if the feature is disabled