From 070dc488e691e84b14e53bbfaac83f8cf50a999e Mon Sep 17 00:00:00 2001 From: Guilhem Date: Wed, 4 Nov 2026 22:25:24 +0100 Subject: [PATCH] fix: make in-app navigation targets real links for new-tab clicks (#12202) * fix: open list rows in a new tab on middle and ctrl/cmd-click Co-Authored-By: Claude Opus 5.5 * test: cover openOnNewTabClick nested-control and modifier handling Co-Authored-By: Claude Opus 5.5 * refactor: drop the JS new-tab handler from run rows, keep only real links Co-Authored-By: Claude Opus 5.5 * fix: make in-app navigation targets real links across the frontend Co-Authored-By: Claude Opus 5.5 * fix: share one modified-click predicate and keep run args out of edit links Co-Authored-By: Claude Opus 5.5 * fix: decode group deep-link hashes before matching names Co-Authored-By: Claude Opus 5.5 * fix: encode group names in deep-link hashes Co-Authored-By: Claude Opus 5.5 * fix: keep converted link rows in their text colour and palette links out of tab order Co-Authored-By: Claude Opus 5.5 * fix: clear the resource-type hash on close, close run menus on middle-click Co-Authored-By: Claude Opus 5.5 * fix: run portalled picker and palette link handlers before sveltekit follows the href Co-Authored-By: Claude Opus 5.5 * fix: encode native-trigger ids in deep-link hashes Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 Co-authored-by: Ruben Fiszel --- .../lib/components/BreadcrumbNavPicker.svelte | 4 + .../lib/components/BreadcrumbSegment.svelte | 6 +- .../lib/components/ContentSearchInner.svelte | 19 ++-- .../components/ContentSearchInnerItem.svelte | 5 +- .../src/lib/components/DeployButton.svelte | 27 ++++-- .../lib/components/DevWorkspaceSetting.svelte | 52 ++++++----- frontend/src/lib/components/DraftBadge.svelte | 3 +- .../src/lib/components/DrillPicker.svelte | 34 +++++-- .../src/lib/components/DropdownMenu.svelte | 68 +++++++++----- .../src/lib/components/EditorHeader.svelte | 4 + .../src/lib/components/FlowBuilder.svelte | 51 ++++++----- .../src/lib/components/FlowMetadata.svelte | 11 ++- .../lib/components/ForkWorkspaceBanner.svelte | 58 ++++++------ .../src/lib/components/SavedInputsV2.svelte | 5 +- .../src/lib/components/ScriptBuilder.svelte | 26 +++--- .../components/ScriptVersionHistory.svelte | 6 +- .../components/SuperadminSettingsInner.svelte | 14 ++- .../components/WorkspaceDraftsBanner.svelte | 19 ++-- .../WorkspaceItemDrillPicker.svelte | 8 ++ .../components/display/AppNavbarItem.svelte | 16 ++-- .../apps/editor/AppEditorHeader.svelte | 5 +- .../apps/editor/DeploymentHistory.svelte | 6 +- .../AssetGraph/PipelineFolderList.svelte | 23 +++-- .../components/common/button/Button.svelte | 2 + .../common/sidebar/SidebarNavigation.svelte | 7 +- .../components/copilot/StepInputsGen.svelte | 5 +- .../copilot/chat/JobsSegment.svelte | 8 +- .../copilot/chat/RunScriptCard.svelte | 7 +- .../copilot/chat/ToolPreviewCard.svelte | 15 +++- .../details/DetailPageHeader.svelte | 7 +- .../lib/components/details/FlowDetail.svelte | 5 +- .../components/details/ScriptDetail.svelte | 11 +-- .../lib/components/details/interceptNav.ts | 5 +- frontend/src/lib/components/flow_builder.ts | 2 + .../components/flows/CreateActionsApp.svelte | 26 +++--- .../components/flows/CreateActionsFlow.svelte | 49 ++++------ .../components/flows/FlowHistoryInner.svelte | 7 +- .../src/lib/components/flows/agentActions.ts | 15 +--- .../flows/common/FlowCardHeader.svelte | 10 +-- .../flows/content/AgentDetailPage.svelte | 8 +- .../flows/content/FlowEditorDrawer.svelte | 18 ++-- .../components/home/CreateActionsMenu.svelte | 41 ++++----- .../instanceGroups/InstanceGroupsTable.svelte | 35 +++++++- .../components/raw_apps/RawAppEditor.svelte | 4 + .../raw_apps/RawAppEditorHeader.svelte | 14 ++- .../components/resources/ResourcesList.svelte | 90 +++++++++++-------- .../src/lib/components/runs/RunDetail.svelte | 16 ++-- .../src/lib/components/runs/RunsTable.svelte | 27 +++--- .../components/schedules/SchedulesList.svelte | 10 +-- frontend/src/lib/components/script_builder.ts | 2 + .../search/GlobalSearchModal.svelte | 75 ++++++++-------- .../components/search/QuickMenuItem.svelte | 23 ++++- .../lib/components/search/RunsSearch.svelte | 1 + .../sessions/PreviewRouterPicker.svelte | 7 +- .../sessions/SessionStatusPopover.svelte | 36 +++++--- .../sessions/WorkspaceFamilyPicker.svelte | 5 +- .../sidebar/CriticalAlertModalInner.svelte | 12 ++- .../components/sidebar/SettingsMenu.svelte | 7 +- .../components/sidebar/SidebarUsage.svelte | 7 +- .../lib/components/sidebar/UserMenu.svelte | 9 +- .../sidebar/WorkspacePickerBody.svelte | 5 +- .../components/triggers/TriggerList.svelte | 10 +-- .../triggers/TriggerSuspendedJobsModal.svelte | 17 ++-- .../triggers/native/NativeTriggerTable.svelte | 13 +-- .../components/variables/VariablesList.svelte | 4 +- frontend/src/lib/navigation.test.ts | 31 ++++++- frontend/src/lib/navigation.ts | 9 ++ .../src/routes/(root)/(logged)/+layout.svelte | 5 +- .../apps_raw/edit/[...path]/+page.svelte | 2 +- .../flows/edit/[...path]/+page.svelte | 4 +- .../[service_name]/+page.svelte | 33 ++++++- .../(logged)/pipeline/[folder]/+page.svelte | 4 +- .../remote_deploy/callback/+page.svelte | 2 +- .../scripts/edit/[...path]/+page.svelte | 4 +- .../(root)/(logged)/sessions/+page.svelte | 2 +- .../user/(user)/first-time/+page.svelte | 26 +++--- .../(logged)/workspace_settings/+page.svelte | 18 ++-- .../user/forgot-password/+page.svelte | 5 +- .../user/login_link_expired/+page.svelte | 3 +- .../(styled)/user/reset-password/+page.svelte | 9 +- 80 files changed, 799 insertions(+), 505 deletions(-) diff --git a/frontend/src/lib/components/BreadcrumbNavPicker.svelte b/frontend/src/lib/components/BreadcrumbNavPicker.svelte index 33b688c206..48479efd92 100644 --- a/frontend/src/lib/components/BreadcrumbNavPicker.svelte +++ b/frontend/src/lib/components/BreadcrumbNavPicker.svelte @@ -128,6 +128,10 @@ highlighted, a workspace page inside Pages with that page highlighted. {currentItem} artifacts={artifacts?.items} workspaceId={actingWorkspaceId} + targetHref={(target) => { + const href = hrefFor(target) + return href ? withWorkspace(href) : undefined + }} onPick={pick} /> {/snippet} diff --git a/frontend/src/lib/components/BreadcrumbSegment.svelte b/frontend/src/lib/components/BreadcrumbSegment.svelte index 4d55675f26..f95f3f2dcf 100644 --- a/frontend/src/lib/components/BreadcrumbSegment.svelte +++ b/frontend/src/lib/components/BreadcrumbSegment.svelte @@ -30,6 +30,8 @@ close siblings. /** Load the picker's items from this workspace (session editors pass their * acting workspace); falls back to $workspaceStore inside the picker. */ workspaceId?: string + /** Where picking an item navigates; see `WorkspaceItemDrillPicker`. */ + itemHref?: (item: WorkspaceItem) => string } let { @@ -42,7 +44,8 @@ close siblings. isCurrent = false, currentItem, onPick, - workspaceId + workspaceId, + itemHref }: Props = $props() let isOpen = $state(false) @@ -80,6 +83,7 @@ close siblings. {initialHighlight} {currentItem} {workspaceId} + {itemHref} onPick={handlePick} /> {/snippet} diff --git a/frontend/src/lib/components/ContentSearchInner.svelte b/frontend/src/lib/components/ContentSearchInner.svelte index 6690e0c0bf..3338efc62d 100644 --- a/frontend/src/lib/components/ContentSearchInner.svelte +++ b/frontend/src/lib/components/ContentSearchInner.svelte @@ -20,8 +20,13 @@ import { twMerge } from 'tailwind-merge' import ContentSearchInnerItem from './ContentSearchInnerItem.svelte' import { createEventDispatcher, untrack } from 'svelte' + import { isNewTabClick } from '$lib/navigation' const dispatch = createEventDispatcher() + + function closeUnlessNewTab(e?: Event) { + if (!(e instanceof MouseEvent && isNewTabClick(e))) dispatch('close') + } interface Props { search?: string } @@ -249,7 +254,7 @@ @@ -281,7 +286,7 @@ {#each filteredResourceItems.slice(0, showNbResources) ?? [] as item} {#snippet actions()} @@ -294,7 +299,11 @@ {/snippet} {/if} - {/snippet} @@ -325,7 +334,7 @@ @@ -365,7 +374,7 @@ diff --git a/frontend/src/lib/components/ContentSearchInnerItem.svelte b/frontend/src/lib/components/ContentSearchInnerItem.svelte index 9847376a50..d2a624353f 100644 --- a/frontend/src/lib/components/ContentSearchInnerItem.svelte +++ b/frontend/src/lib/components/ContentSearchInnerItem.svelte @@ -1,5 +1,6 @@ + {#snippet protectionsPanel(opts: { title: string rules: ReturnType - onOpen?: (name?: string) => void + open?: RulesetsLink editLabel: string manageLabel: string })} - {@const onOpen = opts.onOpen} + {@const open = opts.open} {@const rules = opts.rules}
{opts.title} @@ -397,12 +406,13 @@ Applied by this pairing {/if}
- {#if onOpen} + {#if open} @@ -412,9 +422,9 @@ {/if} {/if} - {#if onOpen && rules.enforcingRulesets.length === 0} + {#if open && rules.enforcingRulesets.length === 0}
-
@@ -435,7 +445,7 @@ {@render protectionsPanel({ title: 'Protections in force on this workspace', rules: ownRules, - onOpen: openRulesets, + open: ownRulesetsLink, editLabel: 'Edit', manageLabel: 'Manage in Rulesets' })} @@ -547,7 +557,7 @@ @@ -605,7 +615,7 @@ {@render protectionsPanel({ title: `Protections in force on ${parentId}`, rules: parentRules, - onOpen: canEditParentRules ? openRulesetsInParent : undefined, + open: parentRulesetsLink, editLabel: `Edit in ${parentId}`, manageLabel: `Manage in ${parentId}` })} diff --git a/frontend/src/lib/components/DraftBadge.svelte b/frontend/src/lib/components/DraftBadge.svelte index 8ea0b6e044..5dc3297add 100644 --- a/frontend/src/lib/components/DraftBadge.svelte +++ b/frontend/src/lib/components/DraftBadge.svelte @@ -23,7 +23,6 @@ import { GitCompareArrows, Pencil, Wrench } from 'lucide-svelte' import { DraftService, type UserDraftItemKind } from '$lib/gen' import { sendUserToast } from '$lib/toast' - import { goto } from '$lib/navigation' import { OtherUserDraftLoad, editRouteFor } from '$lib/components/otherUserDraftLoad.svelte' import { fetchDeployedValueForDiff } from '$lib/components/otherUserDraftDiff' import { roleCapabilities, userStore } from '$lib/stores' @@ -328,7 +327,7 @@ variant="subtle" size="xs3" startIcon={{ icon: Pencil }} - on:click={() => goto(editRouteFor(itemKind, path))} + href={editRouteFor(itemKind, path)} > Edit diff --git a/frontend/src/lib/components/DrillPicker.svelte b/frontend/src/lib/components/DrillPicker.svelte index a92ef11ddf..bff56304fc 100644 --- a/frontend/src/lib/components/DrillPicker.svelte +++ b/frontend/src/lib/components/DrillPicker.svelte @@ -35,6 +35,7 @@ leaves and ignores the current scope. import Badge from '$lib/components/common/badge/Badge.svelte' import type { BadgeColor } from '$lib/components/common/badge/model' import Button from '$lib/components/common/button/Button.svelte' + import { isNewTabClick } from '$lib/navigation' interface Props { tree: DrillNode[] @@ -88,6 +89,11 @@ leaves and ignores the current scope. /** Status badge on the right of a leaf row. Returns `undefined` for a leaf with * nothing to report. The hover action, when there is one, covers it. */ leafBadge?: (leaf: DrillLeaf) => { label: string; color: BadgeColor } | undefined + /** Where picking a leaf navigates, for a host whose pick is a navigation. The row then + * renders as a link: a plain click still goes through `onPick`, while a middle or + * ⌘/Ctrl-click opens it in a new tab — taking ⌘/Ctrl-click from `leafAction`, which + * keeps ⌘/Ctrl-Enter. */ + leafHref?: (leaf: DrillLeaf) => string | undefined } let { @@ -106,7 +112,8 @@ leaves and ignores the current scope. rootLoading = false, rowTooltip, leafAction, - leafBadge + leafBadge, + leafHref }: Props = $props() let searchInput: TextInput | undefined = $state() @@ -517,6 +524,7 @@ leaves and ignores the current scope. {@const tip = rowTooltip?.(leaf)} {@const action = leaf.disabled ? undefined : leafAction?.(leaf)} {@const badge = leafBadge?.(leaf)} + {@const href = leaf.disabled ? undefined : leafHref?.(leaf)} @@ -533,8 +541,10 @@ leaves and ignores the current scope. }} onmouseleave={tooltipLeave} > - + {#if item.href} + onRowClick(item, e)} + onauxclick={(e) => { + if (e.button === 1) onRowClick(item, e) + }} + onmouseenter={() => item.onHover?.(true)} + onmouseleave={() => item.onHover?.(false)} + > + {@render rowContent(item)} + + {:else} + + {/if} {/each} {#if items.length === 0} diff --git a/frontend/src/lib/components/EditorHeader.svelte b/frontend/src/lib/components/EditorHeader.svelte index a44568560c..6aceb138e8 100644 --- a/frontend/src/lib/components/EditorHeader.svelte +++ b/frontend/src/lib/components/EditorHeader.svelte @@ -4,6 +4,7 @@ import PathEditPopover from '$lib/components/PathEditPopover.svelte' import { dirKey, + editPathFor, KIND_LABEL_LOWER, kindKey, leafKeyFor, @@ -106,6 +107,7 @@ isCurrent={!segments} {currentItem} {workspaceId} + itemHref={editPathFor} onPick={handlePickerSelect} /> {#if segments} @@ -121,6 +123,7 @@ initialHighlight={dKey} {currentItem} {workspaceId} + itemHref={editPathFor} onPick={handlePickerSelect} /> {/each} @@ -137,6 +140,7 @@ isCurrent {currentItem} {workspaceId} + itemHref={editPathFor} onPick={handlePickerSelect} /> {/if} diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index 2bde40fb0f..6d267c8958 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -109,7 +109,7 @@ import FlowYamlEditor from './flows/header/FlowYamlEditor.svelte' import { type TriggerContext, type ScheduleTrigger } from './triggers' import type { SavedAndModifiedValue } from './common/confirmationModal/unsavedTypes' - import DeployButton from './DeployButton.svelte' + import DeployButton, { type DeployDropdownItem } from './DeployButton.svelte' import OpenInSessionButton from './sessions/OpenInSessionButton.svelte' import { invalidateWorkspacePaths } from './PathNameAutocomplete.svelte' import type { Trigger } from './triggers/utils' @@ -191,6 +191,7 @@ onDeploy, onDeployError, onDetails, + detailsHref, onHistoryRestore, onNavigate, onResetToDeployed, @@ -1293,42 +1294,44 @@ ] } - const dropdownItems: Array<{ - label: string - onClick: () => void - }> = [] + const showDetailsItem = !newFlow && savedFlow?.no_deployed !== true && !inSessionPane + const showExtraDeployOptions = untrack(() => customUi).topBar?.extraDeployOptions != false + const showForkItems = !untrack(() => newFlow) && !inSessionPane + const showEditInFork = + showForkItems && !isCloudHosted() && editInForkAllowed(opWorkspace, $userWorkspaces) - if (untrack(() => customUi).topBar?.extraDeployOptions != false) { + // A function, so the hrefs follow `initialPath`, which the edit page sets once the draft loads. + function dropdownItems(): DeployDropdownItem[] { + const items: DeployDropdownItem[] = [] + if (!showExtraDeployOptions) return items // None of these belong to a session pane: each leaves the editor for a details page or // a new tab, which the session's own tabs already reach. The deploy button is then plain. - if (!newFlow && savedFlow?.no_deployed !== true && !inSessionPane) { - dropdownItems.push({ - label: 'Exit & see details', - // Use the deployed path, not the live `$pathStore` — the latter - // reflects local rename edits that haven't been deployed yet, - // which would land the user on a 404 details page. - onClick: () => onDetails?.({ path: initialPath }) - }) + if (showDetailsItem) { + // Use the deployed path, not the live `$pathStore` — the latter + // reflects local rename edits that haven't been deployed yet, + // which would land the user on a 404 details page. + items.push( + detailsHref + ? { label: 'Exit & see details', href: detailsHref(initialPath) } + : { label: 'Exit & see details', onClick: () => onDetails?.({ path: initialPath }) } + ) } - if (!untrack(() => newFlow) && !inSessionPane) { - dropdownItems.push({ + if (showForkItems) { + items.push({ label: 'Fork', - onClick: () => window.open(`/flows/add?template=${initialPath}`) + href: `/flows/add?template=${initialPath}`, + hrefTarget: '_blank' }) } - if ( - !untrack(() => newFlow) && - !inSessionPane && - !isCloudHosted() && - editInForkAllowed(opWorkspace, $userWorkspaces) - ) { - dropdownItems.push({ + if (showEditInFork) { + items.push({ label: editInForkLabel(opWorkspace, $userWorkspaces), onClick: () => openEditInFork('flow', initialPath, opWorkspace) }) } + return items } /** Deployed versions for the diff picker, newest first. Best-effort: losing the diff --git a/frontend/src/lib/components/FlowMetadata.svelte b/frontend/src/lib/components/FlowMetadata.svelte index ccda612c35..145d83ab64 100644 --- a/frontend/src/lib/components/FlowMetadata.svelte +++ b/frontend/src/lib/components/FlowMetadata.svelte @@ -4,6 +4,7 @@ import { flowPathToHref } from '$lib/scripts' import { agentRunHref } from '$lib/components/flows/conversations/agentEditorChat' import { displayDate, truncateRev } from '$lib/utils' + import { isNewTabClick } from '$lib/navigation' import ScheduleEditor from '$lib/components/triggers/schedules/ScheduleEditor.svelte' import TimeAgo from './TimeAgo.svelte' import { workspaceStore } from '$lib/stores' @@ -79,12 +80,14 @@ Schedule: - - scheduleEditor?.openEdit(job.schedule_path ?? '', job.job_kind == 'flow')} + onclick={(e) => { + if (isNewTabClick(e)) return + e.preventDefault() + scheduleEditor?.openEdit(job.schedule_path ?? '', job.job_kind == 'flow') + }} > {truncateRev(job.schedule_path, 40)} diff --git a/frontend/src/lib/components/ForkWorkspaceBanner.svelte b/frontend/src/lib/components/ForkWorkspaceBanner.svelte index c27e2e9693..f7c6b0b1c0 100644 --- a/frontend/src/lib/components/ForkWorkspaceBanner.svelte +++ b/frontend/src/lib/components/ForkWorkspaceBanner.svelte @@ -12,7 +12,6 @@ import type { WorkspaceComparison } from '$lib/gen' import { fetchWorkspaceComparison } from '$lib/workspaceComparison' import { Button } from './common' - import { goto } from '$app/navigation' import { onDestroy, onMount, untrack } from 'svelte' import { homeActionsGathered, @@ -149,36 +148,24 @@ } } - // Opens the direction the button offers, so the label and the list agree: a fork - // with nothing to deploy lands on the update side, not on an empty deploy list. /** The compare page opened on one direction, for a badge that counts exactly that. The button * beside them still chooses on the reader's behalf; a badge means the one thing it names. */ - function openCompareDir(dir: 'deploy_to' | 'update') { - if (!parentWorkspaceId || !$workspaceStore) return - goto( + function compareDirHref(dir: 'deploy_to' | 'update'): string | undefined { + if (!parentWorkspaceId || !$workspaceStore) return undefined + return ( '/forks/compare?workspace_id=' + - encodeURIComponent($workspaceStore) + - (dir === 'update' ? '&dir=update' : ''), - { replaceState: true } + encodeURIComponent($workspaceStore) + + (dir === 'update' ? '&dir=update' : '') ) } + const deployToHref = $derived(compareDirHref('deploy_to')) + const updateHref = $derived(compareDirHref('update')) - function openComparisonDrawer() { - if (parentWorkspaceId && $workspaceStore) { - const dir = hasAnswer && changesAhead === 0 ? '&dir=update' : '' - goto('/forks/compare?workspace_id=' + encodeURIComponent($workspaceStore) + dir, { - replaceState: true - }) - } - } - - function openDraftCompare() { - if ($workspaceStore) { - goto('/forks/compare?workspace_id=' + encodeURIComponent($workspaceStore) + '&mode=draft', { - replaceState: true - }) - } - } + const draftCompareHref = $derived( + $workspaceStore + ? '/forks/compare?workspace_id=' + encodeURIComponent($workspaceStore) + '&mode=draft' + : undefined + ) // Counted with the compare page's own predicate so the banner never advertises a // direction whose list is empty: the `ahead`/`behind` sums in the summary include @@ -189,6 +176,11 @@ } const changesAhead = $derived(countDir(comparison, true)) const changesBehind = $derived(countDir(comparison, false)) + // Opens the direction the button offers, so the label and the list agree: a fork + // with nothing to deploy lands on the update side, not on an empty deploy list. + const comparisonHref = $derived( + compareDirHref(hasAnswer && changesAhead === 0 ? 'update' : 'deploy_to') + ) // Folded into Home's ⋮ menu, the badges and the button are one row that says what they counted. const menuId = homeHeaderMenu.register(0, () => { @@ -197,7 +189,7 @@ return [ { displayName: `Review & deploy ${draftCount} draft${draftCount !== 1 ? 's' : ''}`, - action: openDraftCompare + href: draftCompareHref } ] } @@ -214,7 +206,7 @@ displayName: !hasAnswer || changesAhead > 0 ? 'Review changes' : `Review & Update ${currentNoun}`, description: hasAnswer && counts.length > 0 ? counts.join(' · ') : undefined, - action: openComparisonDrawer + href: comparisonHref } ] }) @@ -278,7 +270,7 @@ color="green" small clickable - onclick={() => openCompareDir('deploy_to')} + href={deployToHref} title="{changesAhead} ahead of {parentWorkspaceId} — review what this {currentNoun} has to give" > @@ -290,7 +282,7 @@ color="blue" small clickable - onclick={() => openCompareDir('update')} + href={updateHref} title="{changesBehind} behind {parentWorkspaceId} — review what this {currentNoun} has yet to take" > @@ -304,7 +296,7 @@ color="orange" small clickable - onclick={() => openCompareDir('deploy_to')} + href={deployToHref} title="{conflicts} conflicting item{conflicts !== 1 ? 's' : ''} — review them" > @@ -322,7 +314,7 @@ color="blue" small clickable - onclick={openDraftCompare} + href={draftCompareHref} title="{draftCount} draft{draftCount !== 1 ? 's' : ''} in this {currentNoun}, not deployed anywhere yet — review and deploy" @@ -338,7 +330,7 @@ diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte index 732ee156fa..b852db2c98 100644 --- a/frontend/src/lib/components/ScriptBuilder.svelte +++ b/frontend/src/lib/components/ScriptBuilder.svelte @@ -119,7 +119,7 @@ import type { ScheduleTrigger, TriggerContext } from './triggers' import CaptureTable from './triggers/CaptureTable.svelte' import type { SavedAndModifiedValue } from './common/confirmationModal/unsavedTypes' - import DeployButton from './DeployButton.svelte' + import DeployButton, { type DeployDropdownItem } from './DeployButton.svelte' import { type Trigger, deployTriggers, handleSelectTriggerFromKind } from './triggers/utils' import DraftChangesConfirmationModal from './common/confirmationModal/DraftChangesConfirmationModal.svelte' import PerpetualRunsDeployModal from './scripts/PerpetualRunsDeployModal.svelte' @@ -172,6 +172,7 @@ onDeploy, onDeployError, onSeeDetails, + seeDetailsHref, onNavigate, onTestJob, disableAi, @@ -1245,22 +1246,21 @@ initialPath: string, savedScript: ((Script | NewScript) & { no_deployed?: boolean }) | undefined ) { - let dropdownItems: { label: string; onClick: (deploymentMsg: string) => void }[] = + let dropdownItems: DeployDropdownItem[] = initialPath != '' && customUi?.topBar?.extraDeployOptions != false ? [ ...(!inSessionPane ? [ { label: 'Deploy & Stay here', - onClick: (deploymentMsg) => { + onClick: (deploymentMsg: string) => { handleEditScript(true, deploymentMsg) } }, { label: 'Fork', - onClick: () => { - window.open(`/scripts/add?template=${initialPath}`) - } + href: `/scripts/add?template=${initialPath}`, + hrefTarget: '_blank' as const }, ...(!isCloudHosted() && editInForkAllowed(opWorkspace, $userWorkspaces) ? [ @@ -1279,12 +1279,14 @@ script.kind === 'script' && !script.auto_kind ? [ - { - label: 'Exit & See details', - onClick: () => { - onSeeDetails?.({ path: initialPath }) - } - } + seeDetailsHref + ? { label: 'Exit & See details', href: seeDetailsHref(initialPath) } + : { + label: 'Exit & See details', + onClick: () => { + onSeeDetails?.({ path: initialPath }) + } + } ] : []), ...(!inSessionPane && isWorkflowAsCode(script.content, script.language) diff --git a/frontend/src/lib/components/ScriptVersionHistory.svelte b/frontend/src/lib/components/ScriptVersionHistory.svelte index f780b32d97..79d270a24c 100644 --- a/frontend/src/lib/components/ScriptVersionHistory.svelte +++ b/frontend/src/lib/components/ScriptVersionHistory.svelte @@ -11,6 +11,7 @@ import ToggleButton from './common/toggleButton-v2/ToggleButton.svelte' import VersionListItem from './VersionListItem.svelte' import { useOperatingWorkspace } from '$lib/components/operatingWorkspace.svelte' + import { isNewTabClick } from '$lib/navigation' const operatingWorkspace = useOperatingWorkspace() @@ -98,7 +99,10 @@ {#snippet action()} {#if openDetails} diff --git a/frontend/src/lib/components/WorkspaceItemDrillPicker.svelte b/frontend/src/lib/components/WorkspaceItemDrillPicker.svelte index 67db2f3a1b..5e1ac347dd 100644 --- a/frontend/src/lib/components/WorkspaceItemDrillPicker.svelte +++ b/frontend/src/lib/components/WorkspaceItemDrillPicker.svelte @@ -28,6 +28,7 @@ in a live editor) are still navigable. } from '$lib/components/copilot/chat/global/userDraftAdapter' import { resource } from 'runed' import { useOperatingWorkspace } from '$lib/components/operatingWorkspace.svelte' + import { withWorkspaceParam } from '$lib/components/sessions/sessionMode.svelte' const operatingWorkspace = useOperatingWorkspace() @@ -53,10 +54,14 @@ in a live editor) are still navigable. // Load items and drafts from this workspace; defaults to the operating workspace // (see `useOperatingWorkspace`). workspaceId?: string + /** Where picking an item navigates, for a host whose pick is a navigation; rows then + * open in a new tab on middle and ⌘/Ctrl-click. Stamped with the picker's workspace. */ + itemHref?: (item: WorkspaceItem) => string } let { onPick, + itemHref, kinds = ['flow', 'script', 'app'], initialScope, initialHighlight, @@ -174,4 +179,7 @@ in a live editor) are still navigable. else if (kinds.length === 1) loader.ensureLoaded(kinds[0]) }} onFilterChange={loader.onFilterChange} + leafHref={itemHref + ? (leaf) => withWorkspaceParam(itemHref(leaf.data), effectiveWorkspace) + : undefined} /> diff --git a/frontend/src/lib/components/apps/components/display/AppNavbarItem.svelte b/frontend/src/lib/components/apps/components/display/AppNavbarItem.svelte index 14832214b0..1cf68cb8a3 100644 --- a/frontend/src/lib/components/apps/components/display/AppNavbarItem.svelte +++ b/frontend/src/lib/components/apps/components/display/AppNavbarItem.svelte @@ -115,13 +115,17 @@ onClick: undefined } } else { + const href = resolvedPath ? `/apps/get/${resolvedPath}` : undefined return { - onClick: () => { - if (resolvedPath) { - gotoFn?.(`/apps/get/${resolvedPath}`) - } + // A plain click goes through `gotoFn`, which an embedded app routes to its top window. + onClick: (e?: Event) => { + // Not `isNewTabClick`: `$lib/navigation` imports `$app/navigation`, which no app + // component pulls in (the packaged `AppPreview` renders them outside SvelteKit). + if (e instanceof MouseEvent && (e.ctrlKey || e.metaKey)) return + e?.preventDefault() + if (href) gotoFn?.(href) }, - href: undefined, + href, target: undefined } } @@ -177,7 +181,7 @@ }`} > diff --git a/frontend/src/lib/components/assets/AssetGraph/PipelineFolderList.svelte b/frontend/src/lib/components/assets/AssetGraph/PipelineFolderList.svelte index 3c7abca060..379be7c381 100644 --- a/frontend/src/lib/components/assets/AssetGraph/PipelineFolderList.svelte +++ b/frontend/src/lib/components/assets/AssetGraph/PipelineFolderList.svelte @@ -1,6 +1,7 @@ - + - + diff --git a/frontend/src/lib/components/flows/CreateActionsFlow.svelte b/frontend/src/lib/components/flows/CreateActionsFlow.svelte index 9f78585cc0..fbf9481e78 100644 --- a/frontend/src/lib/components/flows/CreateActionsFlow.svelte +++ b/frontend/src/lib/components/flows/CreateActionsFlow.svelte @@ -1,5 +1,5 @@ @@ -83,11 +67,11 @@ }, { label: 'Workflow-as-Code in TypeScript', - onClick: () => selectWacTypescript() + href: '/scripts/add?wac=typescript' }, { label: 'Workflow-as-Code in Python', - onClick: () => selectWacPython() + href: '/scripts/add?wac=python' }, { label: 'Import Workflow-as-Code', @@ -97,7 +81,7 @@ }, { label: 'Pipeline (alpha)', - onClick: () => selectPipeline() + href: '/pipeline' } ]} > @@ -112,9 +96,10 @@
- + @@ -160,9 +145,10 @@ class="flex flex-col h-full transition-all duration-300" style="opacity: {wacHovered ? 1 : 0}; transform: scale({wacHovered ? 1 : 0.95})" > - - +
diff --git a/frontend/src/lib/components/flows/FlowHistoryInner.svelte b/frontend/src/lib/components/flows/FlowHistoryInner.svelte index 45007d90e9..35fb3a6a28 100644 --- a/frontend/src/lib/components/flows/FlowHistoryInner.svelte +++ b/frontend/src/lib/components/flows/FlowHistoryInner.svelte @@ -205,11 +205,8 @@ diff --git a/frontend/src/lib/components/flows/agentActions.ts b/frontend/src/lib/components/flows/agentActions.ts index 835675a34d..77d0c5203c 100644 --- a/frontend/src/lib/components/flows/agentActions.ts +++ b/frontend/src/lib/components/flows/agentActions.ts @@ -1,13 +1,4 @@ -import { - Copy, - Eye, - FileUp, - History, - LayoutDashboard, - List, - Trash, - UserPlus -} from 'lucide-svelte' +import { Copy, Eye, FileUp, History, LayoutDashboard, List, Trash, UserPlus } from 'lucide-svelte' import { DraftService, ResourceService, type AiAgent, type OpenFlow } from '$lib/gen' import { mintDraftPath } from '$lib/mintDraftPath' import { keepsManagedMemory } from './agentFormFields' @@ -122,7 +113,7 @@ export function agentMenuItems(agent: { // are filed under `.chat` (agent_runs.rs) and listed by the agent's own chat. displayName: 'View runs', icon: List, - action: () => goto(`/runs/${agent.path}?job_kinds=previews`) + href: `/runs/${agent.path}?job_kinds=previews` }, ...(agent.noCode ? [] @@ -130,7 +121,7 @@ export function agentMenuItems(agent: { { displayName: 'Audit logs', icon: Eye, - action: () => goto(`/audit_logs?resource=${agent.path}`) + href: `/audit_logs?resource=${agent.path}` } ]), { displayName: 'Copy path', icon: Copy, action: () => copyToClipboard(agent.path) } diff --git a/frontend/src/lib/components/flows/common/FlowCardHeader.svelte b/frontend/src/lib/components/flows/common/FlowCardHeader.svelte index 80aea48e4a..6dcd288933 100644 --- a/frontend/src/lib/components/flows/common/FlowCardHeader.svelte +++ b/frontend/src/lib/components/flows/common/FlowCardHeader.svelte @@ -91,13 +91,10 @@ }) }) - function reportIssue() { + function reportIssueHref(): string { const targetHubBaseUrl = Number(hubVersionId) < PRIVATE_HUB_MIN_VERSION ? DEFAULT_HUB_BASE_URL : $hubBaseUrlStore - window.open( - `${targetHubBaseUrl}/from_version/${hubVersionId}?report_issue=${hubVersionId}`, - '_blank' - ) + return `${targetHubBaseUrl}/from_version/${hubVersionId}?report_issue=${hubVersionId}` } // Every one of these acts on the referenced script rather than the step, so they share @@ -194,7 +191,8 @@ displayName: 'Report issue', icon: Flag, separatorTop: items.length > 0, - action: reportIssue + href: reportIssueHref(), + hrefTarget: '_blank' }) } return items diff --git a/frontend/src/lib/components/flows/content/AgentDetailPage.svelte b/frontend/src/lib/components/flows/content/AgentDetailPage.svelte index dad41c44c3..ad2c40d91e 100644 --- a/frontend/src/lib/components/flows/content/AgentDetailPage.svelte +++ b/frontend/src/lib/components/flows/content/AgentDetailPage.svelte @@ -8,6 +8,8 @@ import AgentUsePanel from '$lib/components/flows/content/AgentUsePanel.svelte' import { SlackAgentsService } from '$lib/gen' import DetailPageHeader from '$lib/components/details/DetailPageHeader.svelte' + import { interceptNav } from '$lib/components/details/interceptNav' + import { useOperatingWorkspaceHref } from '$lib/components/operatingWorkspace.svelte' import OnBehalfOfBadge from '$lib/components/details/OnBehalfOfBadge.svelte' import ToggleButtonGroup from '$lib/components/common/toggleButton-v2/ToggleButtonGroup.svelte' import ToggleButton from '$lib/components/common/toggleButton-v2/ToggleButton.svelte' @@ -91,6 +93,7 @@ let config = $derived(agent?.state?.args) let chatAvailable = $derived(keepsManagedMemory(config?.memory)) const editRights = useEditRights(() => ws) + const operatingHref = useOperatingWorkspaceHref() let canAuthor = $derived(editRights.roleCanAuthor('agent')) let canCode = $derived(editRights.capabilities.code) @@ -237,7 +240,10 @@ }).map((item) => ({ label: item.displayName, Icon: item.icon, - onclick: (e: MouseEvent) => item.action?.(e), + href: item.href && operatingHref(item.href), + onclick: item.href + ? interceptNav(onNavigate, item.href) + : (e: MouseEvent) => item.action?.(e), disabled: item.disabled, color: item.type === 'delete' ? ('red' as const) : undefined })) diff --git a/frontend/src/lib/components/flows/content/FlowEditorDrawer.svelte b/frontend/src/lib/components/flows/content/FlowEditorDrawer.svelte index c6c1d13b2a..ec9117acc4 100644 --- a/frontend/src/lib/components/flows/content/FlowEditorDrawer.svelte +++ b/frontend/src/lib/components/flows/content/FlowEditorDrawer.svelte @@ -71,6 +71,13 @@ let diffDrawer: DiffDrawer | undefined = $state() let flowBuilder: FlowBuilder | undefined = $state(undefined) + + // Follow the drawer's own selection, which the user may have moved since it opened. + let editHref = $derived.by(() => { + const stepId = flowBuilder?.getSelectedId() ?? selectedStepId + const selected = stepId ? `?selected=${encodeURIComponent(stepId)}` : '' + return `/flows/edit/${flowPath}${selected}` + }) @@ -122,13 +129,10 @@ {#snippet actions()} + {#if variant.docHref} highlightOption(option.key)} onpointerenter={() => highlightOption(option.key)} - onclick={() => option.onSelect()} > {@render rowBody(option, ac)} - + {/if} {/each} diff --git a/frontend/src/lib/components/instanceGroups/InstanceGroupsTable.svelte b/frontend/src/lib/components/instanceGroups/InstanceGroupsTable.svelte index 45f50d4218..9e13f865dc 100644 --- a/frontend/src/lib/components/instanceGroups/InstanceGroupsTable.svelte +++ b/frontend/src/lib/components/instanceGroups/InstanceGroupsTable.svelte @@ -14,6 +14,8 @@ import { sendUserToast } from '$lib/toast' import { Pen, Trash, Users } from 'lucide-svelte' import { onMount, type Snippet } from 'svelte' + import { page } from '$app/state' + import { isNewTabClick } from '$lib/navigation' interface Props { /** Renders nothing, header included, when there are no groups. */ @@ -41,10 +43,31 @@ } export function open(name: string) { + handledName = name openName = name drawer?.openDrawer() } + // Deep link: # opens that group's drawer. `open` pre-sets handledName, so a row + // click that also sets the hash doesn't reopen it. Names are compared decoded since the + // browser percent-encodes the hash. + let handledName = '' + $effect(() => { + const hash = page.url.hash + if (hash.length <= 1) { + handledName = '' + return + } + let name: string + try { + name = decodeURIComponent(hash.slice(1)) + } catch { + return + } + if (name === handledName || !groups || !drawer) return + if (groups.some((g) => g.name === name)) open(name) + }) + export async function created(name: string) { await reload() open(name) @@ -108,7 +131,17 @@ open(group.name)}>
- {group.name} + + { + e.stopPropagation() + if (isNewTabClick(e)) return + open(group.name) + }}>{group.name} {#if group.summary} {group.summary} diff --git a/frontend/src/lib/components/raw_apps/RawAppEditor.svelte b/frontend/src/lib/components/raw_apps/RawAppEditor.svelte index 132501b472..47329903d9 100644 --- a/frontend/src/lib/components/raw_apps/RawAppEditor.svelte +++ b/frontend/src/lib/components/raw_apps/RawAppEditor.svelte @@ -178,6 +178,8 @@ /** `Exit & see details`: see RawAppEditorHeader. */ onDetails?: (e: { path: string }) => void /** See RawAppEditorHeader. */ + detailsHref?: (path: string) => string + /** See RawAppEditorHeader. */ onOpenFork?: (path: string) => void onResetToDeployed?: () => void | Promise /** The app_version the draft forked from, for the deploy-time "new version @@ -251,6 +253,7 @@ pendingDraftPath = $bindable(undefined), pendingDraftSettings = $bindable(), onDetails, + detailsHref, onOpenFork, onResetToDeployed, loadedFromDraft = false, @@ -2742,6 +2745,7 @@ addEventListener('message', function (e) { {onNavigate} {onDeploy} {onDetails} + {detailsHref} {onOpenFork} {onResetToDeployed} {loadedFromDraft} diff --git a/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte b/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte index 1a5b426378..f0ce23c185 100644 --- a/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte +++ b/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte @@ -208,6 +208,9 @@ /** `Exit & see details`: leaves the editor for the app's deployed page. A session hosts that * page itself, so it flips the tab there rather than navigating out of the session. */ onDetails?: (e: { path: string }) => void + /** Makes `Exit & see details` a link, so it opens in a new tab on middle/ctrl-click. Wins + * over `onDetails`. */ + detailsHref?: (path: string) => string /** Opens the draft `Fork` saved. Without it, the fork opens in a new browser tab; a * session opens it as one of its own tabs instead. */ onOpenFork?: (path: string) => void @@ -263,6 +266,7 @@ pendingDraftPath = $bindable(undefined), pendingDraftSettings = $bindable(), onDetails, + detailsHref, onOpenFork, onResetToDeployed, loadedFromDraft = false, @@ -1347,10 +1351,12 @@ ...(newApp ? [] : [ - { - label: 'Exit & see details', - onClick: () => onDetails?.({ path: appPath }) - } + detailsHref + ? { label: 'Exit & see details', href: detailsHref(appPath) } + : { + label: 'Exit & see details', + onClick: () => onDetails?.({ path: appPath }) + } ]), { label: 'Fork', diff --git a/frontend/src/lib/components/resources/ResourcesList.svelte b/frontend/src/lib/components/resources/ResourcesList.svelte index 84da0fdca7..4f89f5c476 100644 --- a/frontend/src/lib/components/resources/ResourcesList.svelte +++ b/frontend/src/lib/components/resources/ResourcesList.svelte @@ -1,6 +1,7 @@ + -
{ + {href} + tabindex={href ? -1 : undefined} + onclickcapture={(e: MouseEvent) => { e.stopImmediatePropagation() + // The link only serves clicks the browser opens elsewhere (modified, middle, right); a + // plain click still goes through onselect, which may select rather than navigate. + // Capture, not a delegated onclick: the palette is portalled outside the app root, where + // a delegated handler runs after SvelteKit's link handler has already followed the href. + if (href && isNewTabClick(e)) return + if (href) e.preventDefault() onselect(e.shiftKey || e.ctrlKey) }} onmouseenter={() => { @@ -83,7 +98,7 @@ mouseMoved = false }} class={twMerge( - `rounded-md w-full transition-all cursor-pointer ${hovered ? 'bg-surface-hover' : ''}`, + `block rounded-md w-full text-[color:inherit] transition-all cursor-pointer ${hovered ? 'bg-surface-hover' : ''}`, containerClass )} > @@ -123,4 +138,4 @@ {/if}
{/if} -
+ diff --git a/frontend/src/lib/components/search/RunsSearch.svelte b/frontend/src/lib/components/search/RunsSearch.svelte index 51874fcd82..54a304e77e 100644 --- a/frontend/src/lib/components/search/RunsSearch.svelte +++ b/frontend/src/lib/components/search/RunsSearch.svelte @@ -154,6 +154,7 @@ {/if} {:else} { selectedItem = r selectedWorkspace = r?.document.workspace_id[0] diff --git a/frontend/src/lib/components/sessions/PreviewRouterPicker.svelte b/frontend/src/lib/components/sessions/PreviewRouterPicker.svelte index 3886b90b19..4c5ea2efb2 100644 --- a/frontend/src/lib/components/sessions/PreviewRouterPicker.svelte +++ b/frontend/src/lib/components/sessions/PreviewRouterPicker.svelte @@ -79,6 +79,9 @@ section or the flat layout. /** The session chat, whose Use mode opens items in their viewer. Read from the * `aiChatManager` context when omitted. */ chat?: { readonly workMode: AIWorkMode } + /** Where picking a target navigates, for a host whose pick is a navigation; rows then + * open in a new tab on middle and ⌘/Ctrl-click. */ + targetHref?: (target: PreviewTarget) => string | undefined } let { @@ -91,7 +94,8 @@ section or the flat layout. flush = false, workspaceId, artifacts, - chat + chat, + targetHref }: Props = $props() const kinds: Kind[] = ['flow', 'script', 'app'] @@ -423,5 +427,6 @@ section or the flat layout. onFilterChange={loader.onFilterChange} leafAction={editAction} leafBadge={stateBadge} + leafHref={targetHref ? (leaf) => targetHref(leaf.data) : undefined} {rootLoading} /> diff --git a/frontend/src/lib/components/sessions/SessionStatusPopover.svelte b/frontend/src/lib/components/sessions/SessionStatusPopover.svelte index dd0670d4e3..4c779cef83 100644 --- a/frontend/src/lib/components/sessions/SessionStatusPopover.svelte +++ b/frontend/src/lib/components/sessions/SessionStatusPopover.svelte @@ -2,6 +2,7 @@ import type { Snippet } from 'svelte' import Popover from '$lib/components/meltComponents/Popover.svelte' import SessionStatusToken, { TOKEN_TRIGGER_CLASS } from './SessionStatusToken.svelte' + import { isNewTabClick } from '$lib/navigation' // Shared shell for the session status-line popovers (Edits / Artifacts / Jobs): // one trigger token, one header, one keyboard-navigable row list — so styling @@ -13,6 +14,7 @@ items, itemKey, onPick, + itemHref, rowTitle, row, actions, @@ -35,7 +37,10 @@ items: T[] itemKey: (item: T) => string /** Primary row activation; the popover closes itself first. */ - onPick: (item: T) => void + onPick: (item: T, e: MouseEvent) => void + /** Makes a row a link opening this URL in a new tab, which middle and ⌘/Ctrl-click keep + * doing; on a plain click `onPick` may `preventDefault()` to open it in place instead. */ + itemHref?: (item: T) => string | undefined rowTitle?: (item: T) => string /** Content of the row's primary button. */ row: Snippet<[T]> @@ -59,17 +64,19 @@ maxHeightClass?: string } = $props() - function pick(item: T) { + function pick(item: T, e: MouseEvent) { open = false - onPick(item) + onPick(item, e) } // Roving focus over the rows' primary buttons. let listRoot = $state(undefined) - function rowButtons(): HTMLButtonElement[] { + function rowButtons(): HTMLElement[] { return listRoot - ? Array.from(listRoot.querySelectorAll('button[data-status-row]')) + ? Array.from( + listRoot.querySelectorAll('button[data-status-row], a[data-status-row]') + ) : [] } @@ -123,19 +130,28 @@
{#each items as item, index (itemKey(item))} + {@const href = itemHref?.(item)}
- + {#if actions}
{@render actions(item)} diff --git a/frontend/src/lib/components/sessions/WorkspaceFamilyPicker.svelte b/frontend/src/lib/components/sessions/WorkspaceFamilyPicker.svelte index 898acd1dd2..5f17756801 100644 --- a/frontend/src/lib/components/sessions/WorkspaceFamilyPicker.svelte +++ b/frontend/src/lib/components/sessions/WorkspaceFamilyPicker.svelte @@ -18,6 +18,7 @@ workspaceSubtreeRows } from '$lib/utils/workspaceHierarchy' import { useForkableWorkspaces } from '$lib/utils/useForkableWorkspaces.svelte' + import { isNewTabClick } from '$lib/navigation' import { canCreateFork } from '$lib/utils/editInFork' import { forkAccentStyle } from '$lib/utils/forkColor' import { WorkspaceService } from '$lib/gen' @@ -553,7 +554,9 @@
(dropdownOpen = false)} + onclick={(e) => { + if (!isNewTabClick(e)) dropdownOpen = false + }} class={`${rowBase} shrink-0 hover:bg-surface-hover`} > diff --git a/frontend/src/lib/components/sidebar/CriticalAlertModalInner.svelte b/frontend/src/lib/components/sidebar/CriticalAlertModalInner.svelte index d51e9f6b4e..c49f12f8e3 100644 --- a/frontend/src/lib/components/sidebar/CriticalAlertModalInner.svelte +++ b/frontend/src/lib/components/sidebar/CriticalAlertModalInner.svelte @@ -1,5 +1,6 @@ @@ -21,10 +15,20 @@ settings or the advanced setup for full control.

- +
- - + +
diff --git a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte index fc5600e592..6e05c06dc9 100644 --- a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte @@ -1719,6 +1719,11 @@ page: () => WORKSPACE_SETTINGS_PATH + window.location.search, workspaceId: $workspaceStore ?? undefined }) + function tabHref(id: string): string { + const params = new URLSearchParams($page.url.searchParams) + params.set('tab', id) + return `?${params.toString()}` + } @@ -1750,11 +1755,8 @@ { - const params = new URLSearchParams($page.url.searchParams) - params.set('tab', id) - goto(`?${params.toString()}`) - }} + onNavigate={(id) => goto(tabHref(id))} + itemHref={tabHref} />
{/if} @@ -1822,7 +1824,7 @@ @@ -2881,10 +2883,10 @@ export async function main( {#if pageHeader.actionFold >= 1} goto('#superadmin-settings') }]} + items={[{ displayName: 'Instance settings', href: '#superadmin-settings' }]} /> {:else} - {/if} diff --git a/frontend/src/routes/(styled)/user/forgot-password/+page.svelte b/frontend/src/routes/(styled)/user/forgot-password/+page.svelte index cedc70b56a..7bd505f8e0 100644 --- a/frontend/src/routes/(styled)/user/forgot-password/+page.svelte +++ b/frontend/src/routes/(styled)/user/forgot-password/+page.svelte @@ -1,5 +1,4 @@