n8n/packages/cli
Guillaume Jacquart 400592482e
perf(core): Throttle sub-workflow progress pushes and limit them to direct children
The progress stream forwarded from a sub-workflow to the parent's canvas was
effectively unthrottled. The previous guard only suppressed consecutive
`nodeExecuteBefore` events for the same node with no intervening
`nodeExecuteAfter` — a sequence the engine does not produce — so steady state
was two messages per child node execution. Each of those is a pubsub broadcast
in scaling mode and a full canvas re-map in the editor, so a looping child
workflow could emit thousands of messages for one run.

Replace it with a trailing-edge throttle: the leading edge still emits
immediately so the overlay appears at once, subsequent events inside the window
coalesce into a single pending snapshot, and a trailing timer sends the latest
state. The overlay only renders the running node name, an "X / Y" counter and a
bar, so intermediate states are disposable. A 200-iteration child now emits two
messages instead of ~400. `workflowExecuteAfter` drops any pending snapshot,
since the finished event clears the overlay outright.

Also stop forwarding progress for nested sub-workflows. Only the workflow open
on the canvas renders the overlay, so a grandchild's parent node is not on
screen and the editor discarded those messages anyway. Resolving the direct
parent's pushRef instead of walking the whole ancestor chain removes that
wasted traffic and simplifies the lookup.

Tests now exercise real engine before/after sequences rather than the synthetic
double-`nodeExecuteBefore` the old throttle keyed on.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-27 11:12:44 +02:00
..
bin chore: Initial V2 changes (#22553) 2025-12-01 20:44:59 +02:00
scripts feat(editor): Implements AI Assistant template examples experiment (no-changelog) (#33244) 2026-07-08 10:15:46 +00:00
src perf(core): Throttle sub-workflow progress pushes and limit them to direct children 2026-07-27 11:12:44 +02:00
templates feat(Form Node): Support multiple files when returning binary from form ending (#33780) 2026-07-13 12:07:47 +00:00
test feat(core): Route poll triggers through the durable scheduler (no-changelog) (#34733) 2026-07-27 07:32:08 +00:00
AGENTS.md chore(core): Lock the @n8n/typeorm import ratchet and document the boundary (no-changelog) (#34370) 2026-07-21 08:26:21 +00:00
BREAKING-CHANGES.md fix: Security patches (#22748) 2025-12-05 13:28:39 +00:00
eslint.config.mjs feat(core): Route poll triggers through the durable scheduler (no-changelog) (#34733) 2026-07-27 07:32:08 +00:00
nodemon.json build: Fix cli nodemon config (#10628) 2024-08-30 19:03:47 +03:00
package.json feat(core): Add telemetry events for agent publishing, builder capabilities, and interactive flows (#34887) 2026-07-24 14:34:11 +00:00
tsconfig.build.json feat: Add @n8n/telemetry event registry with typed track() support (no-changelog) (#34662) 2026-07-23 16:09:54 +00:00
tsconfig.json feat: Add @n8n/telemetry event registry with typed track() support (no-changelog) (#34662) 2026-07-23 16:09:54 +00:00
vitest.config.base.ts feat: Add @n8n/telemetry event registry with typed track() support (no-changelog) (#34662) 2026-07-23 16:09:54 +00:00
vitest.config.integration.testcontainers.ts chore: Remove references to Jest (#33282) 2026-07-01 09:03:25 +00:00
vitest.config.integration.ts chore: Remove references to Jest (#33282) 2026-07-01 09:03:25 +00:00
vitest.config.migration.testcontainers.ts chore: Remove references to Jest (#33282) 2026-07-01 09:03:25 +00:00
vitest.config.migration.ts chore: Remove references to Jest (#33282) 2026-07-01 09:03:25 +00:00
vitest.config.ts test: Migrate cli package from Jest to Vitest (#31804) 2026-06-29 21:19:56 +03:00
vitest.tsc-entity-transform.ts chore: Consolidate ts tooling catalog (#34310) 2026-07-16 10:10:12 +00:00
vitest.workspace-externals.ts test: Migrate cli package from Jest to Vitest (#31804) 2026-06-29 21:19:56 +03:00