diff --git a/webapp/src/components/App/Studies/StudiesList/index.tsx b/webapp/src/components/App/Studies/StudiesList/index.tsx index 82587d0e12..dba3866d98 100644 --- a/webapp/src/components/App/Studies/StudiesList/index.tsx +++ b/webapp/src/components/App/Studies/StudiesList/index.tsx @@ -285,7 +285,7 @@ function StudiesList(props: StudiesListProps) { > {`${t("studies.scanFolder")} ${folder}?`} diff --git a/webapp/src/components/App/Studies/StudyTree/__test__/fixtures.ts b/webapp/src/components/App/Studies/StudyTree/__test__/fixtures.ts index 5ac08ebfb2..616d018500 100644 --- a/webapp/src/components/App/Studies/StudyTree/__test__/fixtures.ts +++ b/webapp/src/components/App/Studies/StudyTree/__test__/fixtures.ts @@ -238,6 +238,11 @@ export const FIXTURES_BUILD_STUDY_TREE = { name: "root", path: "", children: [ + { + name: "default", + path: "/default", + children: [], + }, { name: "workspace", path: "/workspace", @@ -270,6 +275,11 @@ export const FIXTURES_BUILD_STUDY_TREE = { name: "root", path: "", children: [ + { + name: "default", + path: "/default", + children: [], + }, { name: "workspace", path: "/workspace", diff --git a/webapp/src/components/App/Studies/StudyTree/utils.ts b/webapp/src/components/App/Studies/StudyTree/utils.ts index 87670d03e6..405ecb6ceb 100644 --- a/webapp/src/components/App/Studies/StudyTree/utils.ts +++ b/webapp/src/components/App/Studies/StudyTree/utils.ts @@ -23,9 +23,18 @@ import type { StudyTreeNode, NonStudyFolderDTO } from "./types"; * @returns A tree structure representing the studies. */ export function buildStudyTree(studies: StudyMetadata[]) { + // It is important to initialize the root node with the default workspace as a child + // Otherwise we won't see the default workspace if no study has a path (which only + // happens when a user moves a study to another folder) const tree: StudyTreeNode = { name: "root", - children: [], + children: [ + { + name: "default", + children: [], + path: "/default", + }, + ], path: "", }; diff --git a/webapp/src/redux/ducks/studies.ts b/webapp/src/redux/ducks/studies.ts index 177ed2992d..951f5fc199 100644 --- a/webapp/src/redux/ducks/studies.ts +++ b/webapp/src/redux/ducks/studies.ts @@ -84,7 +84,7 @@ const initialState = studiesAdapter.getInitialState({ filters: { inputValue: "", folder: "root", - strictFolder: true, + strictFolder: false, managed: false, archived: false, variant: false,