From fc92a5e78b46739b38cc20c3ad7be0cd8acc0c22 Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Wed, 23 Sep 2026 18:39:53 +0200 Subject: [PATCH] fix: read app kind from the app listing and ignore an empty version param Co-Authored-By: Claude Opus 5.5 (1M context) --- .../src/lib/components/sidebar/workspaceSwitchUrl.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/sidebar/workspaceSwitchUrl.ts b/frontend/src/lib/components/sidebar/workspaceSwitchUrl.ts index d790c10384..7c668e5cc3 100644 --- a/frontend/src/lib/components/sidebar/workspaceSwitchUrl.ts +++ b/frontend/src/lib/components/sidebar/workspaceSwitchUrl.ts @@ -35,15 +35,13 @@ const scriptHashExists = (workspace: string, hash: string) => const appExists = (raw: boolean): ItemExists => async (workspace, path) => { - try { - return (await AppService.getAppLiteByPath({ workspace, path })).raw_app === raw - } catch { - return false - } + // The listing carries `raw_app` without the app value, and omits it when false. + const [app] = await AppService.listApps({ workspace, pathExact: path, perPage: 1 }) + return !!app && !!app.raw_app === raw } const flowExists: ItemExists = async (workspace, path, search) => { - const version = Number(search.get('version') ?? NaN) + const version = Number(search.get('version') || NaN) if (!Number.isFinite(version)) return FlowService.existsFlowByPath({ workspace, path }) try { return (await FlowService.getFlowVersion({ workspace, version })).path === path