From 8f0b16e93381be67ca501cab43223d9938e736d9 Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Wed, 23 Sep 2026 17:40:38 +0200 Subject: [PATCH] feat: an app's Edit sits with its name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the far end of the bar it was a journey across the window from the thing it edits — on a page whose header is only there while the pointer holds it, a journey with a time limit. It goes beside the app's path instead. The slot it uses is the one Runs' documentation tooltip already had, renamed from `hint` to `afterName` and documented for both: what belongs to the page's name, whether that is a mark or a control that acts on what the name points at. Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/lib/components/NavBreadcrumb.svelte | 13 +++++++------ frontend/src/lib/components/PageHeaderBar.svelte | 2 +- .../src/lib/components/PageHeaderContent.svelte | 4 ++-- frontend/src/lib/components/RunsPage.svelte | 2 +- .../apps/editor/InWorkspaceAppViewer.svelte | 4 +++- .../src/lib/components/pageHeaderRegistry.svelte.ts | 9 +++++---- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/frontend/src/lib/components/NavBreadcrumb.svelte b/frontend/src/lib/components/NavBreadcrumb.svelte index 8dbd45443e..4f1e578def 100644 --- a/frontend/src/lib/components/NavBreadcrumb.svelte +++ b/frontend/src/lib/components/NavBreadcrumb.svelte @@ -32,13 +32,14 @@ same weight, size and icon size, so the line reads as one control rather than fo let { item, section, - hint, + afterName, actingWorkspaceId }: { item?: PageHeaderItem section?: PageHeaderSection - /** A page's own mark next to its name, such as its documentation tooltip. */ - hint?: Snippet + /** What sits beside the page's name: a mark like a documentation tooltip, or a control + * that acts on the thing named. */ + afterName?: Snippet /** The workspace the page acts on, when it differs from the one the app is pointed at. */ actingWorkspaceId?: string } = $props() @@ -262,7 +263,7 @@ same weight, size and icon size, so the line reads as one control rather than fo {level} {/each} - {#if hint}{@render hint()}{/if} + {#if afterName}{@render afterName()}{/if} {#if pathCopied} {#if section.content}{@render section.content()}{:else}{section.label}{/if} - {#if hint}{@render hint()}{/if} + {#if afterName}{@render afterName()}{/if} {:else if routePage} {@const RouteIcon = routePage.icon} - +
diff --git a/frontend/src/lib/components/apps/editor/InWorkspaceAppViewer.svelte b/frontend/src/lib/components/apps/editor/InWorkspaceAppViewer.svelte index c6b62adecb..fa8420859b 100644 --- a/frontend/src/lib/components/apps/editor/InWorkspaceAppViewer.svelte +++ b/frontend/src/lib/components/apps/editor/InWorkspaceAppViewer.svelte @@ -161,7 +161,9 @@ {#if canWriteApp && !hideEditBtn} - + + {/if} {#snippet editAction()} diff --git a/frontend/src/lib/components/pageHeaderRegistry.svelte.ts b/frontend/src/lib/components/pageHeaderRegistry.svelte.ts index 3af05bfa49..34ea582766 100644 --- a/frontend/src/lib/components/pageHeaderRegistry.svelte.ts +++ b/frontend/src/lib/components/pageHeaderRegistry.svelte.ts @@ -29,9 +29,10 @@ export type PageHeaderContent = { /** Orders these buttons among the other registrations', ascending; registration order breaks a * tie. For a menu that must stay at the far end however many pages register before it. */ actionsOrder?: number - /** Rendered right after the page's name in the breadcrumb, for what reads as part of that name - * rather than as an action — a page's documentation tooltip. */ - hint?: Snippet + /** Rendered right after the page's name in the breadcrumb: a mark that belongs to the name, + * like a documentation tooltip, or a control that acts on the thing named — an app's Edit, + * which at the far end of the bar would be a journey away from what it edits. */ + afterName?: Snippet /** The workspace this page acts on, when it is not the one the app is pointed at — a session * running in a fork. The breadcrumb then names that workspace, and its fork part shows only * when it really is a fork. */ @@ -74,7 +75,7 @@ export const pageHeader = { const c = e.get() if (c.item !== undefined) merged.item = c.item if (c.section !== undefined) merged.section = c.section - if (c.hint !== undefined) merged.hint = c.hint + if (c.afterName !== undefined) merged.afterName = c.afterName if (c.contexts !== undefined) merged.contexts = c.contexts if (c.actingWorkspaceId !== undefined) merged.actingWorkspaceId = c.actingWorkspaceId if (c.barRightInset !== undefined) merged.barRightInset = c.barRightInset