mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-02 13:39:41 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user