disable AI chat offset for drawers on workspace selection page (#7807)

The workspace selection page uses a different layout that doesn't render
the AI chat. However, drawers on this page were applying the chat offset
based on the chatState from localStorage, causing them to appear with an
incorrect offset to the right.

This fix passes disableChatOffset to UserSettings and SuperadminSettings
drawers on the workspace selection page.

Fixes #7806

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
This commit is contained in:
claude[bot]
2026-02-05 13:45:09 +00:00
committed by GitHub
parent 761b0e173b
commit 999ff841c3
3 changed files with 13 additions and 5 deletions

View File

@@ -2,6 +2,12 @@
import { Drawer, DrawerContent } from '$lib/components/common'
import SuperadminSettingsInner from './SuperadminSettingsInner.svelte'
interface Props {
disableChatOffset?: boolean
}
let { disableChatOffset = false }: Props = $props()
let drawer: Drawer | undefined = $state()
export function openDrawer() {
@@ -13,7 +19,7 @@
}
</script>
<Drawer bind:this={drawer} size="1000px">
<Drawer bind:this={drawer} size="1000px" {disableChatOffset}>
<DrawerContent overflow_y={true} title="Instance settings" on:close={closeDrawer}>
<SuperadminSettingsInner {closeDrawer} />
</DrawerContent>

View File

@@ -14,6 +14,7 @@
newTokenWorkspace?: string | undefined
newToken?: string | undefined
showMcpMode?: boolean
disableChatOffset?: boolean
}
let {
@@ -21,7 +22,8 @@
newTokenLabel = undefined,
newTokenWorkspace = undefined,
newToken = $bindable(undefined),
showMcpMode = false
showMcpMode = false,
disableChatOffset = false
}: Props = $props()
let drawer: Drawer | undefined = $state()
@@ -49,7 +51,7 @@
}
</script>
<Drawer bind:this={drawer} size="900px" on:close={removeHash}>
<Drawer bind:this={drawer} size="900px" on:close={removeHash} {disableChatOffset}>
<DrawerContent title="User settings" on:close={closeDrawer}>
<div class="flex flex-col gap-6 pb-8">
{#if scopes == undefined}

View File

@@ -170,7 +170,7 @@
</script>
{#if $superadmin}
<SuperadminSettings bind:this={superadminSettings} />
<SuperadminSettings bind:this={superadminSettings} disableChatOffset />
{/if}
<CenteredModal
@@ -440,4 +440,4 @@
</p>
</div>
</div> -->
<UserSettings bind:this={userSettings} showMcpMode={true} />
<UserSettings bind:this={userSettings} showMcpMode={true} disableChatOffset />