[PR #25515] feat(mobile): Allow users to set album cover from mobile app #18263

Open
opened 2026-02-05 16:35:29 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/25515
Author: @timonrieger
Created: 1/26/2026
Status: 🔄 Open

Base: mainHead: feat/mobile-set-album-cover


📝 Commits (10+)

📊 Changes

6 files changed (+212 additions, -0 deletions)

View changed files

mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart (+58 -0)
📝 mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart (+3 -0)
📝 mobile/lib/providers/infrastructure/action.provider.dart (+20 -0)
📝 mobile/lib/services/action.service.dart (+6 -0)
📝 mobile/lib/utils/action_button.utils.dart (+16 -0)
📝 mobile/test/utils/action_button_utils_test.dart (+109 -0)

📄 Description

Description

Adds the ability to set an album cover from the mobile app. Users can select a single asset in an album and set it as the album cover.

  • Added setAlbumCover action button type with visibility logic
  • Added SetAlbumCoverActionButton widget
  • Integrated into album viewer kebab menu and multiselect bottom bar
  • Added selectedCount parameter to ActionButtonContext to enforce single-selection requirement
  • Implemented service layer methods to update album cover via API

Fixes #3789

How Has This Been Tested?

  • Added unit tests for setAlbumCover button visibility logic covering:
    • Should show when owner, not locked, has album, and selectedCount is 1
    • Should not show when not owner
    • Should not show when in locked view
    • Should not show when no current album
    • Should not show when selectedCount is 0 or greater than 1
  • Manual testing in album viewer and multiselect mode

Screen Recordings

From Asset View

https://github.com/user-attachments/assets/58fc1937-aed8-40b8-869c-9cb47c1d40c2

From Select View

https://github.com/user-attachments/assets/1ed824dd-029d-4250-82ee-2f220f9ce8a7

Checklist:

  • 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.

An LLM was used to generate unit tests for the setAlbumCover action button visibility logic, following the existing test patterns in the codebase.


🔄 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/25515 **Author:** [@timonrieger](https://github.com/timonrieger) **Created:** 1/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/mobile-set-album-cover` --- ### 📝 Commits (10+) - [`9cd9d4b`](https://github.com/immich-app/immich/commit/9cd9d4b33f120d5458a191bb9394e9e6ecec002d) set album cover from asset - [`158666d`](https://github.com/immich-app/immich/commit/158666d3d07fa2a02c63a9e6bc838c8c1f4c5f13) add to correct kebab group - [`8ab396d`](https://github.com/immich-app/immich/commit/8ab396dcc646a6a39f0dde1d82059c2449a259c6) add to album selection - [`9d68e12`](https://github.com/immich-app/immich/commit/9d68e12a08d04e6c2888bbe223ff7b4436509930) add to legacy control bottom bar - [`2193350`](https://github.com/immich-app/immich/commit/2193350555572d4812bff6675360c53c897e2823) add tests - [`cc770a5`](https://github.com/immich-app/immich/commit/cc770a53effb86b14ed998388edd8cf50efd6130) format - [`fe37c1a`](https://github.com/immich-app/immich/commit/fe37c1a7aa6fc1dc9e0f32cf96c17c974c6a2ef1) analyze - [`380b72c`](https://github.com/immich-app/immich/commit/380b72ca81523b8f47c2cf5a5391ab31a40fa98c) Revert "add to legacy control bottom bar" - [`1bb5395`](https://github.com/immich-app/immich/commit/1bb5395fcbd0800e4adf7d39c17d2f33db02fe0d) remove unnecessary event emission - [`50a9d80`](https://github.com/immich-app/immich/commit/50a9d80478b0f249941eed00890817f8fae95fbc) Merge branch 'main' into feat/mobile-set-album-cover ### 📊 Changes **6 files changed** (+212 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart` (+58 -0) 📝 `mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart` (+3 -0) 📝 `mobile/lib/providers/infrastructure/action.provider.dart` (+20 -0) 📝 `mobile/lib/services/action.service.dart` (+6 -0) 📝 `mobile/lib/utils/action_button.utils.dart` (+16 -0) 📝 `mobile/test/utils/action_button_utils_test.dart` (+109 -0) </details> ### 📄 Description ## Description Adds the ability to set an album cover from the mobile app. Users can select a single asset in an album and set it as the album cover. - Added `setAlbumCover` action button type with visibility logic - Added `SetAlbumCoverActionButton` widget - Integrated into album viewer kebab menu and multiselect bottom bar - Added `selectedCount` parameter to `ActionButtonContext` to enforce single-selection requirement - Implemented service layer methods to update album cover via API Fixes #3789 ## How Has This Been Tested? - [x] Added unit tests for `setAlbumCover` button visibility logic covering: - Should show when owner, not locked, has album, and selectedCount is 1 - Should not show when not owner - Should not show when in locked view - Should not show when no current album - Should not show when selectedCount is 0 or greater than 1 - [x] Manual testing in album viewer and multiselect mode <details><summary><h2>Screen Recordings</h2></summary> <!-- Images go below this line. --> ### From Asset View https://github.com/user-attachments/assets/58fc1937-aed8-40b8-869c-9cb47c1d40c2 ### From Select View https://github.com/user-attachments/assets/1ed824dd-029d-4250-82ee-2f220f9ce8a7 </details> ## Checklist: - [x] 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. - [x] I have confirmed that any new dependencies are strictly necessary. - [x] I have written tests for new code (if applicable) - [x] I have followed naming conventions/patterns in the surrounding code - [x] All code in `src/services/` uses repositories implementations for database calls, filesystem operations, etc. - [x] 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. An LLM was used to generate unit tests for the `setAlbumCover` action button visibility logic, following the existing test patterns in the codebase. --- <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 16:35:29 +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#18263