mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
8a3c87f69c
## Summary > Describe what the PR does and how to test. Photos and videos are recommended. Every time the `MainHeader` component is created, we register a new handler for the "push" messages. Unfortunately this becomes an issue if you go multiple times to a page that renders the `MainHeader`, e.g `/workflow/:id`, without refreshing the page; because all handlers will be called, causing behavior duplication. I added the possibility of passing an ID, and made impossible to have multiple handlers with the same ID However, it does not seems to be needed to support an array of handlers in the pushConnection store. If that is the case: 1. We might want to have only one handler for the push connections at all times, which would be a much simpler approach. 2. Register the handler on app.mount instead. The issue seems to have been introduced [here](https://github.com/n8n-io/n8n/pull/7763/files#diff-f5dae80a64b9951bb6691f1b9d439423cf84fa0cc9601b3f2c00904f3135e8deR48) Before the change: https://www.loom.com/share/85cf8ef896254d848a13a6c6438daa47 With the change: https://www.loom.com/share/f5c4ffac421d46cc8e389364e1c357d3 ## Related tickets and issues https://linear.app/n8n/issue/ADO-1596/bug-items-count-display-in-running-workflow ## Review / Merge checklist - [x] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. > A feature is not complete without tests. |
||
---|---|---|
.. | ||
@n8n | ||
@n8n_io/eslint-config | ||
cli | ||
core | ||
design-system | ||
editor-ui | ||
node-dev | ||
nodes-base | ||
workflow |