Skip to content

fix(editor): Allow users to logout of dynamic creds in chathub - #29117

Merged
phyllis-noester merged 1 commit into
masterfrom
noref-fix-chathub-dynamic-creds-logout
Apr 27, 2026
Merged

phyllis-noester merged 1 commit into
masterfrom
noref-fix-chathub-dynamic-creds-logout

Conversation

@phyllis-noester

@phyllis-noester phyllis-noester commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a Manage connections icon button to the chat hub conversation header so users can open the dynamic credentials drawer directly from the chat view and log out of any dynamic credentials they've connected.

  • New N8nIconButton (key-round icon) appears in ChatConversationHeader only when there are dynamic credentials available (hasDynamicCredentials).
  • ChatView passes hasDynamicCredentials down and listens for toggleDynamicCredentials to toggle isDynamicCredentialsDrawerOpen.
  • i18n key chatHub.chat.header.button.manageConnections added.

How to test

  1. Open the chat hub and start a conversation that uses a provider requiring a dynamic credential (e.g. connect via OAuth).
  2. Confirm the key-round Manage connections button appears in the conversation header.
  3. Click it and verify the dynamic credentials drawer opens, and that logging out from the drawer clears the credential.
  4. Verify the button is hidden when no dynamic credentials are connected.

Related Linear tickets, Github issues, and Community forum posts

No Linear ticket — branch is noref-*.

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

🤖 PR Summary generated by AI

@phyllis-noester
phyllis-noester marked this pull request as ready for review April 24, 2026 18:05
@phyllis-noester
phyllis-noester requested review from a team, BGZStephen, afitzek, cstuncsik and guillaumejacquart and removed request for a team April 24, 2026 18:05
@codecov

codecov Bot commented Apr 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...s/ai/chatHub/components/ChatConversationHeader.vue 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Architecture diagram
sequenceDiagram
    participant User
    participant Header as ChatConversationHeader
    participant View as ChatView
    participant CredsLogic as Dynamic Credentials Store
    participant Drawer as DynamicCredentials Drawer
    participant Backend as n8n Server / OAuth Provider

    Note over Header,Backend: Initialization
    CredsLogic->>View: reactive hasDynamicCredentials: true
    View->>Header: Prop: has-dynamic-credentials (true)
    Header->>Header: Render "Manage connections" button

    Note over User,Backend: Triggering Credential Management
    User->>Header: Click "Manage connections"
    Header->>View: NEW: emit toggle-dynamic-credentials
    View->>View: CHANGED: Set isDynamicCredentialsDrawerOpen = true
    View->>Drawer: Render/Open Drawer

    Note over User,Backend: Logout Flow
    User->>Drawer: Click "Logout" from credential
    Drawer->>Backend: DELETE /credentials/dynamic/{id}
    Backend-->>Drawer: 200 OK (Session cleared)
    Drawer->>CredsLogic: Refresh credential status
    CredsLogic-->>View: reactive hasDynamicCredentials: false
    View->>Header: Prop: has-dynamic-credentials (false)
    Header->>Header: Hide "Manage connections" button
Loading

@github-actions

Copy link
Copy Markdown
Contributor

Performance Comparison

Comparing current → latest master → 14-day baseline

docker-stats

Metric Current Latest Master Baseline (avg) vs Master vs Baseline Status
docker-image-size-n8n 1269.76 MB 1269.76 MB 1274.88 MB (σ 11.22) +0.0% -0.4% ✅
docker-image-size-runners 387.00 MB 387.00 MB 392.38 MB (σ 11.04) +0.0% -1.4% ✅

Memory consumption baseline with starter plan resources

Metric Current Latest Master Baseline (avg) vs Master vs Baseline Status
memory-heap-used-baseline 115.63 MB 115.63 MB 114.56 MB (σ 0.41) +0.0% +0.9% 🔴
memory-rss-baseline 226.63 MB 226.63 MB 284.55 MB (σ 44.79) +0.0% -20.4% ⚠️

Idle baseline with Instance AI module loaded

Metric Current Latest Master Baseline (avg) vs Master vs Baseline Status
instance-ai-heap-used-baseline 187.60 MB 187.60 MB 186.54 MB (σ 0.41) +0.0% +0.6% 🔴
instance-ai-rss-baseline 388.85 MB 388.85 MB 367.95 MB (σ 22.36) +0.0% +5.7% ✅
How to read this table
  • Current: This PR's value (or latest master if PR perf tests haven't run)
  • Latest Master: Most recent nightly master measurement
  • Baseline: Rolling 14-day average from master
  • vs Master: PR impact (current vs latest master)
  • vs Baseline: Drift from baseline (current vs rolling avg)
  • Status: ✅ within 1σ | ⚠️ 1-2σ | 🔴 >2σ regression

@n8n-assistant n8n-assistant Bot added the n8n team Authored by the n8n team label Apr 24, 2026
@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 980 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
editor-ui-esm 46.01MB 980 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/worker-*.js 3.14MB 3.15MB 17517.58% ⚠️
assets/worker-*.js -3.14MB 17.9kB -99.43%
assets/core-*.js 71 bytes 630.18kB 0.01%
assets/ChatView-*.js 909 bytes 58.95kB 1.57%

Files in assets/ChatView-*.js:

  • ./src/features/ai/chatHub/components/ChatConversationHeader.vue → Total Size: 379 bytes

  • ./src/features/ai/chatHub/ChatView.vue → Total Size: 308 bytes

@phyllis-noester
phyllis-noester added this pull request to the merge queue Apr 27, 2026
Merged via the queue into master with commit b1ddbf2 Apr 27, 2026
67 of 68 checks passed
@phyllis-noester
phyllis-noester deleted the noref-fix-chathub-dynamic-creds-logout branch April 27, 2026 07:43
@n8n-assistant n8n-assistant Bot mentioned this pull request Apr 28, 2026
@n8n-assistant

n8n-assistant Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Got released with n8n@2.19.0

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 Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants