fix(frontend): add imagePopups cleanup to cleanupAllFloatingWindows

The imagePopups Map was not being cleaned up during SSE reconnects,
causing memory leaks from orphaned drag event listeners on document.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-30 13:33:40 +01:00
co-authored by Claude Opus 4.5
parent b83d458156
commit 0b257753a6
+10
View File
@@ -11175,6 +11175,16 @@ class ClaudemanApp {
this.planSubagents.clear();
}
// Clean up all image popup windows with their drag listeners
for (const [imageId, popupData] of this.imagePopups) {
if (popupData.dragListeners) {
document.removeEventListener('mousemove', popupData.dragListeners.move);
document.removeEventListener('mouseup', popupData.dragListeners.up);
}
popupData.element.remove();
}
this.imagePopups.clear();
// Clear orphaned plan generation state
this.activePlanOrchestratorId = null;
this._planProgressHandler = null;