Skip to content

Fix recursive build with empty folders#141

Merged
haltakov merged 4 commits intomainfrom
fix/recursive-build-with-empty-folders
Feb 7, 2026
Merged

Fix recursive build with empty folders#141
haltakov merged 4 commits intomainfrom
fix/recursive-build-with-empty-folders

Conversation

@haltakov
Copy link
Contributor

@haltakov haltakov commented Feb 7, 2026

This PR fixes failures of the build script when the user has a recursive folder structure, but one of the folders is empty. The issue was that the script tries to generate the header image, which doesn't exist.

Fixes #138

@haltakov haltakov marked this pull request as draft February 7, 2026 21:30
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: 7da3dff7d5

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@haltakov haltakov marked this pull request as ready for review February 7, 2026 22:10
@haltakov haltakov requested review from Copilot and rustoma February 7, 2026 22:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes build failures when recursively building galleries that include directories without any media files (resulting in an empty headerImage), and updates related theme-path resolution + package versions.

Changes:

  • Skip social media card generation + header optimization when galleryData.headerImage is empty.
  • Adjust sub-gallery thumbnail path resolution to use resolved subgallery paths and AVIF thumbnail naming.
  • Bump package versions to 2.1.4 across workspace packages / lockfile.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
gallery/src/modules/build/index.ts Guards header/social-card generation when headerImage is empty; adjusts metadata image assignment condition.
common/src/theme/resolver.ts Reuses a computed resolvedPath and passes it into subgallery thumbnail path helper.
common/src/theme/paths.ts Updates subgallery thumbnail path construction (AVIF name + gallery/images location) and adds support for resolved subgallery path.
gallery/package.json Bumps CLI package + workspace dependency versions to 2.1.4.
common/package.json Bumps common package version to 2.1.4.
themes/modern/package.json Bumps theme version and common dependency to 2.1.4.
gallery/src/modules/create-theme/templates/base/package.json Updates @simple-photo-gallery/common peer dependency range to ^2.1.4.
yarn.lock Updates lockfile entries for 2.1.4 versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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: 5724b7fef1

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@haltakov haltakov merged commit 39e77ad into main Feb 7, 2026
7 checks passed
@haltakov haltakov deleted the fix/recursive-build-with-empty-folders branch February 7, 2026 22:17
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.

Input file contains unsupported image format

2 participants