Skip to content

Conversation

@sandra0503
Copy link
Contributor

Summary

Update connection handling to use providerKey instead of connectionId

Also

  • enhance UI components with data-test attributes for improved testing
  • removes unused copy

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

…ad of connectionId

- enhance UI components with data-test attributes for improved testing
- removes unused copy
@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Jan 29, 2026
@codecov
Copy link

codecov bot commented Jan 29, 2026

Bundle Report

Changes will decrease total bundle size by 657 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
editor-ui-esm 40.97MB -657 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: editor-ui-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 76 bytes 1.01MB 0.01%
assets/users.store-*.js -25 bytes 1.0MB -0.0%
assets/index-*.css -8 bytes 721.91kB -0.0%
assets/_MapCache-*.js -1.08kB 548.01kB -0.2%
assets/SettingsSecretsProviders.ee-*.js 381 bytes 19.58kB 1.98%
assets/useSecretsProviders.mock-*.js 2 bytes 8.96kB 0.02%

Files in assets/index-*.js:

  • ./src/features/integrations/secretsProviders.ee/composables/useSecretsProviderConnection.ee.ts → Total Size: 2.18kB

  • ./src/features/integrations/secretsProviders.ee/components/SecretsProviderConnectionModal.ee.vue → Total Size: 448 bytes

  • ./src/features/integrations/secretsProviders.ee/composables/useConnectionModal.ee.ts → Total Size: 8.07kB

Files in assets/SettingsSecretsProviders.ee-*.js:

  • ./src/features/integrations/secretsProviders.ee/views/SettingsSecretsProviders.ee.vue → Total Size: 413 bytes

  • ./src/features/integrations/secretsProviders.ee/components/SecretsProviderConnectionCard.ee.vue → Total Size: 442 bytes

  • ./src/features/integrations/secretsProviders.ee/composables/useSecretsProvidersList.ee.ts → Total Size: 2.08kB

Files in assets/useSecretsProviders.mock-*.js:

  • ./src/features/integrations/secretsProviders.ee/composables/useSecretsProviders.mock.ts → Total Size: 7.92kB


async function getConnection(connectionId: string): Promise<SecretProviderConnection> {
async function getConnection(providerKey: string): Promise<SecretProviderConnection> {
console.log('getConnection', providerKey);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should lint this :D

@codecov
Copy link

codecov bot commented Jan 29, 2026

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 13 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/frontend/editor-ui/src/features/integrations/secretsProviders.ee/composables/useSecretsProviderConnection.ee.ts">

<violation number="1" location="packages/frontend/editor-ui/src/features/integrations/secretsProviders.ee/composables/useSecretsProviderConnection.ee.ts:59">
P2: Remove the debug console.log to avoid leaking provider identifiers in production UI code.</violation>
</file>

<file name="packages/frontend/editor-ui/src/features/integrations/secretsProviders.ee/composables/useConnectionModal.ee.ts">

<violation number="1" location="packages/frontend/editor-ui/src/features/integrations/secretsProviders.ee/composables/useConnectionModal.ee.ts:35">
P2: `providerKey` is a Ref in the options, but the new code copies its current value into a fresh ref. This breaks reactivity with the caller and can leave the modal stuck on a stale provider key when the input ref changes. Use the provided ref directly (or a computed getter/setter) to keep it reactive.

(Based on your team's feedback about keeping composable parameters reactive.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


async function getConnection(connectionId: string): Promise<SecretProviderConnection> {
async function getConnection(providerKey: string): Promise<SecretProviderConnection> {
console.log('getConnection', providerKey);
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Remove the debug console.log to avoid leaking provider identifiers in production UI code.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/frontend/editor-ui/src/features/integrations/secretsProviders.ee/composables/useSecretsProviderConnection.ee.ts, line 59:

<comment>Remove the debug console.log to avoid leaking provider identifiers in production UI code.</comment>

<file context>
@@ -55,13 +55,14 @@ export function useSecretsProviderConnection(options?: { useMockApi?: boolean })
 
-	async function getConnection(connectionId: string): Promise<SecretProviderConnection> {
+	async function getConnection(providerKey: string): Promise<SecretProviderConnection> {
+		console.log('getConnection', providerKey);
 		// GET /rest/secret-providers/connections/:providerKey
 		isLoading.value = true;
</file context>
Fix with Cubic


// State
const connectionId = ref(options.connectionId);
const providerKey = ref<string | undefined>(options.providerKey?.value);
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: providerKey is a Ref in the options, but the new code copies its current value into a fresh ref. This breaks reactivity with the caller and can leave the modal stuck on a stale provider key when the input ref changes. Use the provided ref directly (or a computed getter/setter) to keep it reactive.

(Based on your team's feedback about keeping composable parameters reactive.)

View Feedback

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/frontend/editor-ui/src/features/integrations/secretsProviders.ee/composables/useConnectionModal.ee.ts, line 35:

<comment>`providerKey` is a Ref in the options, but the new code copies its current value into a fresh ref. This breaks reactivity with the caller and can leave the modal stuck on a stale provider key when the input ref changes. Use the provided ref directly (or a computed getter/setter) to keep it reactive.

(Based on your team's feedback about keeping composable parameters reactive.) </comment>

<file context>
@@ -32,11 +32,12 @@ export function useConnectionModal(options: UseConnectionModalOptions) {
 
 	// State
-	const connectionId = ref(options.connectionId);
+	const providerKey = ref<string | undefined>(options.providerKey?.value);
+	const connectionId = ref<string | undefined>(undefined);
 	const connectionName = ref('');
</file context>
Suggested change
const providerKey = ref<string | undefined>(options.providerKey?.value);
const providerKey = options.providerKey ?? ref<string | undefined>(undefined);
Fix with Cubic

Copy link
Contributor

@konstantintieber konstantintieber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I select "Hashicorp vault" as provider, no options are shown.
Is this a known issue/still to be implemented?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

n8n team Authored by the n8n team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants