diff --git a/frontend/src/lib/assets/app.css b/frontend/src/lib/assets/app.css
index b833582069..e551dd1595 100644
--- a/frontend/src/lib/assets/app.css
+++ b/frontend/src/lib/assets/app.css
@@ -423,6 +423,25 @@ input[type='time']::-webkit-calendar-picker-indicator {
outline: 2px solid rgb(var(--color-border-accent, 59 130 246));
}
+/* Home's composer, pointed at by New session (AIChatDisplay's flashComposer): its box's outline
+ lights up in the accent color and fades, as a setting does when the settings search lands on
+ it. Scoped to the flash, so the box carries no outline otherwise. */
+[data-composer-flash] [data-composer-box] {
+ outline: 2px solid transparent;
+ outline-offset: 1px;
+ animation: wm-composer-flash 0.8s ease-in;
+}
+@keyframes wm-composer-flash {
+ from {
+ outline-color: rgb(var(--color-border-accent, 59 130 246));
+ }
+}
+@media (prefers-reduced-motion: reduce) {
+ [data-composer-flash] [data-composer-box] {
+ animation: none;
+ }
+}
+
.svelte-flow__edges {
z-index: -10;
}
@@ -443,65 +462,3 @@ input[type='time']::-webkit-calendar-picker-indicator {
:root[data-home-sessions-transition='fade'] * {
view-transition-name: none !important;
}
-
-/* Home's Workspace ⇄ AI Sessions switch (swapHomeSide in homeSessionsTransition.svelte.ts).
- Home is the same page beside either list, so only the sidebar's list moves. The page shows
- its new state at once, live, which lets the composer's own opening or folding play; named,
- the composer would be held to the size it had when the switch began. The list's name exists
- only while the switch runs: carried at all times, a send's move to the session page would
- animate it too. */
-:root[data-home-side-transition] .wm-vt-sidebar-list {
- view-transition-name: home-sidebar-list;
-}
-:root[data-home-side-transition] [data-session-composer] {
- view-transition-name: none !important;
-}
-:root[data-home-side-transition]::view-transition-old(root) {
- display: none;
-}
-:root[data-home-side-transition]::view-transition-new(root) {
- animation: none;
-}
-/* The list comes in from the side of the button pressed: AI Sessions is the right one. */
-:root[data-home-side-transition]::view-transition-old(home-sidebar-list),
-:root[data-home-side-transition]::view-transition-new(home-sidebar-list) {
- animation-duration: 260ms;
- animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
- animation-fill-mode: both;
-}
-:root[data-home-side-transition='sessions']::view-transition-old(home-sidebar-list) {
- animation-name: wm-side-out-left;
-}
-:root[data-home-side-transition='sessions']::view-transition-new(home-sidebar-list) {
- animation-name: wm-side-in-right;
-}
-:root[data-home-side-transition='workspace']::view-transition-old(home-sidebar-list) {
- animation-name: wm-side-out-right;
-}
-:root[data-home-side-transition='workspace']::view-transition-new(home-sidebar-list) {
- animation-name: wm-side-in-left;
-}
-@keyframes wm-side-out-left {
- to {
- opacity: 0;
- transform: translateX(-28px);
- }
-}
-@keyframes wm-side-in-right {
- from {
- opacity: 0;
- transform: translateX(28px);
- }
-}
-@keyframes wm-side-out-right {
- to {
- opacity: 0;
- transform: translateX(28px);
- }
-}
-@keyframes wm-side-in-left {
- from {
- opacity: 0;
- transform: translateX(-28px);
- }
-}
diff --git a/frontend/src/lib/components/SharingTabs.svelte b/frontend/src/lib/components/SharingTabs.svelte
new file mode 100644
index 0000000000..9d8fb2f5e2
--- /dev/null
+++ b/frontend/src/lib/components/SharingTabs.svelte
@@ -0,0 +1,20 @@
+
+
+{#if bothShown}
+ goto(`/${e.detail}`)} wrapperClass="pt-4">
+
+
+
+{/if}
diff --git a/frontend/src/lib/components/copilot/chat/AIChat.svelte b/frontend/src/lib/components/copilot/chat/AIChat.svelte
index 4852efa179..cb6bdc22e3 100644
--- a/frontend/src/lib/components/copilot/chat/AIChat.svelte
+++ b/frontend/src/lib/components/copilot/chat/AIChat.svelte
@@ -126,12 +126,12 @@
aiChatDisplay?.focusInput(selection)
}
- export async function attachContext(element: import('./context').ContextElement) {
- await aiChatDisplay?.attachContext(element)
+ export function flashComposer() {
+ aiChatDisplay?.flashComposer()
}
- export function foldComposer() {
- aiChatDisplay?.foldComposer()
+ export async function attachContext(element: import('./context').ContextElement) {
+ await aiChatDisplay?.attachContext(element)
}
const historyManager = aiChatManager.historyManager
diff --git a/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte b/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte
index fa123e15ff..749e3cde0b 100644
--- a/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte
+++ b/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte
@@ -78,7 +78,7 @@
import ComposerSuggestions from './starter/ComposerSuggestions.svelte'
import type { DraftAttachments } from './messageDraft.svelte'
import type { ChatStarter } from './starter/starterPrompts.svelte'
- import { isComposerOverlay } from './starter/composerCollapse'
+ import { asksForComposer, isComposerOverlay } from './starter/composerCollapse'
import { smoothHeight } from './starter/smoothHeight'
const MAX_YOLO_TOOLTIP_TOOLS = 8
@@ -316,14 +316,6 @@
aiChatInput?.focusInput(selection)
}
- /** A starter composer back on one line, as a press outside it does: not while it holds a
- * draft, which is never hidden. Takes the caret out, or the next keypress reopens it. */
- export function foldComposer() {
- closeComposer()
- if (!composerOpened && composerEl?.contains(document.activeElement))
- (document.activeElement as HTMLElement).blur()
- }
-
/** Mention a workspace item in the draft, as "+" → Mention file does, and hand the user
* the caret after it. Focusing is what opens Home's one-line composer. */
export async function attachContext(element: ContextElement) {
@@ -634,7 +626,18 @@
}
function onComposerPointerDown(e: PointerEvent) {
if (!starterLayout || !composerOpened || composerEl?.contains(e.target as Node)) return
- if (!isComposerOverlay(e.target)) closeComposer()
+ if (!isComposerOverlay(e.target) && !asksForComposer(e.target)) closeComposer()
+ }
+
+ // While the box plays its accent outline (app.css, `data-composer-flash`).
+ let flashing = $state(false)
+
+ /** Points the eye at a composer the user was sent to without it moving: its box's outline
+ * lights up in the accent color and fades. */
+ export function flashComposer() {
+ // Off for a frame first, so a flash asked for while one plays starts over.
+ flashing = false
+ requestAnimationFrame(() => (flashing = true))
}
// Home's composer is one block of the page and takes the page's column as it is.
@@ -1017,13 +1020,20 @@ the panel, or the Escape-to-stop focus check would wrongly reject them. -->
+
@@ -857,7 +858,7 @@
bind:this={textarea}
onkeydown={handleKeyDown}
bind:value
- use:autosize={hero && !oneLine ? { maxHeight: 160, minHeight: 56 } : { maxHeight: '40vh' }}
+ use:autosize={hero && !oneLine ? { maxHeight: 160, minHeight: 80 } : { maxHeight: '40vh' }}
rows={1}
oninput={handleInput}
onpaste={handlePaste}
diff --git a/frontend/src/lib/components/copilot/chat/composerBox.ts b/frontend/src/lib/components/copilot/chat/composerBox.ts
index 3326e58274..f20d7dda91 100644
--- a/frontend/src/lib/components/copilot/chat/composerBox.ts
+++ b/frontend/src/lib/components/copilot/chat/composerBox.ts
@@ -23,8 +23,11 @@ export function composerBoxClass(disabled: boolean = false): string {
}
/** Added to a usable box that opens a session (Home, an empty session). Focus shows as the
- * base box's border colour alone: the brand has no focus ring. */
-export const HERO_BOX_CLASS = 'rounded-[10px]'
+ * base box's border colour alone: the brand has no focus ring. On Home, an open composer
+ * floats over the lists scrolling under it, so it takes the brand's elevation for moving
+ * elements. */
+export const HERO_BOX_CLASS =
+ 'rounded-[10px] transition-[border-color,box-shadow] group-has-[[data-composer-open]]/home:shadow-md'
/** Applied to the field inside the box; without it the field draws a second border. */
export const COMPOSER_FIELD_RESET =
diff --git a/frontend/src/lib/components/copilot/chat/starter/composerCollapse.ts b/frontend/src/lib/components/copilot/chat/starter/composerCollapse.ts
index 5c082154fc..5b88d13a37 100644
--- a/frontend/src/lib/components/copilot/chat/starter/composerCollapse.ts
+++ b/frontend/src/lib/components/copilot/chat/starter/composerCollapse.ts
@@ -12,3 +12,14 @@ export function isComposerOverlay(target: EventTarget | null): boolean {
if (target instanceof Element && target.closest(OVERLAY)) return true
return document.querySelector(OVERLAY) !== null
}
+
+/** Whether a pointer-down outside the composer leaves it open: it is on a control that brings
+ * the user to it (`data-asks-for-composer`, New session), where folding it on the way in would
+ * collapse it and open it again under the user's eyes, or on what the user works in alongside
+ * it (`data-works-with-composer`, Home's lists), where a click adds an item to it. */
+export function asksForComposer(target: EventTarget | null): boolean {
+ return (
+ target instanceof Element &&
+ target.closest('[data-asks-for-composer], [data-works-with-composer]') !== null
+ )
+}
diff --git a/frontend/src/lib/components/details/FlowDetail.svelte b/frontend/src/lib/components/details/FlowDetail.svelte
index 862435fb57..1d68a50ed1 100644
--- a/frontend/src/lib/components/details/FlowDetail.svelte
+++ b/frontend/src/lib/components/details/FlowDetail.svelte
@@ -83,6 +83,7 @@
useOperatingWorkspaceHref
} from '$lib/components/operatingWorkspace.svelte'
import FlowChat from '$lib/components/flows/conversations/FlowChat.svelte'
+ import { page } from '$app/state'
import { slide } from 'svelte/transition'
import { twMerge } from 'tailwind-merge'
import CiTestResults from '$lib/components/CiTestResults.svelte'
@@ -857,6 +858,7 @@
flowModules={flow?.value?.modules}
wideLayout
frame="none"
+ openConversation={page.url.searchParams.get('conversation') ?? undefined}
/>
{:else}
{@const hasSchema =
diff --git a/frontend/src/lib/components/flows/content/AgentEditorHost.svelte b/frontend/src/lib/components/flows/content/AgentEditorHost.svelte
index cdec419e5a..aea13e544d 100644
--- a/frontend/src/lib/components/flows/content/AgentEditorHost.svelte
+++ b/frontend/src/lib/components/flows/content/AgentEditorHost.svelte
@@ -71,6 +71,8 @@
view?: boolean
/** Opens the agent's configuration, offered beside the model it runs with. */
onOpenConfig?: () => void
+ /** A chat conversation to show once the chat is up, as a link to it names one. */
+ openConversation?: string
/** A view's form mode: the run form, drawn by the page. Kept out of this component because
* the flow editor reaches it, and the run form reads the navigation workspace. */
viewForm?: import('svelte').Snippet<
@@ -95,6 +97,7 @@
isNew = false,
view = false,
onOpenConfig = undefined,
+ openConversation = undefined,
viewForm = undefined
}: Props = $props()
@@ -726,6 +729,7 @@
inputSchema={AGENT_CHAT_SCHEMA}
flowModules={chatModules}
composerSettings={onOpenConfig ? configButton : undefined}
+ {openConversation}
/>
diff --git a/frontend/src/lib/components/flows/conversations/FlowChat.svelte b/frontend/src/lib/components/flows/conversations/FlowChat.svelte
index 321caeb190..4de08fa67a 100644
--- a/frontend/src/lib/components/flows/conversations/FlowChat.svelte
+++ b/frontend/src/lib/components/flows/conversations/FlowChat.svelte
@@ -63,6 +63,8 @@
subject?: 'flow' | 'agent'
/** The host's own controls, after the model's in the composer's footer. */
composerSettings?: import('svelte').Snippet
+ /** A conversation to show once the chat is up, as a link to it names one. */
+ openConversation?: string
}
let {
@@ -78,7 +80,8 @@
frame = 'top',
conversationKind = 'deployed',
subject = 'flow',
- composerSettings = undefined
+ composerSettings = undefined,
+ openConversation = undefined
}: Props = $props()
const flowEditorContext = getContext('FlowEditorContext')
@@ -164,6 +167,10 @@
}
})
const unsubscribePool = createdPool.subscribe((s) => (poolState = s))
+ // Untracked: following the link once is the whole job; a later change of the prop must
+ // not rebuild every chat of the flow.
+ const linked = untrack(() => openConversation)
+ if (linked) createdPool.select(linked)
listChat = createdList
pool = createdPool
return () => {
diff --git a/frontend/src/lib/components/flows/conversations/agentEditorChat.ts b/frontend/src/lib/components/flows/conversations/agentEditorChat.ts
index 0f1bc86bda..b7b53851c9 100644
--- a/frontend/src/lib/components/flows/conversations/agentEditorChat.ts
+++ b/frontend/src/lib/components/flows/conversations/agentEditorChat.ts
@@ -13,6 +13,11 @@ export function agentChatPath(agentPath: string): string {
return `${agentPath}.chat`
}
+/** The agent a conversation's path files it under, or undefined for a flow's own chat. */
+export function agentOfChatPath(chatPath: string): string | undefined {
+ return chatPath.endsWith('.chat') ? chatPath.slice(0, -'.chat'.length) : undefined
+}
+
/** The id of the one step a saved agent's run is made of, as the server names it too: job-read
* scoping and the run's agent detection match on it, so it is only ever relabeled for display. */
export const AGENT_STEP_ID = '__wm_agent_root'
diff --git a/frontend/src/lib/components/home/CreateActionsMenu.svelte b/frontend/src/lib/components/home/CreateActionsMenu.svelte
index 9b8db55066..ed170919da 100644
--- a/frontend/src/lib/components/home/CreateActionsMenu.svelte
+++ b/frontend/src/lib/components/home/CreateActionsMenu.svelte
@@ -113,6 +113,11 @@
// kept static so tailwind doesn't purge the badge tones
const badgeAdvanced = 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300'
+ // While Home's composer is open (`data-composer-open`) the button looks like the default
+ // variant: that state lives in the DOM, not in a prop. The border is an inset ring so the
+ // button keeps its width.
+ const QUIET_AS_DEFAULT =
+ 'group-has-[[data-composer-open]]/home:bg-transparent group-has-[[data-composer-open]]/home:hover:bg-surface-hover group-has-[[data-composer-open]]/home:text-primary group-has-[[data-composer-open]]/home:ring-1 group-has-[[data-composer-open]]/home:ring-inset group-has-[[data-composer-open]]/home:ring-border-light'
const badgeLegacy = 'bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300'
const badgeAlpha = 'bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300'
const badgeRecommended = 'bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300'
@@ -535,6 +540,7 @@
aiDescription="Create a new script, flow or app"
unifiedSize="md"
variant="accent"
+ btnClasses={QUIET_AS_DEFAULT}
startIcon={{ icon: Plus }}
endIcon={{ icon: ChevronDown }}
bind:element={triggerEl}
diff --git a/frontend/src/lib/components/home/HomeAIChat.svelte b/frontend/src/lib/components/home/HomeAIChat.svelte
index d0fe016745..b1e3948c59 100644
--- a/frontend/src/lib/components/home/HomeAIChat.svelte
+++ b/frontend/src/lib/components/home/HomeAIChat.svelte
@@ -113,8 +113,6 @@
fork shares its parent's, and remounting for it only flashes the block. Also keyed
on the asks for another draft (New session, a draft picked in the session list). -->
{#if HomeSessionStarter && sessionState.hydrated}
-
{#key `${$currentWorkspaceRootId}:${homeDraft.requests}`}
{#if favoriteManager.loadedFor === workspace && (entries.length > 0 || emptiedBySettings) && !hidden}
-
+