Refactor filesystem path resolution and enhance directory browsing logic#471
Open
stijnpotters1 wants to merge 6 commits into
Open
Refactor filesystem path resolution and enhance directory browsing logic#471stijnpotters1 wants to merge 6 commits into
stijnpotters1 wants to merge 6 commits into
Conversation
9a922a1 to
675e338
Compare
Member
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces the directory-browse flow with a single backend browse(path) operation that walks up to the nearest accessible ancestor when the requested path is missing, and updates the controller, frontend service, directory picker, and modals accordingly. This prevents the UI from getting stuck on a path that no longer exists (e.g. after a project is deleted).
Changes:
- New
BrowseResultrecord + defaultbrowse/browseNearestAccessible/parentPathlogic inFileSystemStorage, plus controller refactor to a single try/catch. - Frontend
filesystemService.browsenow returnsBrowseResult;getDefaultPathis replaced byresolveNearestAccessiblePath, andDirectoryPickeruses the server-suppliedparentPathinstead of computing its own. - New
FileSystemStorageBrowseTestand updatedFilesystemControllerTestfor the new shape.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/org/frankframework/flow/filesystem/BrowseResult.java | New record returned by browse. |
| src/main/java/org/frankframework/flow/filesystem/FileSystemStorage.java | Adds browse default method, recursive ancestor walk, and parentPath helper. |
| src/main/java/org/frankframework/flow/filesystem/FilesystemController.java | /browse returns BrowseResult; root/path branching moved to storage layer. |
| src/test/java/org/frankframework/flow/filesystem/FileSystemStorageBrowseTest.java | New unit tests for browse walk-up behaviour. |
| src/test/java/org/frankframework/flow/filesystem/FilesystemControllerTest.java | Updated assertions to new response shape and method. |
| src/main/frontend/app/types/filesystem.types.ts | Adds BrowseResult interface. |
| src/main/frontend/app/services/filesystem-service.ts | browse returns BrowseResult; replaces getDefaultPath with resolveNearestAccessiblePath. |
| src/main/frontend/app/routes/projectlanding/new-configuration-modal.tsx | Uses resolveNearestAccessiblePath to seed location. |
| src/main/frontend/app/routes/projectlanding/clone-configuration-modal.tsx | Same change as new-configuration modal. |
| src/main/frontend/app/components/directory-picker/directory-picker.tsx | Tracks server-supplied parentPath; removes hand-rolled parent computation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ux directory browsing
|
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.





Added path walker that walks back to nearest available path back in the tree if the project is removed. so this cannot happen anymore
