Skip to content

Conversation

@Cadiac
Copy link
Contributor

@Cadiac Cadiac commented Oct 29, 2025

Summary

This PR adds a new chat execution mode, to be used with chat workflow executions on the n8n Chat tool.
Before these executions were manual, but now they can be differentiated from other executions.

Also changed slightly how we invoke the executions, as the logic specific to manual executions doesn't apply anymore.

We can later filter executions by this execution mode.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/CHA-24/new-execution-mode-for-chats

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)

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Oct 29, 2025
@bundlemon
Copy link

bundlemon bot commented Oct 29, 2025

BundleMon

Unchanged files (2)
Status Path Size Limits
WASM Dependencies
tree-sitter-bash.wasm
181.26KB -
WASM Dependencies
tree-sitter.wasm
74.47KB -

No change in files bundle size

Groups updated (2)
Status Path Size Limits
**/*.js
5.88MB (+472.65KB +8.52%) -
**/*.css
218.77KB (+5.51KB +2.58%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 16.12903% with 52 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...kages/cli/src/modules/chat-hub/chat-hub.service.ts 2.08% 47 Missing ⚠️
...es/cli/src/workflows/workflow-execution.service.ts 0.00% 4 Missing ⚠️
...n-engine/node-execution-context/execute-context.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Cadiac Cadiac force-pushed the cha-24-new-execution-mode-for-chats branch from 6184ed7 to cc1f904 Compare October 29, 2025 08:10
@Cadiac Cadiac force-pushed the cha-24-new-execution-mode-for-chats branch from cc1f904 to f0f4326 Compare October 29, 2025 08:12
@Cadiac Cadiac requested a review from autologie October 29, 2025 08:13
@Cadiac Cadiac marked this pull request as ready for review October 29, 2025 08:13
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 9 files

Prompt for AI agents (all 2 issues)

Understand the root cause of the following 2 issues and fix them.


<file name="packages/cli/src/modules/chat-hub/chat-hub.service.ts">

<violation number="1" location="packages/cli/src/modules/chat-hub/chat-hub.service.ts:825">
Construction of `IRunExecutionData` for chat message workflows duplicates logic in `prepareCustomAgentWorkflow` and `prepareChatWorkflow`. This pattern should be extracted into a shared private helper function.</violation>
</file>

<file name="packages/frontend/editor-ui/src/features/execution/executions/components/global/GlobalExecutionsListItem.vue">

<violation number="1" location="packages/frontend/editor-ui/src/features/execution/executions/components/global/GlobalExecutionsListItem.vue:266">
Please source the tooltip content from locale.baseText (or equivalent i18n) instead of hardcoding English strings so these labels localize correctly.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

waitingExecutionSource: {},
},
manualData: {
userId: user.id,
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 29, 2025

Choose a reason for hiding this comment

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

Construction of IRunExecutionData for chat message workflows duplicates logic in prepareCustomAgentWorkflow and prepareChatWorkflow. This pattern should be extracted into a shared private helper function.

Prompt for AI agents
Address the following comment on packages/cli/src/modules/chat-hub/chat-hub.service.ts at line 825:

<comment>Construction of `IRunExecutionData` for chat message workflows duplicates logic in `prepareCustomAgentWorkflow` and `prepareChatWorkflow`. This pattern should be extracted into a shared private helper function.</comment>

<file context>
@@ -797,42 +789,48 @@ export class ChatHubService {
+				waitingExecutionSource: {},
+			},
+			manualData: {
+				userId: user.id,
+			},
+		};
</file context>
Fix with Cubic

</td>
<td>
<N8nIcon v-if="execution.mode === 'manual'" icon="flask-conical" />
<N8nTooltip v-if="execution.mode === 'manual'" content="Manual Execution" placement="top">
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 29, 2025

Choose a reason for hiding this comment

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

Please source the tooltip content from locale.baseText (or equivalent i18n) instead of hardcoding English strings so these labels localize correctly.

Prompt for AI agents
Address the following comment on packages/frontend/editor-ui/src/features/execution/executions/components/global/GlobalExecutionsListItem.vue at line 266:

<comment>Please source the tooltip content from locale.baseText (or equivalent i18n) instead of hardcoding English strings so these labels localize correctly.</comment>

<file context>
@@ -263,7 +263,12 @@ async function handleActionItemClick(commandData: Command) {
 		&lt;/td&gt;
 		&lt;td&gt;
-			&lt;N8nIcon v-if=&quot;execution.mode === &#39;manual&#39;&quot; icon=&quot;flask-conical&quot; /&gt;
+			&lt;N8nTooltip v-if=&quot;execution.mode === &#39;manual&#39;&quot; content=&quot;Manual Execution&quot; placement=&quot;top&quot;&gt;
+				&lt;N8nIcon icon=&quot;flask-conical&quot; /&gt;
+			&lt;/N8nTooltip&gt;
</file context>
Fix with Cubic

autologie
autologie previously approved these changes Oct 29, 2025
Copy link
Contributor

@autologie autologie left a comment

Choose a reason for hiding this comment

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

👍

waitingExecutionSource: {},
},
manualData: {
userId: user.id,
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not much, it's just execution metadata, this way it also gets passed also to queue workers in queue mode and gets copied to https://github.com/n8n-io/n8n/blob/master/packages/cli/src/scaling/job-processor.ts#L201 execution data here in that case I believe.

This is similar to what manual executions did before - chat executions should still count as executions triggered by users so I kept this

@currents-bot
Copy link

currents-bot bot commented Oct 29, 2025

E2E Tests: n8n tests passed after 7m 32.1s

🟢 584 · 🔴 0 · ⚪️ 12

View Run Details

Run Details

  • Project: n8n

  • Groups: 2

  • Framework: Playwright

  • Run Status: Passed

  • Commit: 04632bf

  • Spec files: 96

  • Overall tests: 596

  • Duration: 7m 32.1s

  • Parallelization: 8

Groups

GroupId Results Spec Files Progress
ui 🟢 529 · 🔴 0 · ⚪️ 12 89 / 89
ui:isolated 🟢 55 · 🔴 0 · ⚪️ 0 7 / 7


This message was posted automatically by currents.dev | Integration Settings

@Cadiac Cadiac merged commit 5d9be86 into master Oct 29, 2025
32 checks passed
@Cadiac Cadiac deleted the cha-24-new-execution-mode-for-chats branch October 29, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants