From 73ffe731005fce0ad81d420327782d8eb45966e9 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Wed, 7 May 2025 19:35:00 +0000 Subject: [PATCH 1/2] fix: fill session token when app is external --- site/src/modules/resources/AppLink/AppLink.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/site/src/modules/resources/AppLink/AppLink.tsx b/site/src/modules/resources/AppLink/AppLink.tsx index 58cbad0df457b..d24a75dc82b9b 100644 --- a/site/src/modules/resources/AppLink/AppLink.tsx +++ b/site/src/modules/resources/AppLink/AppLink.tsx @@ -106,12 +106,7 @@ export const AppLink: FC = ({ app, workspace, agent }) => { event.preventDefault(); - // This is an external URI like "vscode://", so - // it needs to be opened with the browser protocol handler. - const shouldOpenAppExternally = - app.external && app.url?.startsWith("http"); - - if (shouldOpenAppExternally) { + if (app.external) { // This is a magic undocumented string that is replaced // with a brand-new session token from the backend. // This only exists for external URLs, and should only @@ -137,6 +132,7 @@ export const AppLink: FC = ({ app, workspace, agent }) => { clearTimeout(openAppExternallyFailed); }); + console.log("URL", url); window.location.href = url; return; } From 7707185b40c9f9f89c7ef8fbf52082945b7ab2cb Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Wed, 7 May 2025 19:52:08 +0000 Subject: [PATCH 2/2] Remove console.log --- site/src/modules/resources/AppLink/AppLink.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/site/src/modules/resources/AppLink/AppLink.tsx b/site/src/modules/resources/AppLink/AppLink.tsx index d24a75dc82b9b..5c4209a8f72c7 100644 --- a/site/src/modules/resources/AppLink/AppLink.tsx +++ b/site/src/modules/resources/AppLink/AppLink.tsx @@ -132,7 +132,6 @@ export const AppLink: FC = ({ app, workspace, agent }) => { clearTimeout(openAppExternallyFailed); }); - console.log("URL", url); window.location.href = url; return; }