mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-12 16:02:56 +00:00
fix: guard two ways the detail page breaks outside its own route
`listResourceType`'s generated client resolves `undefined` for any response whose body it cannot read: `getResponseBody` swallows a parse failure and returns nothing, and `catchErrorCodes` passes that through on a 2xx. The return type says otherwise, so `formatResourceTypes` mapped over undefined and the editor died on mount rather than losing its resource-type autocomplete. `DetailPageLayout`'s `<main>` claimed `h-screen`. The detail page owns the viewport on its own route, but not in an AI session's preview panel, where it overflowed the pane — and since every ancestor between is `overflow-visible`, the bottom of the run form was unreachable rather than merely clipped. `h-full` lets the scroller that was already there do its job. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
fcfffedd85
commit
bf31cb38fe
@@ -1823,9 +1823,15 @@
|
||||
scriptLang === 'bunnative' ||
|
||||
scriptLang === 'nativets')
|
||||
) {
|
||||
const resourceTypes = await ResourceService.listResourceType({
|
||||
workspace: $operatingWorkspace ?? ''
|
||||
})
|
||||
// The generated client resolves `undefined` for any response whose body it
|
||||
// cannot read — `getResponseBody` swallows a parse failure and returns
|
||||
// nothing, which `catchErrorCodes` passes through on a 2xx. Typing says
|
||||
// otherwise, so without this the editor dies on mount rather than losing
|
||||
// its resource-type autocomplete.
|
||||
const resourceTypes =
|
||||
(await ResourceService.listResourceType({
|
||||
workspace: $operatingWorkspace ?? ''
|
||||
})) ?? []
|
||||
|
||||
const namespace = formatResourceTypes(
|
||||
resourceTypes,
|
||||
|
||||
@@ -67,7 +67,11 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<main class="h-screen w-full" bind:clientWidth>
|
||||
<!-- `h-full`, not `h-screen`: this page is also rendered inside an AI session's preview
|
||||
panel, which is shorter than the viewport. Claiming the viewport's height there
|
||||
overflows the pane, and the ancestors between are `overflow-visible`, so the bottom of
|
||||
the run form is unreachable rather than merely clipped. -->
|
||||
<main class="h-full w-full" bind:clientWidth>
|
||||
{#if useDesktopLayout}
|
||||
<div class="h-full w-full flex flex-col">
|
||||
{@render header?.({ wide: useDesktopLayout })}
|
||||
|
||||
Reference in New Issue
Block a user