Collapse grouped images

Darktable 4.8 on Fedora 40.

I have both grouped and individual images in a folder view. No other filters are enabled—just the single flat folder, no subfolders, either. When I click “Collapse grouped images” in the toolbar, lighttable displays group leads only, not individual images. I often have single images in the workflow, and it is cumbersome to see them only in the visual mess of ungrouped images.

The documentation is moot on the display of individual images, so I do not know if this is a bug or intended behavior:

If grouping is on, the images in a group are represented by a single thumbnail image (the group leader).

For now, I am working around it by artificially creating duplicates. Effectively, I am creating groups even where I do not need them. What do I miss? Is there a preference setting for displaying individual images along with collapsed groups?

Working on build 4.9.0+23~ge4ba3c057b I cannot confirm nor replicate this behaviour.

Every image - being grouped or not - is supposed to get a group id assigned on import.
You may want to confirm the assignment in the image information module.
If you don’t mind, please share a screenshot as well.

1 Like

Are you expecting that multiple small images show up when you collapse instead of just the leader?

This is what I see with the latest development version – note the mixture of groups and individual images:

That is very interesting. Thank you for the confirmation!

Something is off with my images. I just noticed that individual messages show in the collapsed view if I remove them from a group. Also, if I duplicate an individual image, the new image shows in the collapsed view, while the original one does not.

Let me check in the DB.

From what I can see, all individual images that do not show in the collapsed view have NULL as their group_id. Updating the group_id to the image’s id reliably makes it show up in the collapsed view. Likewise setting it back to NULL makes it hidden in the collapsed view.

The only thing that confuses me before proceeding with the bulk update (the DB is backed up) is that the very last image in the folder has group_id as NULL, yet it still shows up in the collapsed view.

That confirms my guess and raises the question of the root cause of the database issue. Might be worth to file an issue in GitHub unless you are aware what caused the group id become missing

I am not sure it is worth it. Now that I think about it, the behavior started somewhere during the v3 to v4 transition. I did not have time to look into it and, for some reason, thought it was the new norm. IIRC, it was a long time ago.

All looks good now that I ran:

update images set group_id = id where group_id is null;

Thanks again!

1 Like

There may be a DB ‘sequence’ that’s used to assign group IDs. If that’s not in sync with the IDs you’ve now assigned, you may see new images grouped with random old ones.

Thank you. I will check what happens on the next import. So far, grouping and ungrouping have worked as expected.