Summary
src/lib/mobile-optimizer.ts maintains long-task observers and PerformanceObserver instances attached at module scope, never disposing them; combined with the global addEventListener on window error / unhandledrejection (extensionDetection, earlyErrorSuppression), the app grows listener count across HMR or navigation.
Affected area
src/lib/mobile-optimizer.ts
src/utils/extensionDetection.ts
src/utils/earlyErrorSuppression.ts
Steps to reproduce / impact
Memory growth / listener duplication on SPA route changes is observable in DevTools Performance.
Expected behaviour
Tee observer registration through a per-app lifecycle hook.
Acceptance criteria
Summary
src/lib/mobile-optimizer.tsmaintains long-task observers andPerformanceObserverinstances attached at module scope, never disposing them; combined with the globaladdEventListeneron windowerror/unhandledrejection(extensionDetection,earlyErrorSuppression), the app grows listener count across HMR or navigation.Affected area
src/lib/mobile-optimizer.tssrc/utils/extensionDetection.tssrc/utils/earlyErrorSuppression.tsSteps to reproduce / impact
Memory growth / listener duplication on SPA route changes is observable in DevTools Performance.
Expected behaviour
Tee observer registration through a per-app lifecycle hook.
Acceptance criteria