diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index fcb92ebe95..85532edcb6 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -28,7 +28,8 @@ userPathPrefix, type Item, type StateStore, - type Value + type Value, + emptyString } from '$lib/utils' import { sendUserToast } from '$lib/toast' import { UserDraftDbSyncer } from '$lib/userDraftDbSyncer.svelte' @@ -1658,11 +1659,15 @@ it renames. -->
{flowStore.val.summary}{emptyString(flowStore.val.summary) ? 'Add a summary...' : flowStore.val.summary} {#if customUi?.topBar?.editablePath != false} {#if !navHidden}
- + + {#key content?.contexts} + + + + {/key}
{/if} @@ -181,7 +188,11 @@ The row's height matches the sidebar's own header row, so the two read as one ba carries it down with the summary instead of stranding it on the line above. --> {#if item.summaryContent} - {@render item.summaryContent()} + {#key content?.contexts} + + {@render item.summaryContent()} + + {/key} {:else} {item.summary} {/if} diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte index 3619f670b0..8be4a05bb9 100644 --- a/frontend/src/lib/components/ScriptBuilder.svelte +++ b/frontend/src/lib/components/ScriptBuilder.svelte @@ -2342,11 +2342,16 @@ named rather than where it is edited. The pen sits after it, at the end of what it renames. -->
- {script.summary}{emptyString(script.summary) ? 'Add a summary...' : script.summary} {#if customUi?.topBar?.editablePath != false} { const w = ownsPageHeader ? pageHeader.barWidth : topbarWidth return w > 0 && w < compactBelow @@ -620,7 +624,33 @@ selectedJobId = $jobs[$jobs.length - 1] } $jobsDrawerOpen = true - }, + } + }, + // The canvas toggles stand down with the bar, and the breakpoint among them is the + // only way onto the mobile layout — so each one keeps an entry here. + { + displayName: $breakpoint === 'sm' ? 'Computer view' : 'Mobile view', + icon: $breakpoint === 'sm' ? Laptop2 : Smartphone, + action: () => ($breakpoint = $breakpoint === 'sm' ? 'lg' : 'sm') + }, + { + displayName: $app?.fullscreen ? 'Centered canvas' : 'Full-width canvas', + icon: $app?.fullscreen ? AlignHorizontalSpaceAround : Expand, + action: () => { + if ($app) $app.fullscreen = !$app.fullscreen + } + }, + { + displayName: + $app?.darkMode === undefined + ? 'Theme: automatic' + : $app.darkMode + ? 'Theme: dark' + : 'Theme: light', + icon: $app?.darkMode === undefined ? SunMoon : $app.darkMode ? Moon : Sun, + // Cycles auto → light → dark, the order the toggle group reads in. + action: () => + setTheme($app?.darkMode === undefined ? false : $app.darkMode ? undefined : true), separatorBottom: true } ] @@ -953,7 +983,7 @@ // will create. Same fallback chain the rename sites read. // Frozen while the pen's popover is open so the trail holds still as the user types. kind: 'app', - path: pathSnapshot ?? newEditedPath ?? $appPath ?? newPath ?? undefined, + path: pathSnapshot ?? (newEditedPath || $appPath || newPath || undefined), summaryContent: appSummary }} actions={appHeaderActions} @@ -994,10 +1024,14 @@ named rather than where it is edited. `title` so one the band truncates can still be read. The pen sits after it, at the end of what it renames. -->
- {$summary}{emptyString($summary) ? 'Add a summary...' : $summary} } diff --git a/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte b/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte index bee4f9a6b8..cb0f958ccd 100644 --- a/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte +++ b/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte @@ -3,7 +3,7 @@ import { base } from '$lib/base' import RawAppRecordSession from '$lib/components/workspaceSettings/RawAppRecordSession.svelte' import Button from '$lib/components/common/button/Button.svelte' - import { isMac, userPathPrefix } from '$lib/utils' + import { isMac, userPathPrefix, emptyString } from '$lib/utils' import { editPathFor } from '$lib/components/workspacePicker' import { invalidateWorkspacePaths } from '$lib/components/PathNameAutocomplete.svelte' @@ -943,7 +943,7 @@ // will create — which is why `newEditedPath` refuses the placeholder. Frozen while the // pen's popover is open so the trail holds still as the user types. kind: 'app', - path: pathSnapshot ?? newEditedPath ?? appPath ?? newPath ?? undefined, + path: pathSnapshot ?? (newEditedPath || appPath || newPath || undefined), summaryContent: appSummary }} actions={rawAppHeaderActions} @@ -1025,9 +1025,14 @@ named rather than where it is edited. `title` so one the band truncates can still be read. The pen sits after it, at the end of what it renames. -->
- {summary}{emptyString(summary) ? 'Add a summary...' : summary} {#snippet pipelineFolder()}