Skip to content

feat(web): group albums by name prefix - #31034

Open
hitzhangjie wants to merge 1 commit into
immich-app:mainfrom
hitzhangjie-forks:feat/sort_albums_by_name
Open

feat(web): group albums by name prefix#31034
hitzhangjie wants to merge 1 commit into
immich-app:mainfrom
hitzhangjie-forks:feat/sort_albums_by_name

Conversation

@hitzhangjie

@hitzhangjie hitzhangjie commented Aug 26, 2026

Copy link
Copy Markdown

Description

Adds a Group by name option on the albums page. Albums are grouped by the first segment of the album name, split on a configurable delimiter (default -).

  • Names with a delimiter use the prefix as the group key (旅游-日本旅游).
  • Names without a delimiter use the full name, so aigc and aigc-videos land in the same aigc group.
  • Names with an empty prefix (e.g. -日本) go into Uncategorized.
  • When this grouping is selected, a small input lets you change the delimiter (falls back to - if left empty).

No existing issue.

How Has This Been Tested?

  • Unit tests for parseAlbumNameGroup / getAlbumGroupDelimiter (web/src/lib/utils/album-name-group.spec.ts)
  • Manual: Albums page → group by name → albums with a shared prefix appear together
  • Manual: Change the delimiter in the albums toolbar and confirm groups update
  • Manual: Sharing page still loads albums with default view settings

Screenshots (if appropriate)

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.

  • The analysis (which part should be modified) before create this PR is done by LLM;
  • The code in this PR is written by LLM;
  • The testing code in this PR is written by LLM;
  • The PR description is drafted by LLM;
  • And this PR is already tested mannually;

@hitzhangjie

Copy link
Copy Markdown
Author

Here's a screenshot:

image

@bo0tzz

bo0tzz commented Aug 26, 2026

Copy link
Copy Markdown
Member

Please fill out the LLM disclosure more completely. "The code on this branch was already committed" handwaves a pretty important part.

- if album name contains delimiter '-', then 1st part used as group key;
- if not, then album name used as group key;

So names like "aigc" and "aigc-videos" appear in the same category 'aigc'.
@hitzhangjie
hitzhangjie force-pushed the feat/sort_albums_by_name branch from 52efa2b to 4e75077 Compare August 26, 2026 23:52
@immich-push-o-matic

immich-push-o-matic Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

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.

2 participants