Skip to content

Conversation

@benceruleanlu
Copy link
Contributor

This PR adds emptyDirs as an argument to the listuserdata endpoint. Setting emptyDirs=true would also return empty directories, as well as files.

This is set to false by default to prevent breaking any existing references.

This is planned to be used in improved workflow management in the frontend. There was an issue where new folders created through the workflows sidebar wouldn't appear because they contained no files/workflows.

@benceruleanlu benceruleanlu marked this pull request as ready for review April 23, 2025 19:11
@benceruleanlu benceruleanlu marked this pull request as draft April 23, 2025 19:37
@benceruleanlu
Copy link
Contributor Author

Probably not the right place, and I think I should be able to keep changes contained in frontend.

@benceruleanlu
Copy link
Contributor Author

benceruleanlu commented Apr 23, 2025

Am I just losing it?

I can't find anything in the frontend's api.ts that can fetch empty directories. It's restricted to user data, and even then, it's only files through the /userdata endpoint.

Please let me know if there's functionality for this in the frontend already.

Copy link
Contributor

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

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

I actually think we should write a new API endpoint to query userdata. Current endpoint is becoming very verbose. Currently the frontend always call with full_info=true in api.listUserDataFullInfo. The split option is never used. Can you try redesign a API response format for listing user directory? Always return full info and have explicit field on whether the item is a file or it is a directory.

Ref:

@benceruleanlu
Copy link
Contributor Author

Got it — I'll make a new endpoint then open a new PR.

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.

3 participants