Skip to content

[web][photos] update album cover image#9228

Draft
AswinAsok wants to merge 4 commits intoente-io:mainfrom
AswinAsok:set-cover-image
Draft

[web][photos] update album cover image#9228
AswinAsok wants to merge 4 commits intoente-io:mainfrom
AswinAsok:set-cover-image

Conversation

@AswinAsok
Copy link
Contributor

No description provided.

@AswinAsok AswinAsok marked this pull request as draft February 17, 2026 06:39
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 651394ee1d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 419 to 422
: state.collectionFiles.filter(
({ collectionID }) =>
collectionID === activeCollection.id,
),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive cover picker files from filtered album state

The cover picker is built from state.collectionFiles filtered only by collectionID, which bypasses the reducer’s active-view filtering (deriveAlbumsOrHiddenAlbumsFilteredFiles) that removes temp-deleted/temp-hidden items before they disappear from local state. In flows where a file has been removed/hidden but the collection cache is stale, the dialog can still offer that file and then send an invalid coverID, causing cover updates to fail. Building this list from the same filtered source as the visible album avoids selecting stale candidates.

Useful? React with 👍 / 👎.

Comment on lines 73 to 77
const annotatedFiles = useMemo(
(): FileListAnnotatedFile[] =>
files
.filter((file) => file.metadata.fileType !== FileType.video)
.map((file) => ({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Defer cover picker annotation until dialog opens

This memo eagerly computes timeline annotations for every file in the active collection even when the dialog is closed; combined with the parent always mounting PickCoverPhotoDialog for any activeCollection, switching into large albums now does an unnecessary full-file pass and date formatting work. Deferring this computation until open is true (or mounting the dialog only when open) avoids a measurable per-album performance hit for users who never invoke “Set cover.”

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments