[PR #3537] [MERGED] refactor(server,web): time buckets for main timeline, archived, and favorites (1) #10016

Closed
opened 2026-02-05 14:14:35 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/3537
Author: @jrasm91
Created: 8/3/2023
Status: Merged
Merged: 8/5/2023
Merged by: @jrasm91

Base: mainHead: refactor/time-buckets-1


📝 Commits (10+)

  • bc93203 refactor: time buckets
  • abc817a feat(web): use new time bucket api
  • 275769e feat(web): use asset grid in archive/favorites
  • 0d29a61 chore: open api
  • ff1d89a chore: clean up uuid validation
  • 1a8652e refactor(web): move memory lane to photos page
  • eecda57 Update web/src/routes/(user)/archive/+page.svelte
  • 5043c26 chore: merge
  • 3655e9a fix: hide archived photos on main timeline
  • 5fa81f8 fix: select exif info

📊 Changes

51 files changed (+1461 additions, -1809 deletions)

View changed files

📝 cli/src/api/open-api/api.ts (+326 -250)
📝 mobile/openapi/.openapi-generator/FILES (+6 -15)
📝 mobile/openapi/README.md (+4 -7)
📝 mobile/openapi/doc/AssetApi.md (+113 -91)
mobile/openapi/doc/AssetCountByTimeBucketResponseDto.md (+0 -16)
mobile/openapi/doc/GetAssetByTimeBucketDto.md (+0 -17)
mobile/openapi/doc/GetAssetCountByTimeBucketDto.md (+0 -17)
📝 mobile/openapi/doc/TimeBucketResponseDto.md (+1 -1)
📝 mobile/openapi/doc/TimeBucketSize.md (+1 -1)
📝 mobile/openapi/lib/api.dart (+2 -5)
📝 mobile/openapi/lib/api/asset_api.dart (+179 -97)
📝 mobile/openapi/lib/api_client.dart (+4 -10)
📝 mobile/openapi/lib/api_helper.dart (+2 -2)
mobile/openapi/lib/model/asset_count_by_time_bucket_response_dto.dart (+0 -106)
mobile/openapi/lib/model/get_asset_by_time_bucket_dto.dart (+0 -135)
mobile/openapi/lib/model/get_asset_count_by_time_bucket_dto.dart (+0 -133)
📝 mobile/openapi/lib/model/time_bucket_response_dto.dart (+18 -18)
📝 mobile/openapi/lib/model/time_bucket_size.dart (+24 -24)
📝 mobile/openapi/test/asset_api_test.dart (+10 -10)
mobile/openapi/test/asset_count_by_time_bucket_response_dto_test.dart (+0 -32)

...and 31 more files

📄 Description

In this PR:

  • New time bucket endpoints in the server (upgraded to domain/)
  • Use time buckets in web for favorites and archived pages

Tested Scenarios:

  • Archive single photo (photos page)
  • Archive multiple photos (photos page)
  • Favorite single photos (photos page)
  • Favorite multiple photos (photos page)
  • Select single photos (photos page)
  • Select multiple photos (photos page)
  • Select multiple photos via shift + timeline jump (photos page)
  • Drag to scroll (photos page)
  • Click to scroll (photos page)
  • Delete one (photos page)
  • Delete multiple (photos page)
  • Unarchive single photos (archive page)
  • Unarchive multiple photos (archive page)
  • Select multiple photos (archive page)
  • Select multiple photos via shift + timeline jump
  • Favorite single photos (archive page)
  • Favorite multiple photos (archive page)
  • Delete single photo (archive page)
  • Delete multiple photos (archive page)
  • Drag to scroll (archive page)
  • Unarchive single photos (favorites page)
  • Unarchive multiple photos (favorites page)
  • Select multiple photos (favorites page)
  • Select multiple photos via shift + timeline jump (favorites page)
  • Delete single photo (favorites page)
  • Delete multiple photos (favorites page)
  • Drag to scroll (favorites page)

Notes for future PRs:

  • Use timeline on person detail page
  • Use timeline on individual share page
  • Use timeline on album (share) page
  • Optimize web multi-select / bulk operations. They currently make one request per asset and the requests start immediately. This can generate 2,000+ requests at once and essentially freeze the website / overwhelm the server.
  • Optimize bulk delete. It makes a single request, but takes a long time to complete (it is quite slow and inefficiently queues all the faces on the main thread).
  • Take a look at the database queries for time buckets and add any necessary indices.
  • Possibly merge interaction store into AssetStore, since there is a lot of overlap between loaded assets/buckets and selected assets/buckets.

🔄 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/3537 **Author:** [@jrasm91](https://github.com/jrasm91) **Created:** 8/3/2023 **Status:** ✅ Merged **Merged:** 8/5/2023 **Merged by:** [@jrasm91](https://github.com/jrasm91) **Base:** `main` ← **Head:** `refactor/time-buckets-1` --- ### 📝 Commits (10+) - [`bc93203`](https://github.com/immich-app/immich/commit/bc9320348d8c79b926a51ce9b9ee2a6681ff3883) refactor: time buckets - [`abc817a`](https://github.com/immich-app/immich/commit/abc817ad0c5eb1ecffe3917cae7d341a969f2124) feat(web): use new time bucket api - [`275769e`](https://github.com/immich-app/immich/commit/275769ec5b1009724b7515f68ca29fb34b742b6f) feat(web): use asset grid in archive/favorites - [`0d29a61`](https://github.com/immich-app/immich/commit/0d29a614bdd9ce82e267252c94ee6d78d3837abb) chore: open api - [`ff1d89a`](https://github.com/immich-app/immich/commit/ff1d89ac0b9df654c03c0f1ee4d8c0dfda480308) chore: clean up uuid validation - [`1a8652e`](https://github.com/immich-app/immich/commit/1a8652ea72d6ade3d0cf095665b97cf1b9d3e044) refactor(web): move memory lane to photos page - [`eecda57`](https://github.com/immich-app/immich/commit/eecda572de74afd9512f564b15934df0eeab2740) Update web/src/routes/(user)/archive/+page.svelte - [`5043c26`](https://github.com/immich-app/immich/commit/5043c2677c492ab3c7c0b75bc7df57559d174a0d) chore: merge - [`3655e9a`](https://github.com/immich-app/immich/commit/3655e9adbc0cac9ef38781c171265b2760582d2c) fix: hide archived photos on main timeline - [`5fa81f8`](https://github.com/immich-app/immich/commit/5fa81f86f13ec3634941c587829a475342e9b272) fix: select exif info ### 📊 Changes **51 files changed** (+1461 additions, -1809 deletions) <details> <summary>View changed files</summary> 📝 `cli/src/api/open-api/api.ts` (+326 -250) 📝 `mobile/openapi/.openapi-generator/FILES` (+6 -15) 📝 `mobile/openapi/README.md` (+4 -7) 📝 `mobile/openapi/doc/AssetApi.md` (+113 -91) ➖ `mobile/openapi/doc/AssetCountByTimeBucketResponseDto.md` (+0 -16) ➖ `mobile/openapi/doc/GetAssetByTimeBucketDto.md` (+0 -17) ➖ `mobile/openapi/doc/GetAssetCountByTimeBucketDto.md` (+0 -17) 📝 `mobile/openapi/doc/TimeBucketResponseDto.md` (+1 -1) 📝 `mobile/openapi/doc/TimeBucketSize.md` (+1 -1) 📝 `mobile/openapi/lib/api.dart` (+2 -5) 📝 `mobile/openapi/lib/api/asset_api.dart` (+179 -97) 📝 `mobile/openapi/lib/api_client.dart` (+4 -10) 📝 `mobile/openapi/lib/api_helper.dart` (+2 -2) ➖ `mobile/openapi/lib/model/asset_count_by_time_bucket_response_dto.dart` (+0 -106) ➖ `mobile/openapi/lib/model/get_asset_by_time_bucket_dto.dart` (+0 -135) ➖ `mobile/openapi/lib/model/get_asset_count_by_time_bucket_dto.dart` (+0 -133) 📝 `mobile/openapi/lib/model/time_bucket_response_dto.dart` (+18 -18) 📝 `mobile/openapi/lib/model/time_bucket_size.dart` (+24 -24) 📝 `mobile/openapi/test/asset_api_test.dart` (+10 -10) ➖ `mobile/openapi/test/asset_count_by_time_bucket_response_dto_test.dart` (+0 -32) _...and 31 more files_ </details> ### 📄 Description In this PR: - New time bucket endpoints in the server (upgraded to `domain/`) - Use time buckets in web for favorites and archived pages Tested Scenarios: - Archive single photo (photos page) - Archive multiple photos (photos page) - Favorite single photos (photos page) - Favorite multiple photos (photos page) - Select single photos (photos page) - Select multiple photos (photos page) - Select multiple photos via shift + timeline jump (photos page) - Drag to scroll (photos page) - Click to scroll (photos page) - Delete one (photos page) - Delete multiple (photos page) - Unarchive single photos (archive page) - Unarchive multiple photos (archive page) - Select multiple photos (archive page) - Select multiple photos via shift + timeline jump - Favorite single photos (archive page) - Favorite multiple photos (archive page) - Delete single photo (archive page) - Delete multiple photos (archive page) - Drag to scroll (archive page) - Unarchive single photos (favorites page) - Unarchive multiple photos (favorites page) - Select multiple photos (favorites page) - Select multiple photos via shift + timeline jump (favorites page) - Delete single photo (favorites page) - Delete multiple photos (favorites page) - Drag to scroll (favorites page) Notes for future PRs: - Use timeline on person detail page - Use timeline on individual share page - Use timeline on album (share) page - Optimize web multi-select / bulk operations. They currently make one request per asset and the requests start immediately. This can generate 2,000+ requests at once and essentially freeze the website / overwhelm the server. - Optimize bulk delete. It makes a single request, but takes a long time to complete (it is quite slow and inefficiently queues all the faces on the main thread). - Take a look at the database queries for time buckets and add any necessary indices. - Possibly merge interaction store into AssetStore, since there is a lot of overlap between loaded assets/buckets and selected assets/buckets. --- <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 14:14:35 +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#10016