From 426cc98f7c247b7d6f19768a93bed5a57f2778fc Mon Sep 17 00:00:00 2001 From: Phorcys <57866459+phorcys420@users.noreply.github.com> Date: Thu, 20 Nov 2025 10:54:42 +0100 Subject: [PATCH] fix(site/src/modules/apps): distinguish JB Toolbox from Gateway (#20830) Edits the "To use , you need to have Jetbrains Toolbox installed" error message to vary based on JetBrains Toolbox vs. Gateway. --------- Co-authored-by: Jake Howell --- site/src/modules/apps/useAppLink.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/site/src/modules/apps/useAppLink.ts b/site/src/modules/apps/useAppLink.ts index bc51863b5a..00b1c78940 100644 --- a/site/src/modules/apps/useAppLink.ts +++ b/site/src/modules/apps/useAppLink.ts @@ -58,15 +58,19 @@ export const useAppLink = ( const openAppExternallyFailedTimeout = 500; const openAppExternallyFailed = setTimeout(() => { // Check if this is a JetBrains IDE app - const isJetBrainsApp = - app.url && - (app.url.startsWith("jetbrains-gateway:") || - app.url.startsWith("jetbrains:")); + // starts with "jetbrains-gateway://connect#type=coder" (from https://registry.coder.com/modules/coder/jetbrains-gateway) + const isJetBrainsGateway = app.url?.startsWith("jetbrains-gateway:"); + // starts with "jetbrains://gateway/coder" (from https://registry.coder.com/modules/coder/jetbrains) + const isJetBrainsToolbox = app.url?.startsWith("jetbrains:"); // Check if this is a coder:// URL const isCoderApp = app.url?.startsWith("coder:"); - if (isJetBrainsApp) { + if (isJetBrainsGateway) { + displayError( + `To use ${label}, you need to have JetBrains Gateway installed.`, + ); + } else if (isJetBrainsToolbox) { displayError( `To use ${label}, you need to have JetBrains Toolbox installed.`, );