Files
windmill/frontend/src/lib/components/PageHeaderContent.svelte
T
GuilhemandClaude Opus 5.5 34db23952a feat: move the open in AI session button to the page header (#11888)
* feat: move the open in AI session button to the page header

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: address local review findings on the header session button

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: update header fold comments and test the page header session source

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: show the header session button to users who cannot edit the item

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat: place the header session button right before the page's main action

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: drop an always-true guard and stale comments around the header session button

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: keep the compact autosave label for screen readers and correct two comments

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 18:34:00 +02:00

56 lines
1.2 KiB
Svelte

<!--
@component
Fills the layout's page header from the route that mounts it: the breadcrumb (an item's path, or a
section name for a list) and the page's own buttons. Renders nothing itself.
Only a route page mounts this. An editor nested in a session pane or a drawer must not take over
the header, so nesting is decided by the caller rather than guessed from context.
-->
<script lang="ts">
import { onMount } from 'svelte'
import { pageHeader, type PageHeaderContent } from './pageHeaderRegistry.svelte'
let {
item,
section,
afterName,
actions,
sessionSource,
actionsOrder,
actionsFlexible,
actionsFill,
actionFolds,
earlyActionFolds,
actionsVersion,
belowBar,
belowBarFold,
separator,
contexts,
actingWorkspaceId,
barRightInset
}: PageHeaderContent = $props()
onMount(() => {
const id = pageHeader.register(() => ({
item,
section,
afterName,
actions,
sessionSource,
actionsOrder,
actionsFlexible,
actionsFill,
actionFolds,
earlyActionFolds,
actionsVersion,
belowBar,
belowBarFold,
separator,
contexts,
actingWorkspaceId,
barRightInset
}))
return () => pageHeader.release(id)
})
</script>