diff --git a/frontend/src/lib/components/PageHeaderBar.svelte b/frontend/src/lib/components/PageHeaderBar.svelte index 380c81ad11..d011b291fd 100644 --- a/frontend/src/lib/components/PageHeaderBar.svelte +++ b/frontend/src/lib/components/PageHeaderBar.svelte @@ -160,12 +160,6 @@ The row's height matches the sidebar's own header row, so the two read as one ba actingWorkspaceId={content?.actingWorkspaceId} /> - {:else if content?.afterName} - -
- {@render content.afterName()} -
{/if} {#if item && !navHidden && (item.summaryContent || item.summary)} diff --git a/frontend/src/lib/components/apps/editor/InWorkspaceAppViewer.svelte b/frontend/src/lib/components/apps/editor/InWorkspaceAppViewer.svelte index b60d770236..12de836650 100644 --- a/frontend/src/lib/components/apps/editor/InWorkspaceAppViewer.svelte +++ b/frontend/src/lib/components/apps/editor/InWorkspaceAppViewer.svelte @@ -20,6 +20,7 @@ import { getUserExt } from '$lib/user' import { Pen } from 'lucide-svelte' import { page } from '$app/state' + import { isMenuHidden } from '$lib/components/sessions/sessionMode.svelte' let { workspace, @@ -53,6 +54,11 @@ const hideEditBtn = page.url.searchParams.get('hideEditBtn') === 'true' const hideRefreshBar = page.url.searchParams.get('hideRefreshBar') === 'true' + const showEdit = $derived(canWriteApp && !hideEditBtn) + // Decides where Edit goes, not whether it appears: without the workspace navigation there is + // no band to put it in. Same rule the layout hides the sidebar by. + const menuHidden = $derived(isMenuHidden(page.url)) + // Embedder side: mint a scoped embed token (by path) from the member's session. async function fetchEmbedToken(opts?: { sdkConsent?: boolean }): Promise<{ token?: string }> { const headers: Record = {} @@ -150,17 +156,23 @@ + no item, and the breadcrumb would fall back to the section name "Apps". --> + +{#if showEdit && menuHidden} +
+ {@render editAction()} +
+{/if} + {#snippet editAction()}