Skip to content

Refactor filesystem path resolution and enhance directory browsing logic#471

Open
stijnpotters1 wants to merge 6 commits into
masterfrom
feat/fallback-directory-picker-path
Open

Refactor filesystem path resolution and enhance directory browsing logic#471
stijnpotters1 wants to merge 6 commits into
masterfrom
feat/fallback-directory-picker-path

Conversation

@stijnpotters1
Copy link
Copy Markdown
Contributor

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

@stijnpotters1 stijnpotters1 self-assigned this May 6, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in Frank!Framework May 6, 2026
@stijnpotters1 stijnpotters1 moved this from In Progress to Review in Frank!Framework May 6, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in Frank!Framework May 6, 2026
@stijnpotters1 stijnpotters1 linked an issue May 6, 2026 that may be closed by this pull request
@stijnpotters1 stijnpotters1 force-pushed the feat/fallback-directory-picker-path branch from 9a922a1 to 675e338 Compare May 12, 2026 14:48
@Matthbo
Copy link
Copy Markdown
Member

Matthbo commented May 13, 2026

This does not really seem to go to the parent directory for me
It goes to / for me on Linux

image image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 BrowseResult record + default browse/browseNearestAccessible/parentPath logic in FileSystemStorage, plus controller refactor to a single try/catch.
  • Frontend filesystemService.browse now returns BrowseResult; getDefaultPath is replaced by resolveNearestAccessiblePath, and DirectoryPicker uses the server-supplied parentPath instead of computing its own.
  • New FileSystemStorageBrowseTest and updated FilesystemControllerTest for 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.

Comment thread src/main/java/org/frankframework/flow/filesystem/FileSystemStorage.java Outdated
Comment thread src/main/frontend/app/services/filesystem-service.ts
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

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.

Can't go back a folder if the folder does not exist

3 participants