From 5ffb103856303d68ac559dfb2eaa1619c0441d0b Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Thu, 1 Oct 2026 00:50:56 -0700 Subject: [PATCH] fix: an item the picker files under no kind keeps its name in the band MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The merge brought main's agents detail page, which reaches DetailPageHeader with no `errorHandlerKind` — and the band's item required one. `WorkspaceItemKindIcon` falls through to the script glyph for anything it does not know, so defaulting would have labelled an agent a script; the kind is optional now and the trail names the item without claiming it is one of the three. Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/lib/components/NavBreadcrumb.svelte | 6 ++++-- frontend/src/lib/components/details/DetailPageHeader.svelte | 4 +--- frontend/src/lib/components/pageHeaderRegistry.svelte.ts | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/NavBreadcrumb.svelte b/frontend/src/lib/components/NavBreadcrumb.svelte index 70054e143e..22e43f1ecd 100644 --- a/frontend/src/lib/components/NavBreadcrumb.svelte +++ b/frontend/src/lib/components/NavBreadcrumb.svelte @@ -148,7 +148,9 @@ same weight, size and icon size, so the line reads as one control rather than fo {/snippet} {#snippet itemKindIcon()} - {#if item}{/if} + + {#if item?.kind}{/if} {/snippet} {#snippet sectionKindIcon()} @@ -304,7 +306,7 @@ same weight, size and icon size, so the line reads as one control rather than fo {/if} - {:else} + {:else if item.kind} {@render itemKindIcon()} {KIND_LABEL_LOWER[item.kind]} diff --git a/frontend/src/lib/components/details/DetailPageHeader.svelte b/frontend/src/lib/components/details/DetailPageHeader.svelte index 2be076dca0..062a2f91d0 100644 --- a/frontend/src/lib/components/details/DetailPageHeader.svelte +++ b/frontend/src/lib/components/details/DetailPageHeader.svelte @@ -35,9 +35,7 @@ // An agent's page has no triggers, and so no context for them. const triggerContext = getContext('TriggerContext') - const { triggersCount, triggersState } = $state( - triggerContext ?? ({} as Partial) - ) + const { triggersCount, triggersState } = $state(triggerContext ?? ({} as Partial)) // The buttons below render in the page header, away from this page's tree. const headerContexts = new Map([['TriggerContext', triggerContext]]) diff --git a/frontend/src/lib/components/pageHeaderRegistry.svelte.ts b/frontend/src/lib/components/pageHeaderRegistry.svelte.ts index f074c6ff06..ccd954b6ec 100644 --- a/frontend/src/lib/components/pageHeaderRegistry.svelte.ts +++ b/frontend/src/lib/components/pageHeaderRegistry.svelte.ts @@ -3,7 +3,9 @@ import type { WorkspaceItemKind } from './workspacePicker' /** An item the page is working on: the breadcrumb walks its path and ends with its summary. */ export type PageHeaderItem = { - kind: WorkspaceItemKind + /** Absent for an item the picker does not file under a kind — an agent's detail page. The + * breadcrumb then names the item without claiming it is one of the three. */ + kind?: WorkspaceItemKind /** Shown whole, and copied on click. */ path: string | undefined summary?: string