Skip to content

feat(library): name folder rolls from the outermost import source - #1780

Open
kurtwindisch wants to merge 1 commit into
marcinz606:mainfrom
kurtwindisch:fix/library-nested-sources
Open

kurtwindisch wants to merge 1 commit into
marcinz606:mainfrom
kurtwindisch:fix/library-nested-sources

Conversation

@kurtwindisch

@kurtwindisch kurtwindisch commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Addresses #1739 and fixes #1540

Problem

  • A folder under two import sources took its roll name from the source that imported it. One year tree split into top-level 2026 and 2026-11 rows in the Library.
  • Discovery stopped at a folder that holds images. A subfolder with images under a roll folder never became a roll, and the Library did not show it.

Change

  • The outermost import source that reaches a folder names its roll. A hidden folder or a folder that matches a Discovery Filter stops a source.
  • A startup migration (migrations/roll_names.py) renames automatic names once. A name the user typed stays. A rename that would take a name another roll keeps is skipped.
  • Discovery walks into roll folders. Discovery Filters keep folders out, and export stays the only default filter.
  • A parent roll sits first inside its folder row, placed by folder path. Delete… on the row names the parent roll in the confirmation, and a roll the Library filter hides is not named.
  • Collapsed folder rows follow a rename.
  • A folder rename or Locate Folder moves import sources and dismissed folders with the folder, and the child rolls take the new name.
  • The Film Strip title shows a folder roll's last name part. The tooltip shows the full name.
  • A roll folder path saved with a trailing slash no longer makes its folder row hold the roll's own folder.

Upgrade note

  • The first launch renames automatic roll names. On one library it renamed 158 of 161 rolls.
  • The first Refresh can add rolls for image subfolders inside roll folders (for example tif or jpg). Add Discovery Filters before the Refresh to keep them out.

Testing

  • make all: 11490 passed.
  • New tests in tests/test_roll_names.py, tests/test_library_tree.py and tests/test_filmstrip_filter_visibility.py.
  • The real app ran on a copy of a real library's settings: no duplicate names, no split year rows, the parent roll first in its row, the Delete text and the Film Strip title correct.
  • Tested by hand in the app: migration, folder rows, Refresh with filters, Film Strip title, folder-row Delete with and without the Library filter.

🤖 Generated with Claude Code

A folder under two import sources took its roll name from whichever
source imported it, so one year tree split into top-level "2026" and
"2026-11" rows. The outermost source that reaches a folder now names its
roll. A startup migration renames the automatic names once and leaves
typed names alone. On one library it renamed 158 of 161 rolls.

- Discovery walks into a roll folder, so a subfolder with images under
  a folder roll becomes a roll too. Discovery Filters keep folders out.
- A parent roll sits first in its folder row, placed by folder path.
  Delete on the row names it in the confirmation.
- Collapsed folder rows follow a rename.
- A folder rename or Locate Folder moves import sources and renames the
  child rolls with the folder.
- Renames settle in rounds, so no two rolls end up with one name.
- The Film Strip title shows a folder roll's last name part, with the
  full name in the tooltip.
- A roll folder path saved with a trailing slash no longer makes its
  folder row claim the roll's own folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kurtwindisch

kurtwindisch commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor Author

A before and after view of my library.

The original source was the Import Subfolders as Rolls starting at Negatives. Later Scan as Rolls imported as sources within the Negatives/2026 file structure and populated as rolls at the top of the library, outside Negatives. After migration, everything sits where it should.

Also the Negatives folder had some loose images, which now show up in their own roll Negatives.

Before --------------------------------------------------------------------After

Screenshot 2026-12-04 at 11 07 34 AM Screenshot 2026-12-04 at 11 05 41 AM

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

Thank you for the pull request. I am on vacation and away from my computer until after Christmas 2026. I will review this pull request when I am back.

This branch has not been deployed

No deployments
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.

[Bug]: Import subfolders as rolls not working

1 participant