From 053a177aab0aafcdd0f79765f3afb64c1c5df779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grabarz?= Date: Tue, 22 Oct 2024 17:26:56 +0200 Subject: [PATCH] do not read removed config --- app/gui/src/project-view/composables/stackNavigator.ts | 2 +- app/gui/src/project-view/stores/project/index.ts | 7 ------- app/ide-desktop/client/src/config.json | 5 ----- app/ide-desktop/client/src/contentConfig.ts | 6 +----- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/gui/src/project-view/composables/stackNavigator.ts b/app/gui/src/project-view/composables/stackNavigator.ts index 487b8370d0..99b3488368 100644 --- a/app/gui/src/project-view/composables/stackNavigator.ts +++ b/app/gui/src/project-view/composables/stackNavigator.ts @@ -35,7 +35,7 @@ export function useStackNavigator(projectStore: ProjectStore, graphStore: GraphS } function stackItemToLabel(item: StackItem, isStackRoot: boolean): string { - if (isStackRoot && isProjectEntryPoint(item)) return projectStore.displayName + if (isStackRoot && isProjectEntryPoint(item)) return projectStore.name const methodName = graphStore.db.stackItemToMethodName(item) return methodName ?? 'unknown' } diff --git a/app/gui/src/project-view/stores/project/index.ts b/app/gui/src/project-view/stores/project/index.ts index 0ea46a61f6..5e755019d9 100644 --- a/app/gui/src/project-view/stores/project/index.ts +++ b/app/gui/src/project-view/stores/project/index.ts @@ -119,12 +119,6 @@ export const { provideFn: provideProjectStore, injectFn: useProjectStore } = cre const projectNameFromCfg = config.value.startup?.project if (projectNameFromCfg == null) throw new Error('Missing project name.') const projectName = ref(projectNameFromCfg) - // Note that `config` is not deeply reactive. This is fine as the config is an immutable object - // passed in from the dashboard, so the entire object will change if any of its nested - // properties change. - const projectDisplayName = computed( - () => config.value.startup?.displayedProjectName ?? projectName, - ) const clientId = random.uuidv4() as Uuid const lsUrls = resolveLsUrl(config.value) @@ -400,7 +394,6 @@ export const { provideFn: provideProjectStore, injectFn: useProjectStore } = cre }, id: projectId, name: readonly(projectName), - displayName: readonly(projectDisplayName), isOnLocalBackend, executionContext, firstExecution, diff --git a/app/ide-desktop/client/src/config.json b/app/ide-desktop/client/src/config.json index b08968f6f5..2bd8fe9daa 100644 --- a/app/ide-desktop/client/src/config.json +++ b/app/ide-desktop/client/src/config.json @@ -26,11 +26,6 @@ "project": { "value": "", "description": "The name of the project to open at startup. If the project does not exist, it will be created." - }, - "displayedProjectName": { - "value": "", - "description": "The name of the project to be displayed to the user.", - "primary": false } } }, diff --git a/app/ide-desktop/client/src/contentConfig.ts b/app/ide-desktop/client/src/contentConfig.ts index 17baade92c..6fa3fe2cc5 100644 --- a/app/ide-desktop/client/src/contentConfig.ts +++ b/app/ide-desktop/client/src/contentConfig.ts @@ -43,8 +43,4 @@ export const VERSION = { import CONFIG from './config.json' assert { type: 'json' } -export const OPTIONS = linkedDist.config.options.merge( - // `valueEval` in `config.json` uses PascalCase scope variables for some reason. - // eslint-disable-next-line @typescript-eslint/naming-convention - linkedDist.config.objectToGroup(CONFIG), -) +export const OPTIONS = linkedDist.config.objectToGroup(CONFIG)