fix: remove remaining ?workspace= query params in favor of /w/ prefix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
centdix
2026-03-27 15:11:29 +01:00
parent 1a0c975fa5
commit 91c5e45ebd
17 changed files with 38 additions and 31 deletions

View File

@@ -7,6 +7,7 @@
import ToggleButton from './common/toggleButton-v2/ToggleButton.svelte'
import { Alert, Button } from './common'
import { ExternalLink } from 'lucide-svelte'
import { getWsBase } from '$lib/workspaceUrl'
import TextInput from './text_input/TextInput.svelte'
import Label from './Label.svelte'
import MultiSelect from './select/MultiSelect.svelte'
@@ -189,7 +190,7 @@
variant="default"
target="_blank"
endIcon={{ icon: ExternalLink }}
href="/scripts/add?hub=hub%2F9204%2Fhelper%2FScale%20a%20worker%20group%20deployed%20as%20a%20kubernetes%20service&workspace=admins"
href="{getWsBase('admins')}/scripts/add?hub=hub%2F9204%2Fhelper%2FScale%20a%20worker%20group%20deployed%20as%20a%20kubernetes%20service"
>Create from template
{disabled}
</Button>
@@ -197,7 +198,7 @@
<Button
variant="default"
target="_blank"
href={`/runs/${config.integration.path}?workspace=admins`}
href={`${getWsBase('admins')}/runs/${config.integration.path}`}
endIcon={{ icon: ExternalLink }}
{disabled}
>

View File

