Fix and refactor workspace table to allow subfolders#32
Open
obazopaz wants to merge 32 commits into
Open
Conversation
Replace the two-level getGSFilesFromDir loop with collectGSFilesFromDirRecursive() so nested run folders load at arbitrary depth in DFS order. Recurse calcGSUsedSpaceDir() so folder sizes include all descendant file content. https://trello.com/c/QBKArZlk/109-dev-fix-and-refactor-workspace-table-to-allow-subfolders
Replace the flat two-level addTreeTableNodesToFiles() loop with DFS assignTreeIdsRecursive() from the project root, assigning dotted tree_id values (n, n.i, n.i.j) while keeping existing 2-level IDs unchanged. Add sortFilesForTable() so rows render parent-before-children and pending job rows land in tree position; wire it in workspace/index.php. Extend formatData() with tree_depth and omit empty tree_id_parent for templates. https://trello.com/c/QBKArZlk/109-dev-fix-and-refactor-workspace-table-to-allow-subfolders
…ilesFromDirRecursive Handle cases where directory files are not set, ensuring child IDs are correctly populated and processed. https://trello.com/c/QBKArZlk/109-dev-fix-and-refactor-workspace-table-to-allow-subfolders
Introduce getTreeChildrenOrdered() to streamline child file retrieval based on parent ID. https://trello.com/c/QBKArZlk/109-dev-fix-and-refactor-workspace-table-to-allow-subfolders
Add a check to ensure that file data is valid and contains an ID before processing, preventing potential errors during file collection. https://trello.com/c/QBKArZlk/109-dev-fix-and-refactor-workspace-table-to-allow-subfolders
Refactor functions to return unique child nodes and validate file entries before processing. This prevents potential errors and improves the integrity of the file structure during tree operations. https://trello.com/c/QBKArZlk/109-dev-fix-and-refactor-workspace-table-to-allow-subfolders
Add data-order attributes to various table cells in the workspace HTML files to improve sorting functionality. This change ensures that file and folder entries can be sorted based on their respective keys aster adding subfolders rendering. https://trello.com/c/QBKArZlk/109-dev-fix-and-refactor-workspace-table-to-allow-subfolders
Use a list plus usort with id tie-break instead of ksort on order keys, so colliding _print_order values no longer drop rows.
…Data Assign tree_sort/parent_tree_sort during table sorting and expose normalized *_sort_key fields for template data-order attributes.
Load tool icons via __DIR__-relative paths with a skeleton fallback instead of a cwd-dependent relative path.
Shared tree ID, folder-path, and file-record helpers for nested workspace rows.
Disable DataTables global ordering; reorder DOM siblings per parent and persist sort headers across redraws.
Collapse/expand all descendants; sync folder icons and row padding by tree depth.
Lazy file records, folder label cache, and safer drawToolsList rendering for nested rows.
Recursive folder/file check state, ancestor uncheck, and descendant restore on expand.
Updated the tool removal function call to ensure the second parameter is passed as a string.
…ders Eliminating unnecessary folder ID tracking and enhancing the unchecking of ancestor folder checkboxes when no descendant files remain checked.
nicodr97
reviewed
Jul 3, 2026
nicodr97
reviewed
Jul 3, 2026
…etDirsRecursive function
nicodr97
reviewed
Jul 6, 2026
nicodr97
reviewed
Jul 6, 2026
nicodr97
reviewed
Jul 6, 2026
nicodr97
requested changes
Jul 6, 2026
nicodr97
left a comment
Collaborator
There was a problem hiding this comment.
Just a few comments. Also need for more visible difference of folder hierarchy in the workspace table.
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.