Refs #267
Source: Deep code review — docs/code-review-2026-05.md (finding B1, P1).
Where: src/app/pages/manager-dashboard-page.js:162 (registered in setupEditRecipeListener()), no removal in unmount() (~:46).
Issue: document.addEventListener('recipe-updated', ...) is added on every dashboard visit with no teardown. Each navigation cycle adds another listener → duplicate refreshRecipes() calls and a growing memory leak.
Fix: Store the bound handler on this._onRecipeUpdated, attach with that reference, and remove it in unmount(). (Longer term this is what the proposed event-bus R1 would solve centrally.)
Verification: Chrome DevTools → Memory allocation timeline; navigate to/from dashboard 20× and confirm retained size stays flat.
Refs #267
Source: Deep code review —
docs/code-review-2026-05.md(finding B1, P1).Where:
src/app/pages/manager-dashboard-page.js:162(registered insetupEditRecipeListener()), no removal inunmount()(~:46).Issue:
document.addEventListener('recipe-updated', ...)is added on every dashboard visit with no teardown. Each navigation cycle adds another listener → duplicaterefreshRecipes()calls and a growing memory leak.Fix: Store the bound handler on
this._onRecipeUpdated, attach with that reference, and remove it inunmount(). (Longer term this is what the proposed event-bus R1 would solve centrally.)Verification: Chrome DevTools → Memory allocation timeline; navigate to/from dashboard 20× and confirm retained size stays flat.