-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(editor): Fix execution running status listener for chat messages #12951
fix(editor): Fix execution running status listener for chat messages #12951
Conversation
@@ -263,14 +264,18 @@ describe('CanvasChat', () => { | |||
// Send message | |||
const input = await findByTestId('chat-input'); | |||
await userEvent.type(input, 'Test message'); | |||
|
|||
workflowsStore.isWorkflowRunning = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since runWorkflow
resolve is mocked, the isWorkflowRunning
will be false from the first run. This means that the loading state never gets a chance to appear. We're forcing isWorkflowRunning
to be true for the first run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Alex, for the next person looking at this test, would this be worth adding as a comment in the code?
// Stop the watcher when the promise is resolved | ||
stopWatch(); | ||
return await new Promise<void>((resolve) => { | ||
const resolveIfFinished = (isRunning: boolean) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stopping watcher and resolving in separate function due to possible unwatch used before initialization
error when using with immediate: true
, if it runs on the first attempt. This could happen if for any reason runWorkflow
(the prerequisite for this promise) fails.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
n8n
|
Project |
n8n
|
Branch Review |
cat-601-execution-never-appears-to-start-on-the-fe
|
Run status |
|
Run duration | 04m 22s |
Commit |
|
Committer | Alex Grozav |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
1
|
|
5
|
|
0
|
|
432
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
Summary
Before
Screen.Recording.2025-01-30.at.15.02.01.mov
After
Screen.Recording.2025-01-30.at.15.04.16.mov
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/CAT-601/execution-never-appears-to-start-on-the-fe
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)