Skip to content

Improve folder editing form#6993

Draft
BartChris wants to merge 2 commits intokitodo:mainfrom
BartChris:folder_editing_stream
Draft

Improve folder editing form#6993
BartChris wants to merge 2 commits intokitodo:mainfrom
BartChris:folder_editing_stream

Conversation

@BartChris
Copy link
Copy Markdown
Collaborator

@BartChris BartChris commented Apr 16, 2026

This PR improves upon #6946.
When i edit folders and in the same UI interaction session also edit the folder usage (Which folder is user to show thumbnails etc.) sometimes the screen gets stuck on Save. It seems to me as if using "parallel stream" is not safe here and has unwanted effects. After my changes i can edit both the general folder settings as well as their usage.

I also improve the file group handlung insofar as when a filegroup of an existing folder is changed to the filegroup of another folder, we do not actually switch the file group.

@BartChris BartChris added the project management project and template related topics label Apr 16, 2026
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 16, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 6 complexity · 0 duplication

Metric Results
Complexity 6
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

private Map<String, Folder> getFolderMap() {
return getFolderList().parallelStream().collect(Collectors.toMap(Folder::getFileGroup, Function.identity()));
return getFolderList().stream()
.filter(folder -> StringUtils.isNotBlank(folder.getFileGroup()))
Copy link
Copy Markdown
Collaborator Author

@BartChris BartChris Apr 16, 2026

Choose a reason for hiding this comment

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

This is a change in behavior. I suppose it is safer, but empty file groups are not forbidden by the UI in general. It might be that they lead to problems downstream.

I will also check whether we can also include blank file groups here.

@BartChris BartChris force-pushed the folder_editing_stream branch from efaacc8 to 43d7dfc Compare April 16, 2026 15:52
@BartChris BartChris marked this pull request as draft April 16, 2026 15:54
@BartChris BartChris changed the title Do not use parallel stream for collecting folders Improve folder editing form Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project management project and template related topics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant