Skip to content

feat: sort albums by total size#28057

Open
Shadi-Alrashoodi wants to merge 1 commit intoimmich-app:mainfrom
Shadi-Alrashoodi:claude/laughing-northcutt-da6df2
Open

feat: sort albums by total size#28057
Shadi-Alrashoodi wants to merge 1 commit intoimmich-app:mainfrom
Shadi-Alrashoodi:claude/laughing-northcutt-da6df2

Conversation

@Shadi-Alrashoodi
Copy link
Copy Markdown

Description

Adds a "Total size" sort option on the Albums page for web and mobile. Server exposes totalSize on AlbumResponseDto, summed from asset_exif.fileSizeInByte in the existing album metadata query.

  • Server: adds totalSize to AlbumResponseDto, aggregated via SUM(asset_exif.fileSizeInByte) in getMetadataForIds.
  • Web: adds FileSize to AlbumSortBy and a comparator in album-utils.ts. Table view shows a new Total size column.
  • Mobile: adds fileSize to AlbumSortMode (storeIndex 6) and a sort case in remote_album.service.dart.

How Has This Been Tested?

  • Updated server unit tests
  • Manually verified on web
  • Manually verified on mobile

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.

Used Claude to navigate the codebase and identify patterns to follow.

@immich-push-o-matic
Copy link
Copy Markdown

immich-push-o-matic Bot commented Apr 23, 2026

Label error. Requires exactly 1 of: changelog:.*. Found: 📱mobile, 🖥️web, 🗄️server. A maintainer will add the required label.

Adds a "Total size" sort option on the Albums page for web and mobile.
Server exposes totalSize on AlbumResponseDto, summed from
asset_exif.fileSizeInByte in the existing album metadata query.
@Shadi-Alrashoodi Shadi-Alrashoodi force-pushed the claude/laughing-northcutt-da6df2 branch from 5eda17f to 718ba1f Compare April 23, 2026 23:50
@danieldietzler
Copy link
Copy Markdown
Member

Used Claude to navigate the codebase and identify patterns to follow.

Even the branch name leads with claude/. Are you sure you haven't had Claude just write the entire PR?

@Shadi-Alrashoodi
Copy link
Copy Markdown
Author

No - Claude helped me understand the code and draft parts of it, but I directed the feature, reviewed every change, and tested it myself.

@alextran1502
Copy link
Copy Markdown
Member

Thank you for the PR. I am hesitant to accept this PR, as it could cause performance issues, since it will do a left join with the exif table for all assets in the get albums call.

To better understand the impact, I'd like to get the request time difference between main and this PR for 500 albums, with 1500 assets per album.

Can you help me get that?

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.

3 participants