[PR #650] [MERGED] Fix Notification components possible memory leaks #8704

Closed
opened 2026-02-05 13:51:49 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/650
Author: @jbaez
Created: 9/9/2022
Status: Merged
Merged: 9/9/2022
Merged by: @alextran1502

Base: mainHead: fix/notification-subscriptions


📝 Commits (1)

  • 71c5ed0 Fix Notification components possible memory leaks

📊 Changes

4 files changed (+96 additions, -11 deletions)

View changed files

web/src/lib/components/shared-components/notification/__tests__/notification-card.spec.ts (+39 -0)
web/src/lib/components/shared-components/notification/__tests__/notification-list.spec.ts (+44 -0)
📝 web/src/lib/components/shared-components/notification/notification-card.svelte (+9 -3)
📝 web/src/lib/components/shared-components/notification/notification-list.svelte (+4 -8)

📄 Description

Dispose subscriptions and timeouts when the components are removed from the DOM.

Currently it probably doesn't create memory leaks since the NotificationList is shown in the base layout as a singleton component. But if at some point we add a feature to dismiss a notification on click, then it might create a memory leak.

Added affected components tests to validate changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/650 **Author:** [@jbaez](https://github.com/jbaez) **Created:** 9/9/2022 **Status:** ✅ Merged **Merged:** 9/9/2022 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `fix/notification-subscriptions` --- ### 📝 Commits (1) - [`71c5ed0`](https://github.com/immich-app/immich/commit/71c5ed0619148c194d162df2cbc6c85fee3827f9) Fix Notification components possible memory leaks ### 📊 Changes **4 files changed** (+96 additions, -11 deletions) <details> <summary>View changed files</summary> ➕ `web/src/lib/components/shared-components/notification/__tests__/notification-card.spec.ts` (+39 -0) ➕ `web/src/lib/components/shared-components/notification/__tests__/notification-list.spec.ts` (+44 -0) 📝 `web/src/lib/components/shared-components/notification/notification-card.svelte` (+9 -3) 📝 `web/src/lib/components/shared-components/notification/notification-list.svelte` (+4 -8) </details> ### 📄 Description Dispose subscriptions and timeouts when the components are removed from the DOM. Currently it probably doesn't create memory leaks since the NotificationList is shown in the base layout as a singleton component. But if at some point we add a feature to dismiss a notification on click, then it might create a memory leak. Added affected components tests to validate changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 13:51:49 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#8704