From 6344f9a089e9add6853d3815d9b7b58f444dbe23 Mon Sep 17 00:00:00 2001 From: tristantr Date: Mon, 8 Jun 2026 18:14:12 +0200 Subject: [PATCH] fix(deploy-to-hub): point Open in Hub link at the project slug, not the workspace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hubSlug was derived from $workspaceStore, so the Open in Hub link and badge used the workspace id instead of the published project slug — navigating to the wrong (or nonexistent) Hub project. Derive hubSlug from the actual project slug (effectiveSlug, falling back to sanitizeSlug(hubName)). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/lib/components/workspaceSettings/DeployToHub.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/workspaceSettings/DeployToHub.svelte b/frontend/src/lib/components/workspaceSettings/DeployToHub.svelte index c818cfe447..34343186df 100644 --- a/frontend/src/lib/components/workspaceSettings/DeployToHub.svelte +++ b/frontend/src/lib/components/workspaceSettings/DeployToHub.svelte @@ -186,8 +186,6 @@ ) const EMPTY_SCHEMA = { type: 'object', properties: {}, required: [] } - let hubSlug = $derived($workspaceStore ?? '') - let hubUrl = $derived(`https://hub.windmill.dev/projects/${hubSlug}`) let hubVersion = $state(0) let deploymentStatus = $state< @@ -225,6 +223,9 @@ let effectiveSlug = $state('') + let hubSlug = $derived(effectiveSlug || sanitizeSlug(hubName)) + let hubUrl = $derived(`https://hub.windmill.dev/projects/${hubSlug}`) + const delay = (ms: number) => new Promise((r) => setTimeout(r, ms)) function patchItem(key: string, patch: Partial) {