Repository navigation
fix(web): MemoryStore does not initialize on direct navigation - #18947
Merged
alextran1502 merged 5 commits intoJun 17, 2025
Merged
Conversation
alextran1502
reviewed
Jun 9, 2025
| @@ -265,7 +265,7 @@ | |||
| if (type === 'enter') { | |||
Member
There was a problem hiding this comment.
If this doesn't happen anymore, probably good to remove this whole conditional block to avoid confusing others
Collaborator
Author
There was a problem hiding this comment.
I left it commented just in case it happened to be a regression and had to be modified further.
So instead, it's best to remove updates like this entirely, and if we have to undo we can just check previous versions?
Member
There was a problem hiding this comment.
Yes, preferably we like to keep the code base clean
- remove early return from afterNavigate
alextran1502
approved these changes
Jun 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The memory store doesn't load when navigating directly to the memories page. As a consequence, opening assets in the memory gallery-viewer in a new tab does not load.
The memory-viewer was returning early when navigating directly (type === 'enter'), with a reason of duplicate initialization. I can't get this to occur now, and the memoryStore has protections against re-initialization, so I think it is fine to allow direct navigation to load like normal.
Fixes #18870
How Has This Been Tested?
Perform any of the following, and confirming with console logs that afterNavigate isn't called multiple times, while still allowing the memories and gallery to initialize.
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)