Skip to content

fix(web): misleading toast notification - #30976

Open
brn-lin wants to merge 2 commits into
immich-app:mainfrom
brn-lin:fix/30849-misleading-toast
Open

fix(web): misleading toast notification #30976
brn-lin wants to merge 2 commits into
immich-app:mainfrom
brn-lin:fix/30849-misleading-toast

Conversation

@brn-lin

@brn-lin brn-lin commented Aug 24, 2026

Copy link
Copy Markdown

Description

Fixes #30849, misleading toast notification.

When trying to add a picture from an album that was shared from a different user into your own album, the toast message would say "Success", but with an appropriate "Asset cannot be added to the album" message. This happened because toastManager.primary() was used for all scenarios, including scenarios where assets cannot be added to the album.

I added the appropriate toastManager method to each of the branches in the if/else statement, so that each scenario will trigger the appropriate toast along with the appropriate message.

How Has This Been Tested?

Since no test file for album.service.ts in the frontend web folder existed, I created one. The test file that I created only has tests for the part of the album.service.ts file that had the issue. The test suite tests that the appropriate toastManager method is called with the appropriate scenario.

In order to reproduce, just click on album.service.spec.ts and click the green check marks to run the tests yourself.

Screenshots

Before

Before

After

After

Checklist:

  • I have carefully read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

I used ChatGPT to help me trace the bug through the codebase, and also to understand what was going on in this part of the codebase. I also used it to help me figure out what the root of the problem was. I also used it to generate a template test file, and then I manually fixed any errors and double checked it to make sure that it was testing things properly.

@YarosMallorca YarosMallorca changed the title Fixed issue #30849 misleading toast notification fix(web): misleading toast notification Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading toast notification

2 participants