fix: an item the picker files under no kind keeps its name in the band

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) <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-10-01 00:50:56 -07:00
co-authored by Claude Opus 5
parent d8f67de87c
commit 5ffb103856
3 changed files with 8 additions and 6 deletions
@@ -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}<WorkspaceItemKindIcon kind={item.kind} size={ICON} />{/if}
<!-- No kind, no glyph: WorkspaceItemKindIcon falls through to the script icon, which would
label an agent a script. -->
{#if item?.kind}<WorkspaceItemKindIcon kind={item.kind} size={ICON} />{/if}
{/snippet}
{#snippet sectionKindIcon()}
@@ -304,7 +306,7 @@ same weight, size and icon size, so the line reads as one control rather than fo
</span>
{/if}
</div>
{:else}
{:else if item.kind}
<span class="{SEGMENT} hover:bg-transparent" aria-current="page">
{@render itemKindIcon()}
<span class="truncate">{KIND_LABEL_LOWER[item.kind]}</span>
@@ -35,9 +35,7 @@
// An agent's page has no triggers, and so no context for them.
const triggerContext = getContext<TriggerContext | undefined>('TriggerContext')
const { triggersCount, triggersState } = $state(
triggerContext ?? ({} as Partial<TriggerContext>)
)
const { triggersCount, triggersState } = $state(triggerContext ?? ({} as Partial<TriggerContext>))
// The buttons below render in the page header, away from this page's tree.
const headerContexts = new Map<any, any>([['TriggerContext', triggerContext]])
@@ -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