immich
immich copied to clipboard
[BUG] State not correctly persisted in URL
The bug
On the web client, the current state of the view is not correctly persisted in the URL in some areas of the UI, making it impossible to bookmark individual photos in the web browser. It's fairly inconsistent across different aspects of the UI. In some areas of the UI, it works correctly.
Areas where the site works well, and the state is persisted
- When searching for a face, the face is a link to
/people/<person-id>. This one works and yields the expected behavior - a page that if refreshed brings you back to the same page. - When searching for an object, the URL switches to
/search?smartInfo.objects=<object-title>.
Where it doesn't work as expected (the bug)
- When viewing a photo in an album, the browser URL switches to
/albums/<album-id>/photos/<photo-id>. However, if the page is refreshed, it instead redirects you back to/albums/<album-id>. Expected behavior: refreshing the page from/albums/<album-id>/photos/<photo-id>brings you right back to the photo you were viewing before. - When viewing a photo from the main timeline, the url stays at
/photos, even when a photo is being viewed. Expected behavior: When viewing a photo, the url switches to/photos/<photo-id>and if the page is refreshed it brings you right back to the photo. - When searching for a string, the url on the results page is
/photos. Expected behavior: URL switches to something else (like/search/query) and if the page is refreshed it brings you right back to the same search results. - When clicking on an item from the map, the url stays at
/map. Expected behavior: URL switches to/map/photos/<photo-id>(or something else that persists state).
And where it really doesn't work and errors out (another bug).
When clicking on a photo from the favorites or archive page, the URL switches to /favorites/photos/<photo-id> (or /archive/photos/<photo-id>. If the page is refreshed from this, an error is shown to the user:
Error: Not found: /favorites/photos/<photo-id>
at resolve (file:///usr/src/app/build/server/index.js:3861:18)
at resolve (file:///usr/src/app/build/server/index.js:3736:34)
at Object.handle (file:///usr/src/app/build/server/chunks/hooks.server-5df290a2.js:21:21)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async respond (file:///usr/src/app/build/server/index.js:3734:22)
at async Array.ssr (file:///usr/src/app/build/handler.js:1207:3)
The OS that Immich Server is running on
Windows 10
Version of Immich Server
v1.60.0
Version of Immich Mobile App
n/a
Platform with the issue
- [ ] Server
- [X] Web
- [ ] Mobile
Related #2906.
#8532