From bf31cb38fe14234a4718a3e26c17c3a7b8aa02fd Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Wed, 30 Sep 2026 02:32:40 -0700 Subject: [PATCH] fix: guard two ways the detail page breaks outside its own route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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 `
` 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) --- frontend/src/lib/components/Editor.svelte | 12 +++++++++--- .../lib/components/details/DetailPageLayout.svelte | 6 +++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/components/Editor.svelte b/frontend/src/lib/components/Editor.svelte index 6aabc30c2b..d59ba83ac0 100644 --- a/frontend/src/lib/components/Editor.svelte +++ b/frontend/src/lib/components/Editor.svelte @@ -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, diff --git a/frontend/src/lib/components/details/DetailPageLayout.svelte b/frontend/src/lib/components/details/DetailPageLayout.svelte index 0e6a3183cf..131d4c9f38 100644 --- a/frontend/src/lib/components/details/DetailPageLayout.svelte +++ b/frontend/src/lib/components/details/DetailPageLayout.svelte @@ -67,7 +67,11 @@ } -
+ +
{#if useDesktopLayout}
{@render header?.({ wide: useDesktopLayout })}