@@ -6,8 +6,7 @@
import InviteGlobalUser from '$lib/components/InviteGlobalUser.svelte'
import { Button } from '$lib/components/common'
import { sendUserToast } from '$lib/toast'
import { base } from '$lib/base'
import { wsBase } from '$lib/workspaceUrl'
import { wsBase, getWsBase } from '$lib/workspaceUrl'
import SearchItems from './SearchItems.svelte'
import { page } from '$app/state'
import { goto as gotoUrl } from '$app/navigation'
@@ -202,7 +201,7 @@
<Button
variant="default"
target="_blank"
href="{base}/?workspace=admins"
href="{getWsBase('admins')}/"
endIcon={{ icon: ExternalLink }}
>
Admins workspace
@@ -223,7 +222,7 @@
{#if $workspaceStore !== 'admins'}
<div class="mt-4 pt-2 border-t border-surface-hover">
<a
href="{base}/?workspace=admins"
href="{getWsBase('admins')}/"
target="_blank"
class="flex items-center gap-2 px-2 py-1.5 text-xs text-secondary hover:text-primary transition-colors"
>

View File

@@ -32,6 +32,7 @@
import { selectId } from '../../editor/appUtils'
import { collectOneOfFields } from '../../editor/appUtilsCore'
import { userStore } from '$lib/stores'
import { getWsBase } from '$lib/workspaceUrl'
import { get } from 'svelte/store'
import RefreshButton from '$lib/components/apps/components/helpers/RefreshButton.svelte'
import { ctxRegex } from '../../utils'
@@ -923,7 +924,7 @@
{/if}
{#if lastJobId}
<a
href={`/run/${lastJobId}?workspace=${workspace}`}
href={`${getWsBase(workspace)}/run/${lastJobId}`}
class="font-semibold text-red-800 underline"
target="_blank"
>

View File

@@ -5,7 +5,7 @@
import GitSyncFilterSettings from '$lib/components/workspaceSettings/GitSyncFilterSettings.svelte'
import Toggle from '$lib/components/Toggle.svelte'
import { sendUserToast } from '$lib/toast'
import { workspaceStore } from '$lib/stores'
import { wsBase } from '$lib/workspaceUrl'
import GitSyncModeDisplay from './GitSyncModeDisplay.svelte'
let { idx, mode } = $props<{ idx: number; mode?: 'sync' | 'promotion' }>()
@@ -188,7 +188,7 @@
<a
target="_blank"
class="underline"
href={`/run/${repo.detectionJobId}?workspace=${$workspaceStore}`}
href={`${$wsBase}/run/${repo.detectionJobId}`}
>
{repo.detectionJobId}
</a>

View File

@@ -21,6 +21,7 @@
import Toggle from '$lib/components/Toggle.svelte'
import { fade } from 'svelte/transition'
import { workspaceStore } from '$lib/stores'
import { wsBase } from '$lib/workspaceUrl'
import type { GitSyncRepository } from './GitSyncContext.svelte'
import GitSyncModeDisplay from './GitSyncModeDisplay.svelte'
import { ResourceService, VariableService } from '$lib/gen'
@@ -423,7 +424,7 @@
Git sync resource checked via Windmill job
<a
target="_blank"
href={`/run/${gitSyncTestJob.jobId}?workspace=${$workspaceStore}`}
href={`${$wsBase}/run/${gitSyncTestJob.jobId}`}
class="text-blue-500 hover:underline"
>
{gitSyncTestJob.jobId}

View File

@@ -14,6 +14,7 @@
import GitDiffPreview from '../GitDiffPreview.svelte'
import { JobService } from '$lib/gen'
import { workspaceStore } from '$lib/stores'
import { wsBase } from '$lib/workspaceUrl'
import { sendUserToast } from '$lib/toast'
import hubPaths from '$lib/hubPaths.json'
import { jobManager } from '$lib/services/JobManager'
@@ -333,7 +334,7 @@
<a
target="_blank"
class="underline"
href={`/run/${previewJobId}?workspace=${$workspaceStore}`}
href={`${$wsBase}/run/${previewJobId}`}
>
{previewJobId}
</a>
@@ -550,7 +551,7 @@
<a
target="_blank"
class="underline"
href={`/run/${applyJobId}?workspace=${$workspaceStore}`}
href={`${$wsBase}/run/${applyJobId}`}
>
{applyJobId}
</a>

View File

@@ -5,6 +5,7 @@
import GitDiffPreview from '../GitDiffPreview.svelte'
import { JobService } from '$lib/gen'
import { workspaceStore } from '$lib/stores'
import { wsBase } from '$lib/workspaceUrl'
import hubPaths from '$lib/hubPaths.json'
import { jobManager } from '$lib/services/JobManager'
import type { SyncResponse, SettingsObject } from '$lib/git-sync'
@@ -220,7 +221,7 @@
<a
target="_blank"
class="underline"
href={`/run/${previewJobId}?workspace=${$workspaceStore}`}
href={`${$wsBase}/run/${previewJobId}`}
>
{previewJobId}
</a>
@@ -296,7 +297,7 @@
<a
target="_blank"
class="underline"
href={`/run/${applyJobId}?workspace=${$workspaceStore}`}
href={`${$wsBase}/run/${applyJobId}`}
>
{applyJobId}
</a>

View File

@@ -1,6 +1,7 @@
<script lang="ts">
import { JobService, type QueuedJob } from '$lib/gen'
import { workspaceStore } from '$lib/stores'
import { getWsBase } from '$lib/workspaceUrl'
import { ExternalLink } from 'lucide-svelte'
import Skeleton from '../common/skeleton/Skeleton.svelte'
import { displayDate } from '$lib/utils'
@@ -41,7 +42,7 @@
<div class="flex">
<a
target="_blank"
href={`/run/${job.id}?workspace=${job.workspace_id}`}
href={`${getWsBase(job.workspace_id)}/run/${job.id}`}
class="flex flex-row gap-2 items-center font-mono mr-8"
>{job.id} <ExternalLink size={10} />
</a>

View File

@@ -18,8 +18,7 @@
import List from '$lib/components/common/layout/List.svelte'
import Toggle from '$lib/components/Toggle.svelte'
import { BellOff, Bell, ExternalLink, Settings } from 'lucide-svelte'
import { base } from '$lib/base'
import { wsBase } from '$lib/workspaceUrl'
import { wsBase, getWsBase } from '$lib/workspaceUrl'
import Notification from '$lib/components/common/alert/Notification.svelte'
interface Props {
@@ -263,7 +262,7 @@
<Button
size="xs"
color="light"
href="{base}/?workspace=admins#superadmin-settings"
href="{getWsBase('admins')}/#superadmin-settings"
target="_blank"
>
<div class="w-full">

View File

@@ -38,6 +38,7 @@
errorHandlerArgs,
slackErrorHandlerHubPathEnding
} from '../ErrorOrRecoveryHandler.svelte'
import { toWorkspacePath } from '$lib/workspaceUrl'
type Props = {
triggerPath: string
@@ -430,7 +431,7 @@
<Row
hoverable
on:click={() => window.open(`/run/${job.id}?workspace=${workspace}`, '_blank')}
on:click={() => window.open(toWorkspacePath(`/run/${job.id}`, workspace), '_blank')}
>
<Cell class="w-12 sm:pl-3" shouldStopPropagation>
<div class="h-4 w-4">

View File

@@ -18,6 +18,7 @@
import { logoutWithRedirect } from '$lib/logoutKit'
import { page } from '$app/state'
import { usersWorkspaceStore, workspaceStore } from '$lib/stores'
import { wsBase } from '$lib/workspaceUrl'
import CenteredModal from '$lib/components/CenteredModal.svelte'
import { Button } from '$lib/components/common'
import Toggle from '$lib/components/Toggle.svelte'
@@ -454,7 +455,7 @@
<a
target="_blank"
class="underline"
href={`/run/${job.id}?workspace=${$workspaceStore}`}
href={`${$wsBase}/run/${job.id}`}
>
{job.id}
</a>
@@ -479,7 +480,7 @@
<a
target="_blank"
class="underline"
href={`/run/${jobId}?workspace=${$workspaceStore}`}
href={`${$wsBase}/run/${jobId}`}
>
{jobId}
</a>

View File

@@ -194,10 +194,10 @@
goto(`/flows/edit/${e.path}?selected=${e.id}`)
}}
onDeploy={(e) => {
goto(`/flows/get/${e.path}?workspace=${$workspaceStore}`)
goto(`/flows/get/${e.path}`)
}}
onDetails={(e) => {
goto(`/flows/get/${e.path}?workspace=${$workspaceStore}`)
goto(`/flows/get/${e.path}`)
}}
{initialPath}
{pathStoreInit}

View File

@@ -280,10 +280,10 @@
{:else}
<FlowBuilder
onDeploy={(e) => {
goto(`/flows/get/${e.path}?workspace=${$workspaceStore}`)
goto(`/flows/get/${e.path}`)
}}
onDetails={(e) => {
goto(`/flows/get/${e.path}?workspace=${$workspaceStore}`)
goto(`/flows/get/${e.path}`)
}}
onSaveDraftOnlyAtNewPath={(e) => {
goto(`/flows/edit/${e.path}?selected=${e.selectedId}`)

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import { wsBase } from '$lib/workspaceUrl'
import { wsBase, getWsBase } from '$lib/workspaceUrl'
import {
JobService,
type Job,
@@ -456,7 +456,7 @@
variant="default"
unifiedSize="md"
on:click={() => {
goto(`/run/${page.params.run}?workspace=${workspace.id}`)
goto(`${getWsBase(workspace.id)}/run/${page.params.run}`)
}}
>
See in {workspace.name}

View File

@@ -161,7 +161,7 @@
lockedLanguage={templatePath != null || hubPath != null}
template={importedWacTemplate ?? (wacParam === 'python' ? 'wac_python' : wacParam === 'typescript' ? 'wac_typescript' : 'script')}
onDeploy={(e) => {
goto(`/scripts/get/${e.hash}?workspace=${$workspaceStore}`)
goto(`/scripts/get/${e.hash}`)
}}
onSaveInitial={(e) => {
goto(`/scripts/edit/${e.path}`)

View File

@@ -214,13 +214,13 @@
{savedPrimarySchedule}
searchParams={page.url.searchParams}
onDeploy={(e) => {
goto(`/scripts/get/${e.hash}?workspace=${$workspaceStore}`)
goto(`/scripts/get/${e.hash}`)
}}
onSaveInitial={(e) => {
goto(`/scripts/edit/${e.path}`)
}}
onSeeDetails={(e) => {
goto(`/scripts/get/${e.path}?workspace=${$workspaceStore}`)
goto(`/scripts/get/${e.path}`)
}}
replaceStateFn={(path) => {
replaceState(path, page.state)

View File

@@ -30,6 +30,7 @@
workspaceStore,
userWorkspaces
} from '$lib/stores'
import { getWsBase } from '$lib/workspaceUrl'
import { sendUserToast } from '$lib/toast'
import { displayDate, groupBy, pluralize, retrieveCommonWorkerPrefix, truncate } from '$lib/utils'
import {
@@ -1100,7 +1101,7 @@
{#if (!config || config?.dedicated_worker == undefined) && ($superadmin || $devopsRole)}
<Cell class="text-secondary">
{#if last_job_id}
<a href={`/run/${last_job_id}?workspace=${last_job_workspace_id}`}>
<a href={`${getWsBase(last_job_workspace_id)}/run/${last_job_id}`}>
View last job
<ExternalLink size={12} class="inline-block" />
</a>