Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(ui): restore guided creation and joined view controls (#8855)
Jacob Beckermanaaa82d5a511a
diff --git a/.agents/rules/web/design-system.md b/.agents/rules/web/design-system.mdindex 8c0e36dc8f..43f9a1deb5 100644--- a/.agents/rules/web/design-system.md+++ b/.agents/rules/web/design-system.md@@ -15,7 +15,7 @@ construction. Browse them at `/app/component/ui` (Foundations → Controls).| Role | Use | Never || --- | --- | --- |-| Switch a view, section, or one of a few values (`wrap` for preset chips in forms) | `Tabs` | Buttons, a ButtonGroup, or an island acting as tabs |+| Switch a view, section, or one of a few values (`wrap` for separate preset chips in forms) | `Tabs` (desktop pill within a pill) | Buttons, a ButtonGroup, or an island acting as tabs || Tabs that own panels or a dynamic collection (tables, form pages, rename, add) | `TabSelector` (`Root`, `List`, `Tab`, `Panel`, `AddMenu`) | `@kobalte/core/tabs` in a feature || Related header actions (filters, view options, sharing, navigation) | `HeaderActionGroup` | A hand-built bordered row || One on/off toggle, or an icon-only layout choice | `Button` with `aria-pressed` | A custom active tint |@@ -48,8 +48,8 @@ construction. Browse them at `/app/component/ui` (Foundations → Controls).width, order, shrink). Never resize or recolor a control from a wrapper(`[&_button]:size-8`), and don't use `square` for new icon buttons. Enforcedfor wrappers by ast-grep `tsx-no-descendant-button-styles`, warning.-- **FE-64** Keep one selected state: a selected tab and a pressed button share- the pressed fill, flat; unselected options keep the outline Button frame. No+- **FE-64** Keep one selected state: desktop view tabs share one rounded track with an inset selected pill; a selected tab and a pressed button share+ the pressed fill; the inset selected pill has a subtle edge and shadow, while unselected options sit within the shared outer frame. Noaccent text, underlines, or bespoke tints for selection on desktop. The oneexception is the agent composer's Chat/Code switch: `Tabs variant="track"`,a raised pill sliding along the composer tray's track.diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex 2a78c185ab..3d01d0b7df 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -16,6 +16,8 @@## Verifying a change in a real browser+During iterative visual tweaks, use focused browser verification; defer full typechecks and CI checks until the batch is ready or the user requests them.+Any user-visible change should be exercised in a browser before you call it fixed — type-check, biome, and vitest all pass on code that still has the interaction bug.Split dragging and composer reflow have a backend-free browser regression:@@ -530,3 +532,8 @@ See the [download walkthrough](../../docs/agent-guide/files.md#downloading-files- Read [the icon system rules](src/components/icon/system/README.md) before adding or changing interface icons or icon motion. Reuse the original Macro SVG family via individual `@icon/system/...` imports; do not introduce another icon set.- If a glyph is missing, author original SVG geometry on the 24-unit grid with round caps/joins, restrained detail, `currentColor`, and the documented theme-aware weight. Never trace or import proprietary symbol paths. Match active/bold variants and review 14/16/20/24 px in light and dark mode.- Interactive glyphs use the shared `installIconMotion` behavior; do not add per-button bounce/spin effects. Keep state indicators static, preserve accessible control names, and honor reduced motion. See the icon README for wrapper and opt-out attributes.++### Creation choices and notifications++- Reuse `CreateMenuItem` for explanatory New menu entries: original icons, a title, and muted wrapping descriptions, preserving the existing `ViewCreateButton` trigger and each action's feature gates.+- Keep transient toasts in their bounded stack and persistent prompts/reminders in separate regions; preserve keyboard dismissal, full mobile descriptions, and remaining-time pause on hover/focus.diff --git a/apps/web/src/components/app/split-layout/components/SplitHeader.tsx b/apps/web/src/components/app/split-layout/components/SplitHeader.tsxindex 00bd66f858..42db17106b 100644--- a/apps/web/src/components/app/split-layout/components/SplitHeader.tsx+++ b/apps/web/src/components/app/split-layout/components/SplitHeader.tsx@@ -194,8 +194,9 @@ function SplitCloseButton() {return (<Showwhen={- shouldShowSplitCloseButton(layout.manager) ||- !isListViewID(context.handle.content().id)+ (isTouchDevice() && shouldShowSplitCloseButton(layout.manager)) ||+ (!shouldShowSplitCloseButton(layout.manager) &&+ !isListViewID(context.handle.content().id))}><Buttondiff --git a/apps/web/src/components/app/split-layout/components/SplitPanel.tsx b/apps/web/src/components/app/split-layout/components/SplitPanel.tsxindex f5d19d2d8c..346f67b999 100644--- a/apps/web/src/components/app/split-layout/components/SplitPanel.tsx+++ b/apps/web/src/components/app/split-layout/components/SplitPanel.tsx@@ -11,6 +11,7 @@ import { SplitPanelControllerProvider } from '@components/app/split-panel';import { splitContainerAttribute } from '@core/dom-selectors';import { EVENT_MODIFIER_KEYS } from '@core/hotkey/constants';import { useHotkeyDOMScope } from '@core/hotkey/hotkeys';+import { TOKENS } from '@core/hotkey/tokens';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { getSafeAreaInset } from '@core/mobile/safeAreaInsets';import CloseIcon from '@icon/system/regular/x.svg';@@ -145,6 +146,11 @@ export function SplitPanel(props: SplitPanelProps) {props.split.mount.kind === 'component' &&props.split.mount.meta.splitPanelLayout === 'composable';+ const canCloseSplit = () => {+ const manager = globalSplitManager();+ return manager ? shouldShowSplitCloseButton(manager) : false;+ };+const hasSplitHeader = () => {const content = props.handle.content();return (@@ -168,11 +174,11 @@ export function SplitPanel(props: SplitPanelProps) {},canGoForward: props.handle.canGoForward,goForward: props.handle.goForward,- canClose: () => {- const manager = globalSplitManager();- return manager ? shouldShowSplitCloseButton(manager) : false;- },+ canClose: canCloseSplit,close: props.handle.close,+ get closeButtonPlacement() {+ return isTouchDevice() ? 'header' : 'frame';+ },}}><Suspense>@@ -372,6 +378,27 @@ export function SplitPanel(props: SplitPanelProps) {</Show></Panel.Body></Panel>+ <Show when={!isTouchDevice() && canCloseSplit()}>+ <Button+ variant="ghost"+ size="icon-xs"+ label="Close split"+ hotkey={TOKENS.split.close}+ class={cn(+ 'absolute top-0 left-0 z-split-panel-chrome origin-top-left scale-[1.15] size-4 p-0 rounded-none border-0 border-r border-b border-edge-frame bg-panel text-ink-muted/70 hover:bg-hover hover:text-ink',+ props.handle.isSpotLight()+ ? 'rounded-tl-xl rounded-br-xl'+ : 'rounded-tl-md rounded-br-md'+ )}+ data-split-frame-close=""+ onClick={(event) => {+ event.stopPropagation();+ props.handle.close();+ }}+ >+ <CloseIcon class="size-2.5" />+ </Button>+ </Show><Show when={isTouchDevice()}><Suspense><MobilePageActionRow />diff --git a/apps/web/src/components/app/split-panel/SplitPanel.tsx b/apps/web/src/components/app/split-panel/SplitPanel.tsxindex 5e23ea0c4b..02136d183d 100644--- a/apps/web/src/components/app/split-panel/SplitPanel.tsx+++ b/apps/web/src/components/app/split-panel/SplitPanel.tsx@@ -19,6 +19,7 @@ export type SplitPanelController = {goForward: () => void;canClose: () => boolean;close: () => void;+ closeButtonPlacement?: 'header' | 'frame';};const SplitPanelControllerContext = createContext<@@ -256,7 +257,11 @@ function CloseButton(props: SplitControlButtonProps) {const label = () => local.label ?? 'Close';return (- <Show when={controller?.canClose()}>+ <Show+ when={+ controller?.canClose() && controller.closeButtonPlacement !== 'frame'+ }+ ><Button{...rest}type={local.type ?? 'button'}diff --git a/apps/web/src/components/icon/system/README.md b/apps/web/src/components/icon/system/README.mdindex d7f4bdd88d..98777574d9 100644--- a/apps/web/src/components/icon/system/README.md+++ b/apps/web/src/components/icon/system/README.md@@ -53,9 +53,9 @@ Several equivalent concepts (for example `folder` and `folder-simple`) sharethe same drawing to avoid introducing competing silhouettes. Existing brandlogos and the legacy animated showcase retain their own assets and licensing.Interface controls, including editor tools, file types, task states, priorities,-and settings, use this family. Board views use the shared Kanban drawing: three-connected columns with staggered bottoms and open counters, following the-familiar Phosphor silhouette. Brand marks retain their existing assets.+and settings, use this family. Board views use the shared Kanban drawing: three connected columns with+staggered bottoms and open counters, following the familiar Phosphor silhouette. Gantt layouts use `chart-gantt`, with staggered horizontal task bars;+it is also listed in the regular icon gallery. Brand marks retain their existing assets.Icons introduced on main after the source PR retain their existing assets whenthis family has no matching drawing.diff --git a/apps/web/src/components/icon/system/regular/chart-gantt.svg b/apps/web/src/components/icon/system/regular/chart-gantt.svgnew file mode 100644index 0000000000..f5be136a76--- /dev/null+++ b/apps/web/src/components/icon/system/regular/chart-gantt.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" data-macro-icon="chart-gantt">+ <path d="M3.5 3.5v17h17"/><rect x="6.5" y="5" width="7" height="3" rx="1"/><rect x="10.5" y="10.5" width="10" height="3" rx="1"/><rect x="6.5" y="16" width="9" height="3" rx="1"/>+</svg>diff --git a/apps/web/src/components/ui/components/CreationMenus.docs.tsx b/apps/web/src/components/ui/components/CreationMenus.docs.tsxnew file mode 100644index 0000000000..775b6aadce--- /dev/null+++ b/apps/web/src/components/ui/components/CreationMenus.docs.tsx@@ -0,0 +1,39 @@+import { TasksCreateMenu } from '@app/features/tasks-view/components/TasksCreateMenu';+import { defineDoc } from '@app/features/ui-gallery/types';+import { createSignal } from 'solid-js';++// #region demo:tasks+function TasksDemo() {+ const [selected, setSelected] = createSignal('Choose a creation action');+ return (+ <div class="flex flex-col items-center gap-4">+ <TasksCreateMenu+ presentation="toolbar"+ onCreateTask={() => setSelected('Task')}+ onCreateSubtask={() => setSelected('Subtask')}+ onCreateProject={() => setSelected('Project')}+ onCreateTag={() => setSelected('Tag')}+ />+ <p class="text-xs text-ink-muted">+ {selected()} — preview only, nothing is created.+ </p>+ </div>+ );+}+// #endregion+export default defineDoc({+ name: 'Creation Menus',+ category: 'Actions',+ description:+ 'Creation choices use original icons and muted descriptions inside the existing New menu. Tasks, Agents, Calendar, Drive, and CRM share this row treatment.',+ guidelines: {+ do: [+ 'Use CreateMenuItem for a title, icon, and short description of what each action creates.',+ 'Wrap creation rows in Dropdown.Group to preserve the standard menu padding.',+ ],+ dont: [+ 'Replace the existing New trigger or bypass feature gates when adding a creation choice.',+ ],+ },+ demos: [{ id: 'tasks', title: 'Tasks', render: TasksDemo }],+});diff --git a/apps/web/src/components/ui/components/Tabs.docs.tsx b/apps/web/src/components/ui/components/Tabs.docs.tsxindex b2820f77d6..8c3e269026 100644--- a/apps/web/src/components/ui/components/Tabs.docs.tsx+++ b/apps/web/src/components/ui/components/Tabs.docs.tsx@@ -112,7 +112,7 @@ export default defineDoc({name: 'Tabs',category: 'Navigation',description:- 'The one inline single choice: switch a view, a section, or a small set of values. Each option is its own pill; the selected one takes the pressed fill.',+ 'The one inline single choice: switch a view, a section, or a small set of values. Desktop view tabs share one rounded track with an inset selected pill.',status: 'stable',exports: ['Tabs'],import: "import { Tabs } from '@ui';",@@ -122,7 +122,7 @@ export default defineDoc({id: 'view',title: 'View tabs',description:- 'Header view tabs sit after the title, left of the controls. Unselected pills share the outline Button frame at the same height as their neighbours.',+ 'Header view tabs sit after the title, left of the controls. The choices share one rounded track with an inset selected pill, at the same height as neighbouring controls.',render: ViewDemo,},{diff --git a/apps/web/src/components/ui/components/Tabs.tsx b/apps/web/src/components/ui/components/Tabs.tsxindex 6de3054641..d9643dec63 100644--- a/apps/web/src/components/ui/components/Tabs.tsx+++ b/apps/web/src/components/ui/components/Tabs.tsx@@ -20,9 +20,9 @@ export type TabOption<T extends string> = {export type TabsSize = 'sm' | 'md' | 'lg';/**- * Desktop always renders separate pills. Touch keeps the treatment each+ * Desktop joins options inside one segmented frame. Touch keeps the treatment each* surface already had: a sliding pill, a bordered inset track, divided- * segments, or the same separate pills as desktop.+ * segments, or separate pills.*/export type TabsTouchStyle = 'pill' | 'inset' | 'segmented' | 'pills';@@ -41,7 +41,7 @@ export type TabsProps<T extends string> = {ref?: (element: HTMLElement) => void;} & (| {- variant?: 'pills';+ variant?: 'grouped' | 'pills';size?: TabsSize;/** Let many options flow onto more lines; renders pills on touch too. */wrap?: boolean;@@ -61,15 +61,15 @@ export type TabsProps<T extends string> = {/*** One inline single choice: switch a view, a section, or a small set of- * values. On desktop each option is its own pill, the outline Button frame,- * and the selected option takes the pressed fill.+ * values. On desktop options share one rounded frame with dividers,+ * and the selected segment takes the pressed fill.** @do Use for two to six short options that are all visible at once.* @do Put view tabs left of the header controls, after the title.* @do Use `iconOnly` to collapse a narrow header; keep `label` as the name.* @do Use `size` to match neighbouring controls: `md` beside 32px buttons.* @do Set `touch` to the look the surface had on touch: `pill` (sliding),- * `inset`, `segmented`, or `pills` for separate pills like desktop.+ * `inset`, `segmented`, or `pills` for separate pills.* @dont Do not build tabs from Buttons, a ButtonGroup, or HeaderActionGroup.* @dont Do not put Tabs inside a HeaderActionGroup or ButtonGroup.* @dont Do not use Tabs for tabs that own panels or a dynamic collection; use TabSelector.@@ -81,7 +81,7 @@ export function Tabs<T extends string>(props: TabsProps<T>) {const option = props.options.find((option) => option.value === value);if (option) props.onChange(option.value);};- // Desktop and wrapping rows always render separate pills.+ // Wrapping presets retain separate pills; desktop view tabs share a frame.const touchStyle = (): TabsTouchStyle =>isTouchDevice() && !props.wrap ? (props.touch ?? 'pill') : 'pills';@@ -124,6 +124,29 @@ export function Tabs<T extends string>(props: TabsProps<T>) {<Match when={props.variant === 'track'}><Track {...props} /></Match>+ <Match+ when={!isTouchDevice() && !props.wrap && props.variant !== 'pills'}+ >+ <div+ class={cn(+ 'inline-flex min-w-0 items-center overflow-hidden rounded-full border border-edge-button bg-control elevated gap-0.5 p-0.5',+ props.size === 'sm' ? 'h-6' : props.size === 'lg' ? 'h-9' : 'h-8',+ props.fullWidth && 'w-full'+ )}+ >+ <For each={props.options}>+ {(option) => (+ <PillOption+ option={option}+ size={props.size ?? 'md'}+ iconOnly={props.iconOnly ?? false}+ fullWidth={props.fullWidth ?? false}+ joined+ />+ )}+ </For>+ </div>+ </Match><Match when={touchStyle() === 'pill'}><TouchPill {...props} /></Match>@@ -172,6 +195,7 @@ function PillOption<T extends string>(props: {size: TabsSize;iconOnly: boolean;fullWidth: boolean;+ joined?: boolean;}) {const square = () => props.iconOnly && props.option.icon !== undefined;const item = () => (@@ -179,16 +203,19 @@ function PillOption<T extends string>(props: {value={props.option.value}disabled={props.option.disabled}class={cn(- 'relative inline-flex min-w-0 shrink-0 rounded-full border text-ink-muted transition-colors duration-120 motion-reduce:transition-none',- // Unselected options share the outline Button frame.- 'bg-control elevated not-touch:not-data-checked:hover:overlay-hover not-touch:not-data-checked:hover:text-ink',- // The selected option takes the pressed fill, flat like a pressed Button.- 'data-checked:border-edge-button data-checked:overlay-active data-checked:text-ink data-checked:shadow-none',+ 'relative inline-flex min-w-0 shrink-0 text-ink-muted transition-colors duration-120 motion-reduce:transition-none',+ props.joined+ ? 'h-full rounded-full border border-transparent data-checked:border-edge-button data-checked:shadow-sm'+ : 'rounded-full border bg-control elevated data-checked:shadow-none',+ // The joined track leaves a visible inset around each rounded option.+ 'not-touch:not-data-checked:hover:overlay-hover not-touch:not-data-checked:hover:text-ink',+ // The selected option uses the same pressed fill as a pressed Button.+ 'data-checked:border-edge-button data-checked:overlay-active data-checked:text-ink','has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-edge-focus','data-disabled:pointer-events-none data-disabled:opacity-50',- props.size === 'sm' && 'h-6',- props.size === 'md' && 'h-8',- props.size === 'lg' && 'h-9',+ !props.joined && props.size === 'sm' && 'h-6',+ !props.joined && props.size === 'md' && 'h-8',+ !props.joined && props.size === 'lg' && 'h-9',square() && 'aspect-square',props.fullWidth && 'flex-1')}@@ -221,7 +248,12 @@ function PillOption<T extends string>(props: {return (<Show when={square()} fallback={item()}>- <Tooltip label={props.option.label}>{item()}</Tooltip>+ <Tooltip+ label={props.option.label}+ class={props.joined ? 'h-full' : undefined}+ >+ {item()}+ </Tooltip></Show>);}diff --git a/apps/web/src/components/ui/components/Toast.docs.tsx b/apps/web/src/components/ui/components/Toast.docs.tsxnew file mode 100644index 0000000000..89c96a7b99--- /dev/null+++ b/apps/web/src/components/ui/components/Toast.docs.tsx@@ -0,0 +1,91 @@+import { defineDoc } from '@app/features/ui-gallery/types';+import { toast } from '@core/component/Toast/Toast';+import LinkIcon from '@icon/system/regular/link.svg';+import { onCleanup } from 'solid-js';+import { Button } from './Button';++// #region demo:notifications+function NotificationsDemo() {+ const ids: number[] = [];+ const remember = (id: number | undefined) => {+ if (id !== undefined) ids.push(id);+ };+ onCleanup(() => ids.forEach((id) => toast.dismiss(id)));+ return (+ <div class="flex flex-wrap gap-2">+ <Button+ variant="outline"+ onClick={() =>+ remember(toast.success('Changes saved', { stack: true }))+ }+ >+ Success+ </Button>+ <Button+ variant="outline"+ onClick={() => {+ for (const message of [+ 'Link copied',+ 'Document saved',+ 'Files organized',+ ]) {+ remember(toast.success(message, { stack: true, duration: 12000 }));+ }+ }}+ >+ Preview stack+ </Button>+ <Button+ variant="outline"+ onClick={() =>+ remember(+ toast.custom(+ {+ title: 'Reconnect email and calendar',+ content: () => '[email protected]',+ icon: LinkIcon,+ actions: [+ {+ label: 'Reconnect',+ onClick: () =>+ remember(+ toast.success('Preview only — no account changes', {+ stack: true,+ })+ ),+ },+ ],+ },+ { persistent: true, region: 'prompt-region' }+ )+ )+ }+ >+ Persistent prompt+ </Button>+ </div>+ );+}+// #endregion++export default defineDoc({+ name: 'Toast',+ category: 'Feedback',+ description:+ 'Compact notifications with soft light-theme shadows, raised dark-theme surfaces, a layered desktop stack, gentle entrance and exit motion, and accessible actions. Hover or focus the stack to expand it and pause dismissal.',+ import: "import { toast } from '@core/component/Toast/Toast';",+ demos: [+ { id: 'notifications', title: 'Notifications', render: NotificationsDemo },+ ],+ guidelines: {+ do: [+ 'Use a short title and put supporting details in subtext.',+ 'Reserve persistent prompts for notices that need a response.',+ 'Verify both themes, keyboard focus, and reduced motion.',+ ],+ dont: [+ 'Use a toast for information that must remain in the page.',+ 'Add custom colors, shadows, or animations in consumers.',+ ],+ },+});diff --git a/apps/web/src/components/view-shell/CreateMenuItem.tsx b/apps/web/src/components/view-shell/CreateMenuItem.tsxnew file mode 100644index 0000000000..8fac1ce529--- /dev/null+++ b/apps/web/src/components/view-shell/CreateMenuItem.tsx@@ -0,0 +1,43 @@+import { cn, Dropdown } from '@ui';+import {+ type Component,+ type ComponentProps,+ createUniqueId,+ splitProps,+} from 'solid-js';++/** Creation choices with a concise explanation of when to use each one. */+export function CreateMenuItem(+ props: ComponentProps<typeof Dropdown.Item> & {+ icon: Component<{ class?: string }>;+ title: string;+ description: string;+ }+) {+ const [local, rest] = splitProps(props, [+ 'icon',+ 'title',+ 'description',+ 'class',+ ]);+ const descriptionId = createUniqueId();+ return (+ <Dropdown.Item+ {...rest}+ aria-label={local.title}+ aria-describedby={descriptionId}+ class={cn('items-start gap-3 py-3', local.class)}+ >+ <local.icon class="mt-0.5 size-5 shrink-0" />+ <span class="flex min-w-0 flex-col gap-1">+ <span>{local.title}</span>+ <span+ id={descriptionId}+ class="whitespace-normal font-[family-name:Inter_Variable,sans-serif] text-xs font-normal text-ink-extra-muted"+ >+ {local.description}+ </span>+ </span>+ </Dropdown.Item>+ );+}diff --git a/apps/web/src/components/view-shell/ListDropdowns.tsx b/apps/web/src/components/view-shell/ListDropdowns.tsxindex 52ea650a4d..b1d4d28fcb 100644--- a/apps/web/src/components/view-shell/ListDropdowns.tsx+++ b/apps/web/src/components/view-shell/ListDropdowns.tsx@@ -2,13 +2,13 @@ import {FilterSubmenu,SearchableFilterSubmenu,} from '@app/features/next-soup/soup-view/filters-bar/filter-menu';+import GanttIcon from '@icon/system/regular/chart-gantt.svg';import CheckIcon from '@icon/system/regular/check.svg';import FilterIcon from '@icon/system/regular/funnel-simple.svg';import BoardIcon from '@icon/system/regular/kanban.svg';import ListIcon from '@icon/system/regular/list-bullets.svg';import SortIcon from '@icon/system/regular/sort-ascending.svg';import GroupIcon from '@icon/system/regular/stack.svg';-import GanttIcon from '@phosphor/chart-bar-horizontal.svg';import { Key } from '@solid-primitives/keyed';import { cn, Dropdown } from '@ui';import { batch, createSignal, For, type JSX, Show } from 'solid-js';diff --git a/apps/web/src/components/view-shell/README.md b/apps/web/src/components/view-shell/README.mdindex a6565681d6..0b57354983 100644--- a/apps/web/src/components/view-shell/README.md+++ b/apps/web/src/components/view-shell/README.md@@ -29,3 +29,5 @@ align trailing controls by their outer edges or offset an individual icon.- `TreeItem` and `Branch` own disclosure positioning and the nested rail.- Use `--sidebar-action-inset` for a trailing control beside a separate selectablerow, as in Email's inbox list. Do not repeat numeric offsets in the workspace.++Desktop multi-split close controls live in the outer frame corner. The inherited split controller sets `closeButtonPlacement` to `frame` to suppress duplicate header/sidebar close buttons; touch layouts retain header placement.diff --git a/apps/web/src/components/view-shell/browser-test/creation-and-toasts.browser.e2e.ts b/apps/web/src/components/view-shell/browser-test/creation-and-toasts.browser.e2e.tsnew file mode 100644index 0000000000..00e77a1355--- /dev/null+++ b/apps/web/src/components/view-shell/browser-test/creation-and-toasts.browser.e2e.ts@@ -0,0 +1,56 @@+import { expect, test } from '@playwright/test';++const fixture =+ '/src/components/view-shell/browser-test/creation-and-toasts.html';+for (const viewport of [+ { name: 'desktop', width: 1280, height: 800 },+ { name: 'phone', width: 390, height: 844 },+]) {+ test.describe(viewport.name, () => {+ test.use({ hasTouch: viewport.name === 'phone' });+ test(`creation choices and notifications on ${viewport.name}`, async ({+ page,+ }) => {+ await page.setViewportSize(viewport);+ await page.goto(fixture);+ const tabs = page.getByRole('radiogroup', { name: 'Channel views' });+ await tabs.getByText('Calls', { exact: true }).click();+ await expect(+ tabs.getByRole('radio', { name: 'Calls', exact: true })+ ).toBeChecked();+ if (viewport.name === 'desktop') {+ const labels = tabs.locator('label');+ const first = await labels.nth(0).boundingBox();+ const second = await labels.nth(1).boundingBox();+ const gap = second!.x - first!.x - first!.width;+ expect(gap).toBeGreaterThanOrEqual(2);+ expect(gap).toBeLessThanOrEqual(5);+ }+ await page+ .getByRole('button', { name: 'New task, subtask, project, or tag' })+ .click();+ const menu = page.getByRole('menu');+ await expect(+ menu.getByText(+ 'Choose a parent task and break its work into a smaller step.'+ )+ ).toBeVisible();+ const bounds = await menu.boundingBox();+ expect(bounds!.x).toBeGreaterThanOrEqual(0);+ expect(bounds!.x + bounds!.width).toBeLessThanOrEqual(viewport.width);+ await page.keyboard.press('Escape');+ await page.getByRole('button', { name: 'Show notices' }).click();+ await expect(page.locator('[data-macro-toast]')).toHaveCount(+ viewport.name === 'desktop' ? 3 : 1+ );+ await page.getByRole('button', { name: 'Show prompt' }).click();+ await expect(+ page.getByText('Demo only — no account changes.')+ ).toBeVisible();+ await page.getByRole('button', { name: 'Review', exact: true }).click();+ await expect(+ page.getByText('Reviewed demo — this preview does not save data.')+ ).toBeVisible();+ });+ });+}diff --git a/apps/web/src/components/view-shell/browser-test/creation-and-toasts.html b/apps/web/src/components/view-shell/browser-test/creation-and-toasts.htmlnew file mode 100644index 0000000000..d79b860667--- /dev/null+++ b/apps/web/src/components/view-shell/browser-test/creation-and-toasts.html@@ -0,0 +1,2 @@+<!doctype html>+<html lang="en"><head><meta charset="UTF-8"><title>Creation menus and toasts</title></head><body><div id="root"></div><script type="module" src="./creation-and-toasts.tsx"></script></body></html>diff --git a/apps/web/src/components/view-shell/browser-test/creation-and-toasts.tsx b/apps/web/src/components/view-shell/browser-test/creation-and-toasts.tsxnew file mode 100644index 0000000000..03ef476f81--- /dev/null+++ b/apps/web/src/components/view-shell/browser-test/creation-and-toasts.tsx@@ -0,0 +1,84 @@+import { isMobile } from '@core/mobile/isMobile';+import { isTouchDevice } from '@core/mobile/isTouchDevice';+import '@app/index.css';+import { TasksCreateMenu } from '@app/features/tasks-view/components/TasksCreateMenu';+import { toast } from '@core/component/Toast/Toast';+import { ToastRegion } from '@core/component/Toast/ToastRegion';+import { Button, Tabs } from '@ui';+import { createSignal } from 'solid-js';+import { render } from 'solid-js/web';++document.documentElement.dataset.touchDevice = String(isTouchDevice());++function Fixture() {+ const [view, setView] = createSignal('messages');+ const [selected, setSelected] = createSignal('Nothing created');+ return (+ <main class="min-h-screen bg-page p-8 text-ink">+ <h1 class="mb-6 text-xl font-semibold">+ Creation menus and notifications+ </h1>+ <div class="flex flex-wrap gap-3">+ <TasksCreateMenu+ presentation="toolbar"+ onCreateTask={() => setSelected('Task')}+ onCreateSubtask={() => setSelected('Subtask')}+ onCreateProject={() => setSelected('Project')}+ onCreateTag={() => setSelected('Tag')}+ />+ <Button+ onClick={() => {+ for (const message of [+ 'Link copied',+ 'Document saved',+ 'Files organized',+ ])+ toast.success(message, { stack: true, duration: 30000 });+ }}+ >+ Show notices+ </Button>+ <Button+ onClick={() =>+ toast.custom(+ {+ title: 'Connection needs attention',+ content: () => 'Demo only — no account changes.',+ actions: [+ {+ label: 'Review',+ onClick: () => setSelected('Reviewed demo'),+ },+ ],+ },+ {+ persistent: true,+ region: isMobile() ? 'mobile-prompt-region' : 'prompt-region',+ }+ )+ }+ >+ Show prompt+ </Button>+ </div>+ <p class="mt-5 text-sm text-ink-muted">+ {selected()} — this preview does not save data.+ </p>+ <div class="mt-6">+ <Tabs+ aria-label="Channel views"+ options={[+ { value: 'messages', label: 'Messages' },+ { value: 'attachments', label: 'Attachments' },+ { value: 'calls', label: 'Calls' },+ { value: 'participants', label: 'Participants' },+ ]}+ value={view()}+ onChange={setView}+ />+ </div>+ <ToastRegion />+ </main>+ );+}+render(() => <Fixture />, document.getElementById('root')!);diff --git a/apps/web/src/components/view-shell/browser-test/playwright.config.ts b/apps/web/src/components/view-shell/browser-test/playwright.config.tsnew file mode 100644index 0000000000..fef5b97ed4--- /dev/null+++ b/apps/web/src/components/view-shell/browser-test/playwright.config.ts@@ -0,0 +1,19 @@+import { fileURLToPath } from 'node:url';+import { defineConfig } from '@playwright/test';++const webDirectory = fileURLToPath(new URL('../../../../', import.meta.url));+const port = '3050';+export default defineConfig({+ testDir: '.',+ testMatch: '*.browser.e2e.ts',+ workers: 1,+ timeout: 60000,+ use: { baseURL: `http://localhost:${port}`, headless: true },+ webServer: {+ command: `MACRO_DEV_HTTPS=false bunx vite --port ${port} --strictPort`,+ cwd: webDirectory,+ url: `http://localhost:${port}/app/`,+ reuseExistingServer: false,+ timeout: 60000,+ },+});diff --git a/apps/web/src/features/agents-view/components/AgentsSidebar.test.tsx b/apps/web/src/features/agents-view/components/AgentsSidebar.test.tsxindex 01ebbf98bc..91f7b46a23 100644--- a/apps/web/src/features/agents-view/components/AgentsSidebar.test.tsx+++ b/apps/web/src/features/agents-view/components/AgentsSidebar.test.tsx@@ -4,10 +4,11 @@ import {fireEvent,render,screen,+ waitFor,within,} from '@solidjs/testing-library';import { createSignal, type JSX } from 'solid-js';-import { afterEach, describe, expect, it, vi } from 'vitest';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import {type ConversationFilters,EMPTY_CONVERSATION_FILTERS,@@ -55,6 +56,10 @@ vi.mock('@core/user', () => ({tryMacroId: (id: string) => id,}));+beforeEach(() => {+ vi.spyOn(window, 'scrollTo').mockImplementation(() => {});+});+afterEach(() => {cleanup();unreadFilter.mockReturnValue(false);@@ -140,6 +145,8 @@ describe('mixed Agents sidebar', () => {const openPage = vi.fn();render(() => (<AgentsSidebar+ onCreateAgent={vi.fn()}+ onCreateRoutine={vi.fn()}filters={filters()}grouping="status"onFilterChange={vi.fn()}@@ -199,8 +206,16 @@ describe('mixed Agents sidebar', () => {expect(screen.queryByRole('button', { name: /Plan launch/ })).toBeNull();expect(screen.queryByText('Archived')).toBeNull();- fireEvent.click(screen.getByRole('button', { name: 'New conversation' }));- expect(openPage).toHaveBeenCalledWith('new');+ fireEvent.keyDown(+ screen.getByRole('button', { name: 'New conversation or agent' }),+ { key: 'ArrowDown' }+ );+ fireEvent.keyDown(+ await screen.findByRole('menuitem', { name: 'Conversation' }),+ { key: 'Enter' }+ );+ await Promise.resolve();+ await waitFor(() => expect(openPage).toHaveBeenCalledWith('new'));});it('keeps paging while filters leave too few conversations to scroll', () => {@@ -208,6 +223,8 @@ describe('mixed Agents sidebar', () => {const clear = vi.fn();render(() => (<AgentsSidebar+ onCreateAgent={vi.fn()}+ onCreateRoutine={vi.fn()}filters={{ ...EMPTY_CONVERSATION_FILTERS, type: ['code'] }}grouping="none"onFilterChange={vi.fn()}@@ -247,6 +264,8 @@ describe('mixed Agents sidebar', () => {const change = vi.fn(setShow);render(() => (<AgentsSidebar+ onCreateAgent={vi.fn()}+ onCreateRoutine={vi.fn()}filters={EMPTY_CONVERSATION_FILTERS}grouping="none"onFilterChange={vi.fn()}@@ -315,6 +334,8 @@ describe('mixed Agents sidebar', () => {it('opens rename and delete on a session or chat right-click', async () => {render(() => (<AgentsSidebar+ onCreateAgent={vi.fn()}+ onCreateRoutine={vi.fn()}filters={EMPTY_CONVERSATION_FILTERS}grouping="none"onFilterChange={vi.fn()}@@ -421,6 +442,8 @@ describe.each(['home', 'sidebar'] as const)('%s agent rows', (surface) => {/>) : (<AgentsSidebar+ onCreateAgent={vi.fn()}+ onCreateRoutine={vi.fn()}filters={EMPTY_CONVERSATION_FILTERS}grouping="none"onFilterChange={vi.fn()}diff --git a/apps/web/src/features/agents-view/components/AgentsSidebar.tsx b/apps/web/src/features/agents-view/components/AgentsSidebar.tsxindex 9057a97470..f6687322f8 100644--- a/apps/web/src/features/agents-view/components/AgentsSidebar.tsx+++ b/apps/web/src/features/agents-view/components/AgentsSidebar.tsx@@ -5,7 +5,8 @@ import {useViewControlHotkeys,ViewSidebar,} from '@app/components/view-shell';-import { SidebarCreateButton } from '@app/components/view-shell/SidebarCreateButton';+import { CreateMenuItem } from '@app/components/view-shell/CreateMenuItem';+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import { changeSessionArchiveState } from '@app/features/block-agent/queries/change-session-archive-state';import {type EntityActionListState,@@ -22,14 +23,16 @@ import { useUserId } from '@core/context/user';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { unreadFilterFn } from '@entity/utils/filter';import RoutineIcon from '@icon/system/regular/clock-clockwise.svg';+import CodeIcon from '@icon/system/regular/code.svg';import MagnifyingGlassIcon from '@icon/system/regular/magnifying-glass.svg';import PlugIcon from '@icon/system/regular/plugs-connected.svg';import AgentIcon from '@icon/system/regular/sparkle.svg';import TrayIcon from '@icon/system/regular/tray.svg';import { Key } from '@solid-primitives/keyed';-import { cn } from '@ui';+import { cn, Dropdown } from '@ui';import { tourTarget } from '@ui/components/Tour';import { createEffect, createSignal, type JSX, Show } from 'solid-js';+import type { AgentKind } from '../core/agent-kind';import {activeFilterCount,type ConversationFilters,@@ -71,6 +74,8 @@ export type AgentsSidebarProps = Omit<grouping: ConversationGrouping;activePage: AgentsPage | undefined;onOpenPage: (page: AgentsPage) => void;+ onCreateAgent: (kind: AgentKind) => void;+ onCreateRoutine: () => void;modeForConversation: (conversation: AgentConversationEntity) => AgentsMode;activeConversationId: string | undefined;search: string;@@ -296,9 +301,10 @@ export function AgentsSidebar(props: AgentsSidebarProps) {<Show when={!isTouchDevice()}><ViewSidebar.Primary>- <SidebarCreateButton- label="New conversation"- onCreate={() => props.onOpenPage('new')}+ <AgentCreateMenu+ onCreate={props.onCreateAgent}+ onRoutine={props.onCreateRoutine}+ onConversation={() => props.onOpenPage('new')}/></ViewSidebar.Primary></Show>@@ -468,3 +474,56 @@ export function AgentsSidebar(props: AgentsSidebarProps) {</MaybeSoupEntityActionDrawerManager>);}++export function AgentCreateMenu(props: {+ onCreate: (kind: AgentKind) => void;+ onRoutine: () => void;+ onConversation: () => void;+}) {+ return (+ <Dropdown placement="bottom-start">+ <Dropdown.Trigger+ as={ViewCreateButton}+ presentation="sidebar"+ menu+ aria-label="New conversation or agent"+ />+ <Dropdown.Content class="w-80 max-w-[calc(100vw-2rem)]">+ <Dropdown.Group>+ <CreateMenuItem+ icon={AgentIcon}+ title="Conversation"+ description="Start a conversation with an existing agent."+ onSelect={() => {+ queueMicrotask(props.onConversation);+ }}+ />+ <CreateMenuItem+ icon={AgentIcon}+ title="Work agent"+ description="Create an assistant with instructions and access to your Macro workspace."+ onSelect={() => {+ queueMicrotask(() => props.onCreate('agent'));+ }}+ />+ <CreateMenuItem+ icon={CodeIcon}+ title="Coding agent"+ description="Create an agent that works in a connected coding harness."+ onSelect={() => {+ queueMicrotask(() => props.onCreate('coder'));+ }}+ />+ <CreateMenuItem+ icon={RoutineIcon}+ title="Routine"+ description="Set up an agent to run on a recurring schedule."+ onSelect={() => {+ queueMicrotask(props.onRoutine);+ }}+ />+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ );+}diff --git a/apps/web/src/features/agents-view/views/AgentsView.tsx b/apps/web/src/features/agents-view/views/AgentsView.tsxindex ecc4cb0a1a..5df795927b 100644--- a/apps/web/src/features/agents-view/views/AgentsView.tsx+++ b/apps/web/src/features/agents-view/views/AgentsView.tsx@@ -90,6 +90,7 @@ function AgentsWorkspace(props: { initialRoute?: AgentsRoute }) {// The composer's Chat/Code choice; an open conversation keeps its own mode.const workspace = createWorkspaceMode(userId());const listView = createConversationListView(userId());+ const [creatingKind, setCreatingKind] = createSignal<AgentKind>();const [localPage, setPage] = createSignal<AgentsPage>('new');const isRoutinesPage = () => {const content = panel.handle.content();@@ -173,6 +174,7 @@ function AgentsWorkspace(props: { initialRoute?: AgentsRoute }) {));const openPage = (next: AgentsPage) => {+ setCreatingKind(undefined);setMobileList(false);if (next === 'routines') {layout.openWithSplit(routineContent(), {@@ -300,6 +302,13 @@ function AgentsWorkspace(props: { initialRoute?: AgentsRoute }) {onClearFilters={listView.clear}onGroupingChange={listView.setGrouping}activePage={selected() ? undefined : page()}+ onCreateRoutine={() =>+ layout.popoverSplit({ type: 'component', id: 'routine-compose' })+ }+ onCreateAgent={(kind) => {+ openPage('agents');+ setCreatingKind(kind);+ }}onOpenPage={(next) =>next === 'new'? showComposer()@@ -383,7 +392,12 @@ function AgentsWorkspace(props: { initialRoute?: AgentsRoute }) {<IntegrationsPage /></Match><Match when={page() === 'agents'}>- <AgentSettings />+ <AgentSettings+ createKind={creatingKind()}+ onCloseCreate={() =>+ setCreatingKind(undefined)+ }+ /></Match></Switch><divdiff --git a/apps/web/src/features/calendar-view/components/CalendarCreateItems.tsx b/apps/web/src/features/calendar-view/components/CalendarCreateItems.tsxindex 04ea6765c7..b21d827a65 100644--- a/apps/web/src/features/calendar-view/components/CalendarCreateItems.tsx+++ b/apps/web/src/features/calendar-view/components/CalendarCreateItems.tsx@@ -1,8 +1,18 @@+import { CreateMenuItem } from '@app/components/view-shell/CreateMenuItem';import { useQuickCallsFlag } from '@app/features/meetings/use-quick-calls-flag';+import {+ bookingLinksSearch,+ bookingLinksSearchCodec,+} from '@app/features/scheduling/booking-links-search';+import { ShowFeatureFlag } from '@app/lib/analytics/posthog';+import { useNavigate as useSplitNavigate } from '@app/lib/split-router';+import { bookingLinksRoute } from '@app/routes/routes';+import { enableCalendarScheduling } from '@core/constant/featureFlags';+import { fireAndForget } from '@core/util/fireAndForget';import CalendarIcon from '@icon/system/regular/calendar-blank.svg';+import LinkIcon from '@icon/system/regular/link.svg';import PhoneIcon from '@icon/system/regular/phone.svg';import { useNavigate } from '@solidjs/router';-import { Dropdown } from '@ui';import { Show } from 'solid-js';import { useOpenEventComposer } from './use-open-event-composer';@@ -12,16 +22,16 @@ export function CalendarCreateEventItem(props: CreateItemProps) {const openEventComposer = useOpenEventComposer();return (- <Dropdown.Item+ <CreateMenuItem+ icon={CalendarIcon}+ title="Event"+ description="Schedule a meeting or block time on your calendar."closeOnSelectonSelect={() => {props.onSelect?.();- void openEventComposer();+ fireAndForget(openEventComposer(), 'calendar');}}- >- <CalendarIcon class="size-4" />- Event- </Dropdown.Item>+ />);}@@ -31,16 +41,49 @@ export function CalendarCreateCallItem(props: CreateItemProps) {return (<Show when={quickCalls().enabled}>- <Dropdown.Item+ <CreateMenuItem+ icon={PhoneIcon}+ title="Call"+ description="Start a live call now and invite others to join."closeOnSelectonSelect={() => {props.onSelect?.();navigate('/meet/new');}}- >- <PhoneIcon class="size-4" />- Call- </Dropdown.Item>+ /></Show>);}++export function CalendarCreateBookingLinkItem(props: CreateItemProps) {+ const navigate = useSplitNavigate();++ return (+ <ShowFeatureFlag flag={enableCalendarScheduling}>+ <CreateMenuItem+ icon={LinkIcon}+ title="Booking link"+ description="Share your availability so others can book a time with you."+ closeOnSelect+ onSelect={() => {+ props.onSelect?.();+ fireAndForget(+ navigate(+ { route: bookingLinksRoute },+ {+ search: {+ [bookingLinksSearch.namespace]:+ bookingLinksSearchCodec.serialize({+ ...bookingLinksSearch.defaults,+ createBookingLink: true,+ }),+ },+ }+ ),+ 'scheduling'+ );+ }}+ />+ </ShowFeatureFlag>+ );+}diff --git a/apps/web/src/features/calendar-view/components/CalendarCreateMenu.tsx b/apps/web/src/features/calendar-view/components/CalendarCreateMenu.tsxindex 744ba712ad..542a390d1e 100644--- a/apps/web/src/features/calendar-view/components/CalendarCreateMenu.tsx+++ b/apps/web/src/features/calendar-view/components/CalendarCreateMenu.tsx@@ -35,11 +35,13 @@ export function CalendarCreateMenu(props: {as={ViewCreateButton}presentation={presentation()}menu- aria-label="New event or call"+ aria-label="New event, call, or booking link"/>)}</Show>- <Dropdown.Content class={props.contentClass ?? 'min-w-40'}>+ <Dropdown.Content+ class={props.contentClass ?? 'w-80 max-w-[calc(100vw-2rem)]'}+ ><Dropdown.Group>{props.children}</Dropdown.Group></Dropdown.Content></Dropdown>diff --git a/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx b/apps/web/src/features/calendar-view/components/CalendarSidebar.tsxindex 6940de5afa..d073dc08fb 100644--- a/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx+++ b/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx@@ -40,6 +40,7 @@ import {import { CalendarCallSidebar } from '../calendar-call-sidebar';import { CALENDAR_TOUR } from '../tour';import {+ CalendarCreateBookingLinkItem,CalendarCreateCallItem,CalendarCreateEventItem,} from './CalendarCreateItems';@@ -330,7 +331,6 @@ export function CalendarSidebar() {presentation={isTouchDevice() ? undefined : 'sidebar'}size="md"class="h-(--sidebar-row-height) w-full min-w-0 justify-start gap-(--sidebar-label-gap) px-(--sidebar-item-inset) text-left touch:h-11"- contentClass="w-[var(--kb-popper-anchor-width)] min-w-40"trigger={<><ViewSidebar.Icon>@@ -343,6 +343,7 @@ export function CalendarSidebar() {><CalendarCreateEventItem onSelect={closeOverlay} /><CalendarCreateCallItem onSelect={closeOverlay} />+ <CalendarCreateBookingLinkItem onSelect={closeOverlay} /></CalendarCreateMenu></ViewSidebar.Primary><ViewSidebar.Content class="pt-2">diff --git a/apps/web/src/features/calendar-view/components/Header.test.tsx b/apps/web/src/features/calendar-view/components/Header.test.tsxindex 09a8d90e94..88e8948c56 100644--- a/apps/web/src/features/calendar-view/components/Header.test.tsx+++ b/apps/web/src/features/calendar-view/components/Header.test.tsx@@ -78,6 +78,7 @@ vi.mock('./CalendarSearch', () => ({vi.mock('./CalendarCreateItems', () => ({CalendarCreateEventItem: () => null,CalendarCreateCallItem: () => null,+ CalendarCreateBookingLinkItem: () => null,}));vi.mock('./CalendarCreateMenu', () => ({CalendarCreateMenu: () => <button>New event or call</button>,diff --git a/apps/web/src/features/calendar-view/components/Header.tsx b/apps/web/src/features/calendar-view/components/Header.tsxindex aa3db0f31b..dbb88190b6 100644--- a/apps/web/src/features/calendar-view/components/Header.tsx+++ b/apps/web/src/features/calendar-view/components/Header.tsx@@ -38,6 +38,7 @@ import {} from 'solid-js';import { CALENDAR_TOUR } from '../tour';import {+ CalendarCreateBookingLinkItem,CalendarCreateCallItem,CalendarCreateEventItem,} from './CalendarCreateItems';@@ -163,6 +164,7 @@ export function Header(props: {<><CalendarCreateEventItem /><CalendarCreateCallItem />+ <CalendarCreateBookingLinkItem /></>);const headerCreateMenu = () => (diff --git a/apps/web/src/features/command/Launcher.tsx b/apps/web/src/features/command/Launcher.tsxindex ad9f82ce14..af44106618 100644--- a/apps/web/src/features/command/Launcher.tsx+++ b/apps/web/src/features/command/Launcher.tsx@@ -1166,6 +1166,7 @@ export const LauncherShell = (description: 'Close Launcher',condition: () =>createMenuOpen() &&+ !searchMode() &&!availableBlocks().some((item) => item.hotkey === 'c'),registrationType: 'add',keyDownHandler: () => {diff --git a/apps/web/src/features/crm/components/crm-create-menu.tsx b/apps/web/src/features/crm/components/crm-create-menu.tsxindex a52c14f70f..4866019eb1 100644--- a/apps/web/src/features/crm/components/crm-create-menu.tsx+++ b/apps/web/src/features/crm/components/crm-create-menu.tsx@@ -1,4 +1,5 @@import { ViewSidebar } from '@app/components/view-shell';+import { CreateMenuItem } from '@app/components/view-shell/CreateMenuItem';import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import { isTouchDevice } from '@core/mobile/isTouchDevice';import BuildingsIcon from '@icon/system/regular/buildings.svg';@@ -47,26 +48,32 @@ export function CrmCreateMenu(props: {menu/></Show>- <Dropdown.Content class="min-w-48">- <Dropdown.Item onSelect={props.onCreateCompany}>- <BuildingsIcon aria-hidden="true" class="size-4 shrink-0" />- <span>Company</span>- </Dropdown.Item>- <Dropdown.Item onSelect={props.onCreateContact}>- <UserIcon aria-hidden="true" class="size-4 shrink-0" />- <span>Contact</span>- </Dropdown.Item>- <Show when={props.pipeline}>- {(pipeline) => (- <Dropdown.Item- disabled={pipeline().disabled}- onSelect={() => pipeline().onCreate()}- >- <TableIcon aria-hidden="true" class="size-4 shrink-0" />- <span>Pipeline</span>- </Dropdown.Item>- )}- </Show>+ <Dropdown.Content class="w-80 max-w-[calc(100vw-2rem)]">+ <Dropdown.Group>+ <CreateMenuItem+ icon={BuildingsIcon}+ title="Company"+ description="Track an organization, its people, and your relationship with it."+ onSelect={props.onCreateCompany}+ />+ <CreateMenuItem+ icon={UserIcon}+ title="Contact"+ description="Keep a person's details and activity connected to their company."+ onSelect={props.onCreateContact}+ />+ <Show when={props.pipeline}>+ {(pipeline) => (+ <CreateMenuItem+ icon={TableIcon}+ title="Pipeline"+ description="Move records through stages to track deals or another repeatable process."+ disabled={pipeline().disabled}+ onSelect={() => pipeline().onCreate()}+ />+ )}+ </Show>+ </Dropdown.Group></Dropdown.Content></Dropdown>);diff --git a/apps/web/src/features/drive-view/drive-create-menu.tsx b/apps/web/src/features/drive-view/drive-create-menu.tsxindex 9d6e299f77..8e30a61cff 100644--- a/apps/web/src/features/drive-view/drive-create-menu.tsx+++ b/apps/web/src/features/drive-view/drive-create-menu.tsx@@ -1,4 +1,5 @@import { ViewSidebar } from '@app/components/view-shell';+import { CreateMenuItem } from '@app/components/view-shell/CreateMenuItem';import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import {CREATABLE_BLOCKS,@@ -8,15 +9,26 @@ import {} from '@app/features/command/Launcher';import { isTouchDevice } from '@core/mobile/isTouchDevice';import CaretDownIcon from '@icon/system/regular/caret-down.svg';+import FileIcon from '@icon/system/regular/file.svg';import FolderIcon from '@icon/system/regular/folder.svg';import PlusIcon from '@icon/system/regular/plus.svg';import UploadIcon from '@icon/system/regular/upload-simple.svg';import { Dropdown } from '@ui';import { For, Show } from 'solid-js';-import { Dynamic } from 'solid-js/web';import { useDriveView } from './context/drive-context';import { driveCreateDestinationLabel } from './core/location-label';+const creationDescriptions: Partial<Record<CreatableName, string>> = {+ md: 'Write and collaborate on notes, plans, or longer documents.',+ snippet: 'Save a reusable piece of text or code for later.',+ spreadsheet: 'Work with tables, formulas, and structured numbers.',+ canvas: 'Sketch ideas and arrange information on a shared canvas.',+ code: 'Write and edit code in a dedicated file.',+ project: 'Keep related files and work together in one place.',+ database: 'Organize records with custom fields and views.',+ form: 'Collect structured responses through a shareable form.',+};+function SidebarTrigger(props: { label: string }) {return (<Dropdown.Trigger as={ViewSidebar.Action} aria-label={props.label}>@@ -105,7 +117,7 @@ export function DriveCreateMenu(props: {aria-label={label()}/></Show>- <Dropdown.Content class="min-w-48 max-w-72">+ <Dropdown.Content class="w-80 max-w-[calc(100vw-2rem)] max-h-[70vh] overflow-y-auto"><Dropdown.Group><Dropdown.GroupLabel class="min-w-0 gap-1.5"><span class="shrink-0">Create in</span>@@ -116,27 +128,31 @@ export function DriveCreateMenu(props: {</Dropdown.GroupLabel><For each={options()}>{(option) => (- <Dropdown.Item onSelect={() => select(option.blockName)}>- <span- aria-hidden="true"- class="flex size-4 shrink-0 items-center justify-center [&_svg]:size-4"- >- <Dynamic component={option.icon} />- </span>- <span>{option.label}</span>- </Dropdown.Item>+ <CreateMenuItem+ icon={option.icon ?? FileIcon}+ title={option.label}+ description={+ creationDescriptions[option.blockName] ??+ `Create a ${option.label.toLowerCase()} in this folder.`+ }+ onSelect={() => select(option.blockName)}+ />)}</For></Dropdown.Group><Dropdown.Group>- <Dropdown.Item onSelect={actions.uploadFiles}>- <UploadIcon aria-hidden="true" class="size-4 shrink-0" />- <span>Upload files</span>- </Dropdown.Item>- <Dropdown.Item onSelect={actions.uploadFolder}>- <FolderIcon aria-hidden="true" class="size-4 shrink-0" />- <span>Upload folder</span>- </Dropdown.Item>+ <CreateMenuItem+ icon={UploadIcon}+ title="Upload files"+ description="Bring existing files from your computer into this folder."+ onSelect={actions.uploadFiles}+ />+ <CreateMenuItem+ icon={FolderIcon}+ title="Upload folder"+ description="Import a folder and the files inside it."+ onSelect={actions.uploadFolder}+ /></Dropdown.Group></Dropdown.Content></Dropdown>diff --git a/apps/web/src/features/email-view/queries/email-results.ts b/apps/web/src/features/email-view/queries/email-results.tsindex b5addeaabc..8906903d78 100644--- a/apps/web/src/features/email-view/queries/email-results.ts+++ b/apps/web/src/features/email-view/queries/email-results.ts@@ -1,4 +1,5 @@import {+ buildGroupedSoupRows,dateBucket,groupSoupEntities,type SoupGroup,@@ -21,3 +22,14 @@ export function groupEmailEntitiesByDate(dateBucket(emailSortTimestamp(firstEntity), now).label,});}++/** Keep today's messages flush with the header; retain older date headings. */+export function buildEmailDateRows(+ entities: WithNotification<EntityData>[],+ now = new Date()+) {+ const rows = buildGroupedSoupRows(groupEmailEntitiesByDate(entities, now));+ if (rows[0]?.kind === 'group-header' && rows[0].groupId === 'today')+ rows.shift();+ return rows;+}diff --git a/apps/web/src/features/email-view/queries/use-email-query.ts b/apps/web/src/features/email-view/queries/use-email-query.tsindex 02dda70513..b947106f4e 100644--- a/apps/web/src/features/email-view/queries/use-email-query.ts+++ b/apps/web/src/features/email-view/queries/use-email-query.ts@@ -2,7 +2,6 @@ import type { ListDataSource } from '@app/components/list';import type { EmailRowReminder } from '@app/features/reminders/core/email-row-reminder';import {buildFlatSoupRows,- buildGroupedSoupRows,createSearchState,createSoupLoadMoreRow,createSoupRowStore,@@ -32,7 +31,7 @@ import { EMAIL_FACETS, type EmailFacetContext } from '../filters/email-facets';import type { EmailTab, EmailViewState } from '../types';import { advanceEmptyAliasPages } from './advance-empty-alias-pages';import { buildEmailQuery, type EmailQueryContext } from './email-query';-import { groupEmailEntitiesByDate } from './email-results';+import { buildEmailDateRows } from './email-results';import { buildEmailSearchRequest } from './email-search';import { emailAdmissionBatches, mergeEmailAdmission } from './read-admission';import { useReminderEmailSource } from './use-reminder-email-source';@@ -449,7 +448,7 @@ export function useEmailDataSource(// bucketed by date.const result: EmailDataSourceItem[] = search.isSearching()? buildFlatSoupRows(listEntities())- : buildGroupedSoupRows(groupEmailEntitiesByDate(listEntities()));+ : buildEmailDateRows(listEntities());if (hasMore()) {result.push(diff --git a/apps/web/src/features/scheduling/booking-links-search.ts b/apps/web/src/features/scheduling/booking-links-search.tsindex 20b47883d1..29a865e6a4 100644--- a/apps/web/src/features/scheduling/booking-links-search.ts+++ b/apps/web/src/features/scheduling/booking-links-search.ts@@ -1,3 +1,4 @@+import { createSearchParamsCodec } from '@app/lib/split-router';import { z } from 'zod';export const bookingLinksSearch = {@@ -5,8 +6,12 @@ export const bookingLinksSearch = {schema: z.object({tab: z.enum(['links', 'availability', 'bookings', 'insights', 'page']),owner: z.string(),+ createBookingLink: z.boolean().optional(),}),- defaults: { tab: 'links' as const, owner: '' },+ defaults: { tab: 'links' as const, owner: '', createBookingLink: false },};export type BookingLinksState = z.infer<typeof bookingLinksSearch.schema>;++export const bookingLinksSearchCodec =+ createSearchParamsCodec(bookingLinksSearch);diff --git a/apps/web/src/features/scheduling/views/booking-workspace-view.tsx b/apps/web/src/features/scheduling/views/booking-workspace-view.tsxindex 802de3368a..0d42949236 100644--- a/apps/web/src/features/scheduling/views/booking-workspace-view.tsx+++ b/apps/web/src/features/scheduling/views/booking-workspace-view.tsx@@ -226,6 +226,21 @@ export function BookingWorkspaceView(props: {if (owner() !== current) return;await current.action(() => current.createEvent(opener));};+ createEffect(+ on(+ () =>+ [search.createBookingLink, owner(), owner()?.source.profile()] as const,+ ([requested, current, profile]) => {+ if (!requested || !current || !profile || !current.scope().canEdit)+ return;+ setSearch({ createBookingLink: false, tab: 'links' });+ fireAndForget(+ current.action(() => current.createEvent()),+ 'scheduling'+ );+ }+ )+ );const createWithAgent = async () => {const current = owner();if (diff --git a/apps/web/src/features/scheduling/views/settings-view.test.tsx b/apps/web/src/features/scheduling/views/settings-view.test.tsxindex 1ac9c23283..c112f5cd5f 100644--- a/apps/web/src/features/scheduling/views/settings-view.test.tsx+++ b/apps/web/src/features/scheduling/views/settings-view.test.tsx@@ -771,3 +771,21 @@ it.each([undefined, 4, 5, 6])(}});++it('consumes Calendar booking-link creation once and keeps it unsaved until Save', async () => {+ const { setSearch, search, onSearchChange, saves } = fixture();+ setSearch({ createBookingLink: true, tab: 'availability' });+ expect(+ await screen.findByRole('button', { name: 'Save test event' })+ ).toBeTruthy();+ expect(search.createBookingLink).toBe(false);+ expect(search.tab).toBe('links');+ expect(onSearchChange).toHaveBeenCalledWith({+ createBookingLink: false,+ tab: 'links',+ });+ expect(saves).not.toHaveBeenCalled();+ fireEvent.click(screen.getByRole('button', { name: 'Cancel test event' }));+ expect(screen.queryByRole('button', { name: 'Save test event' })).toBeNull();+ expect(saves).not.toHaveBeenCalled();+});diff --git a/apps/web/src/features/settings/AgentSettings.test.tsx b/apps/web/src/features/settings/AgentSettings.test.tsxindex b004154fcd..cabe05ff90 100644--- a/apps/web/src/features/settings/AgentSettings.test.tsx+++ b/apps/web/src/features/settings/AgentSettings.test.tsx@@ -3,7 +3,9 @@*/import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { createSignal } from 'solid-js';import { afterEach, describe, expect, it, vi } from 'vitest';+import type { AgentKind } from '../agents-view/core/agent-kind';import { AgentSettings } from './AgentSettings';const searchParams = vi.hoisted(() => ({@@ -15,12 +17,16 @@ vi.mock('@solidjs/router', () => ({vi.mock('./Agents', () => ({Agents: (props: {+ createKind?: AgentKind;+ onCloseCreate?: () => void;onCursor: () => void;onSetUpRuntime: () => void;onManageRuntimes: () => void;}) => (<div><h1>Agents page</h1>+ <span>{props.createKind}</span>+ <button onClick={props.onCloseCreate}>Cancel create</button><button type="button" onClick={props.onCursor}>Connect Cursor</button>@@ -107,3 +113,26 @@ describe('AgentSettings', () => {expect(screen.getByRole('heading', { name: 'Runtimes page' })).toBeTruthy();});});++it('opens a requested creation from runtimes and returns to the agent list on cancel', () => {+ const [kind, setKind] = createSignal<AgentKind>();+ render(() => (+ <AgentSettings+ initialSection="runtimes"+ createKind={kind()}+ onCloseCreate={() => setKind(undefined)}+ />+ ));+ expect(screen.getByText('Runtimes page')).toBeTruthy();+ setKind('coder');+ expect(screen.getByText('coder')).toBeTruthy();+ expect(screen.queryByText('Runtimes page')).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'Cancel create' }));+ expect(screen.getByText('Agents page')).toBeTruthy();+ setKind('agent');+ fireEvent.click(+ screen.getByRole('button', { name: 'Manage paired runtimes' })+ );+ expect(screen.getByText('Runtimes page')).toBeTruthy();+ expect(kind()).toBeUndefined();+});diff --git a/apps/web/src/features/settings/AgentSettings.tsx b/apps/web/src/features/settings/AgentSettings.tsxindex bb36f80305..6d07a87331 100644--- a/apps/web/src/features/settings/AgentSettings.tsx+++ b/apps/web/src/features/settings/AgentSettings.tsx@@ -1,3 +1,4 @@+import type { AgentKind } from '@app/features/agents-view/core/agent-kind';import { useSearchParams } from '@solidjs/router';import { createSignal, Match, Switch } from 'solid-js';import { Agents } from './Agents';@@ -12,29 +13,38 @@ type AgentSettingsPage = AgentManagementSection | 'cursor' | 'pairing';/** One management surface, mounted by both Settings and the Agents workspace. */export function AgentSettings(props: {initialSection?: AgentManagementSection;+ createKind?: AgentKind;+ onCloseCreate?: () => void;}) {const [searchParams] = useSearchParams();const [page, setPage] = createSignal<AgentSettingsPage>(searchParams.pair ? 'runtimes' : (props.initialSection ?? 'agents'));- const showAgents = () => setPage('agents');+ const navigate = (next: AgentSettingsPage) => {+ props.onCloseCreate?.();+ setPage(next);+ };+ const showAgents = () => navigate('agents');+ const activePage = () => (props.createKind ? 'agents' : page());return (<Switch>- <Match when={page() === 'agents'}>+ <Match when={activePage() === 'agents'}><Agents- onCursor={() => setPage('cursor')}- onSetUpRuntime={() => setPage('pairing')}- onManageRuntimes={() => setPage('runtimes')}+ createKind={props.createKind}+ onCloseCreate={showAgents}+ onCursor={() => navigate('cursor')}+ onSetUpRuntime={() => navigate('pairing')}+ onManageRuntimes={() => navigate('runtimes')}/></Match>- <Match when={page() === 'cursor'}>+ <Match when={activePage() === 'cursor'}><CursorConnectPage onClose={showAgents} /></Match>- <Match when={page() === 'pairing'}>+ <Match when={activePage() === 'pairing'}><RuntimePairingPage onClose={showAgents} /></Match>- <Match when={page() === 'runtimes'}>+ <Match when={activePage() === 'runtimes'}><Harness onBack={showAgents} /></Match></Switch>diff --git a/apps/web/src/features/settings/Agents.tsx b/apps/web/src/features/settings/Agents.tsxindex 1e496b618a..9e9106ab9b 100644--- a/apps/web/src/features/settings/Agents.tsx+++ b/apps/web/src/features/settings/Agents.tsx@@ -1,5 +1,8 @@import { useOpenAgentDm } from '@app/features/agent-dms/open-agent-dm';-import { isCoderHarness } from '@app/features/agents-view/core/agent-kind';+import {+ type AgentKind,+ isCoderHarness,+} from '@app/features/agents-view/core/agent-kind';import { AGENTS_TOUR } from '@app/features/agents-view/tour';import { ModelCatalogPicker } from '@core/component/AI/component/input/ModelCatalogPicker';import { isLargeModelCatalog } from '@core/component/AI/component/input/modelCatalog';@@ -140,6 +143,8 @@ const MACRO_AGENT: AgentSummary = {/** Settings page for viewing and creating persistent agents. */export function Agents(props: {+ createKind?: AgentKind;+ onCloseCreate?: () => void;onCursor: () => void;onSetUpRuntime: () => void;onManageRuntimes: () => void;@@ -153,6 +158,9 @@ export function Agents(props: {const creatingFromLink = () => searchParams.createAgent === 'true';const closeCreateAgent = () => {setCreating(false);+ setEditingAgent(undefined);+ setDeletingAgent(undefined);+ props.onCloseCreate?.();if (creatingFromLink()) {setSearchParams({ createAgent: undefined }, { replace: true });}@@ -289,7 +297,14 @@ export function Agents(props: {return (<>- <Show when={!creating() && !creatingFromLink() && !editingAgent()}>+ <Show+ when={+ !creating() &&+ !creatingFromLink() &&+ !props.createKind &&+ !editingAgent()+ }+ ><SettingsPagetitle="Agents"description="Custom assistants with their own name, instructions, model, and place to run."@@ -364,8 +379,9 @@ export function Agents(props: {</SettingsPage></Show>- <Show when={creating() || creatingFromLink()}>+ <Show keyed when={props.createKind ?? (creating() || creatingFromLink())}><AgentEditorPage+ initialKind={props.createKind}connectedHarnesses={connectedHarnesses()}currentTeamId={currentTeamId()}canShareWithTeam={canShareWithTeam()}@@ -375,7 +391,7 @@ export function Agents(props: {onSave={createAgent}/></Show>- <Show when={editingAgent()} keyed>+ <Show when={!props.createKind && editingAgent()} keyed>{(agent) => (<AgentEditorPageagent={agent}@@ -392,7 +408,7 @@ export function Agents(props: {/>)}</Show>- <Show when={deletingAgent()} keyed>+ <Show when={!props.createKind && deletingAgent()} keyed>{(agent) => (<AgentDeleteDialogagentName={agent.bot.name}@@ -599,6 +615,7 @@ function AgentDeleteDialog(props: {}function AgentEditorPage(props: {+ initialKind?: AgentKind;agent?: AgentWithHarnessId;connectedHarnesses: readonly ConnectedHarness[];currentTeamId?: string;@@ -625,6 +642,11 @@ function AgentEditorPage(props: {const [harnessId, setHarnessId] = createSignal(props.agent?.harness_id ??props.agent?.harness ??+ (props.initialKind === 'coder'+ ? props.connectedHarnesses.find((harness) =>+ isCoderHarness(harness.kind === 'macrod' ? 'macrod' : harness.id)+ )?.id+ : undefined) ??props.connectedHarnesses[0]?.id ??'');@@ -741,7 +763,8 @@ function AgentEditorPage(props: {// The saved choice, or none: an agent that never chose follows its// harness, so a fresh form and a re-picked runtime both start from there.const [codingChoice, setCodingChoice] = createSignal<boolean | undefined>(- props.agent?.is_coding ?? undefined+ props.agent?.is_coding ??+ (props.initialKind ? props.initialKind === 'coder' : undefined));const harnessCodes = () => {const harness = selectedHarness();diff --git a/apps/web/src/features/tasks-view/components/TasksControls.tsx b/apps/web/src/features/tasks-view/components/TasksControls.tsxindex d5761b44bf..473d27af50 100644--- a/apps/web/src/features/tasks-view/components/TasksControls.tsx+++ b/apps/web/src/features/tasks-view/components/TasksControls.tsx@@ -7,9 +7,9 @@ import {import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { isTouchDevice } from '@core/mobile/isTouchDevice';+import GanttIcon from '@icon/system/regular/chart-gantt.svg';import BoardIcon from '@icon/system/regular/kanban.svg';import ListIcon from '@icon/system/regular/list-bullets.svg';-import GanttIcon from '@phosphor/chart-bar-horizontal.svg';import { Button } from '@ui';import { tourTarget } from '@ui/components/Tour';import { createSignal, Show } from 'solid-js';diff --git a/apps/web/src/features/tasks-view/components/TasksCreateMenu.tsx b/apps/web/src/features/tasks-view/components/TasksCreateMenu.tsxindex d839e2afb0..9321bcbbc2 100644--- a/apps/web/src/features/tasks-view/components/TasksCreateMenu.tsx+++ b/apps/web/src/features/tasks-view/components/TasksCreateMenu.tsx@@ -1,13 +1,16 @@+import { CreateMenuItem } from '@app/components/view-shell/CreateMenuItem';import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import CheckSquareIcon from '@icon/system/regular/check-square.svg';import StackIcon from '@icon/system/regular/stack.svg';import TagIcon from '@icon/system/regular/tag.svg';+import SubtaskIcon from '@icon/system/regular/tree-structure.svg';import { Dropdown } from '@ui';import { Show } from 'solid-js';export function TasksCreateMenu(props: {presentation: 'sidebar' | 'toolbar';onCreateTask: () => void;+ onCreateSubtask: () => void;onCreateProject?: () => void;onCreateTag: () => void;}) {@@ -23,13 +26,13 @@ export function TasksCreateMenu(props: {presentation={props.presentation}aria-label={props.onCreateProject- ? 'New task, project, or tag'- : 'New task or tag'+ ? 'New task, subtask, project, or tag'+ : 'New task, subtask, or tag'}menu/><Dropdown.Content- class="min-w-48"+ class="w-80 max-w-[calc(100vw-2rem)]"onCloseAutoFocus={(event) => {if (!selectedAction) return;event.preventDefault();@@ -37,34 +40,44 @@ export function TasksCreateMenu(props: {selectedAction = undefined;}}>- <Dropdown.Item- onSelect={() => {- selectedAction = props.onCreateTask;- }}- >- <CheckSquareIcon class="size-4" />- <span>Task</span>- </Dropdown.Item>- <Show when={props.onCreateProject}>- {(createProject) => (- <Dropdown.Item- onSelect={() => {- selectedAction = createProject();- }}- >- <StackIcon class="size-4" />- <span>Project</span>- </Dropdown.Item>- )}- </Show>- <Dropdown.Item- onSelect={() => {- selectedAction = props.onCreateTag;- }}- >- <TagIcon class="size-4" />- <span>Tag</span>- </Dropdown.Item>+ <Dropdown.Group>+ <CreateMenuItem+ icon={CheckSquareIcon}+ title="Task"+ description="Track a standalone piece of work."+ onSelect={() => {+ selectedAction = props.onCreateTask;+ }}+ />+ <CreateMenuItem+ icon={SubtaskIcon}+ title="Subtask"+ description="Choose a parent task and break its work into a smaller step."+ onSelect={() => {+ selectedAction = props.onCreateSubtask;+ }}+ />+ <Show when={props.onCreateProject}>+ {(createProject) => (+ <CreateMenuItem+ icon={StackIcon}+ title="Project"+ description="Group related tasks around a shared goal."+ onSelect={() => {+ selectedAction = createProject();+ }}+ />+ )}+ </Show>+ <CreateMenuItem+ icon={TagIcon}+ title="Tag"+ description="Label work so you can organize and filter it across projects."+ onSelect={() => {+ selectedAction = props.onCreateTag;+ }}+ />+ </Dropdown.Group></Dropdown.Content></Dropdown>);diff --git a/apps/web/src/features/tasks-view/subtask-creation.test.tsx b/apps/web/src/features/tasks-view/subtask-creation.test.tsxnew file mode 100644index 0000000000..9c26637c86--- /dev/null+++ b/apps/web/src/features/tasks-view/subtask-creation.test.tsx@@ -0,0 +1,115 @@+import { SYSTEM_PROPERTY_IDS } from '@property/constants';+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { type ParentProps, Show } from 'solid-js';+import { afterEach, expect, it, vi } from 'vitest';+import { TasksCreateAction } from './tasks-create-action';++const mocks = vi.hoisted(() => ({+ popover: vi.fn(),+ create: vi.fn(),+ properties: vi.fn(),+ failure: vi.fn(),+}));+vi.mock('@queries/properties/entity', () => ({+ fetchEntityProperties: mocks.properties,+}));+vi.mock('@core/component/Toast/Toast', () => ({+ toast: { failure: mocks.failure },+}));+vi.mock('@components/app/split-layout/layout', () => ({+ useSplitLayout: () => ({ popoverSplit: mocks.popover }),+}));+vi.mock('@app/features/block-md/util/taskComposerProperties', () => ({+ createTaskWithProperties: mocks.create,+}));+vi.mock('@queries/team/teams', () => ({+ useCurrentTeamQuery: () => ({ isSuccess: true, data: { team: {} } }),+}));+vi.mock('./components/TasksCreateMenu', () => ({+ TasksCreateMenu: (props: { onCreateSubtask: () => void }) => (+ <button onClick={props.onCreateSubtask}>Subtask</button>+ ),+}));+vi.mock('@property/editors/selectors/PropertyEntitySelector', () => ({+ PropertyEntitySelector: (props: {+ setSelectedOptions: (ids: Set<string>) => void;+ }) => (+ <button onClick={() => props.setSelectedOptions(new Set(['parent-1']))}>+ Choose parent+ </button>+ ),+}));+vi.mock('@app/features/property/tags/TagEditorDialog', () => ({+ TagEditorDialog: () => null,+}));+vi.mock('@ui', () => ({+ Dialog: Object.assign(+ (props: ParentProps<{ open: boolean }>) => (+ <Show when={props.open}>+ <div>{props.children}</div>+ </Show>+ ),+ { Title: (props: ParentProps) => <h2>{props.children}</h2> }+ ),+}));+afterEach(() => {+ cleanup();+ vi.clearAllMocks();+});++it('passes the chosen parent into one task creation and warns without retrying if linking was rejected', async () => {+ render(() => <TasksCreateAction presentation="toolbar" projectsEnabled />);+ fireEvent.click(screen.getByRole('button', { name: 'Subtask' }));+ expect(mocks.popover).not.toHaveBeenCalled();+ fireEvent.click(screen.getByRole('button', { name: 'Choose parent' }));+ const request = mocks.popover.mock.calls[0][0];+ mocks.create.mockResolvedValue({ documentId: 'child-1' });+ mocks.properties.mockResolvedValue([]);+ const definitions = new Map();+ const history = vi.fn();+ const values = [+ [+ SYSTEM_PROPERTY_IDS.PARENT_TASK,+ {+ valueType: 'ENTITY',+ refs: [{ entity_id: 'stale-parent', entity_type: 'TASK' }],+ },+ ],+ ];+ await request.params.createTask(+ 'Step',+ 'Details',+ values,+ definitions,+ history+ );+ expect(mocks.create).toHaveBeenCalledExactlyOnceWith(+ 'Step',+ 'Details',+ [+ [+ SYSTEM_PROPERTY_IDS.PARENT_TASK,+ {+ valueType: 'ENTITY',+ refs: [{ entity_id: 'parent-1', entity_type: 'TASK' }],+ },+ ],+ ],+ definitions,+ history,+ undefined+ );+ expect(mocks.failure).toHaveBeenCalledWith(+ expect.stringContaining('do not create it again')+ );+ mocks.failure.mockClear();+ mocks.properties.mockResolvedValue([+ {+ propertyDefinitionId: SYSTEM_PROPERTY_IDS.PARENT_TASK,+ valueType: 'ENTITY',+ value: [{ entity_id: 'parent-1', entity_type: 'TASK' }],+ },+ ]);+ await request.params.createTask('Step', 'Details', [], definitions, history);+ expect(mocks.failure).not.toHaveBeenCalled();+});diff --git a/apps/web/src/features/tasks-view/tasks-create-action.test.tsx b/apps/web/src/features/tasks-view/tasks-create-action.test.tsxindex d32fb413e7..494aef39f7 100644--- a/apps/web/src/features/tasks-view/tasks-create-action.test.tsx+++ b/apps/web/src/features/tasks-view/tasks-create-action.test.tsx@@ -58,7 +58,9 @@ describe.each(['sidebar', 'toolbar'] as const)(<TasksCreateAction presentation={presentation} projectsEnabled />));fireEvent.keyDown(- screen.getByRole('button', { name: 'New task, project, or tag' }),+ screen.getByRole('button', {+ name: 'New task, subtask, project, or tag',+ }),{ key: 'Enter' });fireEvent.keyDown(await screen.findByRole('menuitem', { name: label }), {@@ -78,7 +80,9 @@ describe.each(['sidebar', 'toolbar'] as const)(<TasksCreateAction presentation={presentation} projectsEnabled />));fireEvent.keyDown(- screen.getByRole('button', { name: 'New task, project, or tag' }),+ screen.getByRole('button', {+ name: 'New task, subtask, project, or tag',+ }),{ key: 'Enter' });fireEvent.keyDown(await screen.findByRole('menuitem', { name: 'Tag' }), {@@ -97,9 +101,12 @@ it('keeps project creation behind the existing Projects gate', async () => {render(() => (<TasksCreateAction presentation="sidebar" projectsEnabled={false} />));- fireEvent.keyDown(screen.getByRole('button', { name: 'New task or tag' }), {- key: 'Enter',- });+ fireEvent.keyDown(+ screen.getByRole('button', { name: 'New task, subtask, or tag' }),+ {+ key: 'Enter',+ }+ );await screen.findByRole('menuitem', { name: 'Task' });expect(screen.queryByRole('menuitem', { name: 'Project' })).toBeNull();expect(screen.getByRole('menuitem', { name: 'Tag' })).toBeDefined();diff --git a/apps/web/src/features/tasks-view/tasks-create-action.tsx b/apps/web/src/features/tasks-view/tasks-create-action.tsxindex 12a1b12aab..ee76deeedd 100644--- a/apps/web/src/features/tasks-view/tasks-create-action.tsx+++ b/apps/web/src/features/tasks-view/tasks-create-action.tsx@@ -1,6 +1,13 @@+import { createTaskWithProperties } from '@app/features/block-md/util/taskComposerProperties';import { TagEditorDialog } from '@app/features/property/tags/TagEditorDialog';import { useSplitLayout } from '@components/app/split-layout/layout';+import { toast } from '@core/component/Toast/Toast';+import { SYSTEM_PROPERTY_IDS } from '@property/constants';+import { PropertyEntitySelector } from '@property/editors/selectors/PropertyEntitySelector';+import { fetchEntityProperties } from '@queries/properties/entity';import { useCurrentTeamQuery } from '@queries/team/teams';+import { EntityType } from '@service-properties/generated/schemas/entityType';+import { Dialog } from '@ui';import { createSignal } from 'solid-js';import { TasksCreateMenu } from './components/TasksCreateMenu';@@ -13,6 +20,66 @@ export function TasksCreateAction(props: {const team = useCurrentTeamQuery();const [creatingTag, setCreatingTag] = createSignal(false);+ const [parentPickerOpen, setParentPickerOpen] = createSignal(false);+ const createSubtask = (parentId: string) => {+ setParentPickerOpen(false);+ const create: typeof createTaskWithProperties = async (+ title,+ content,+ values,+ definitions,+ history,+ options+ ) => {+ const created = await createTaskWithProperties(+ title,+ content,+ [+ ...values.filter(([id]) => id !== SYSTEM_PROPERTY_IDS.PARENT_TASK),+ [+ SYSTEM_PROPERTY_IDS.PARENT_TASK,+ {+ valueType: 'ENTITY',+ refs: [{ entity_id: parentId, entity_type: EntityType.TASK }],+ },+ ],+ ],+ definitions,+ history,+ options+ );+ if (created) {+ const properties = await fetchEntityProperties(+ 'TASK',+ created.documentId+ ).catch(() => undefined);+ const parent = properties?.find(+ (property) =>+ property.propertyDefinitionId === SYSTEM_PROPERTY_IDS.PARENT_TASK+ );+ if (+ !(+ parent?.valueType === 'ENTITY' &&+ parent.value?.some(+ (ref) =>+ ref.entity_id === parentId &&+ ref.entity_type === EntityType.TASK+ )+ )+ ) {+ toast.failure(+ 'Task created, but its parent could not be confirmed. Open the task to set its parent; do not create it again.'+ );+ }+ }+ return created;+ };+ layout.popoverSplit({+ type: 'component',+ id: 'task-compose',+ params: { createTask: create },+ });+ };return (<><TasksCreateMenu@@ -29,8 +96,31 @@ export function TasksCreateAction(props: {}): undefined}+ onCreateSubtask={() => setParentPickerOpen(true)}onCreateTag={() => setCreatingTag(true)}/>+ <Dialog+ open={parentPickerOpen()}+ onOpenChange={setParentPickerOpen}+ class="w-96 max-w-[calc(100vw-2rem)] p-4"+ >+ <Dialog.Title class="mb-3 text-base font-semibold">+ Choose a parent task+ </Dialog.Title>+ <PropertyEntitySelector+ config={{+ isMultiSelect: false,+ specificEntityType: EntityType.TASK,+ placeholder: 'Search tasks',+ }}+ onClose={() => setParentPickerOpen(false)}+ selectedOptions={() => new Set<string>()}+ setSelectedOptions={(ids) => {+ const id = ids.values().next().value;+ if (id) createSubtask(id);+ }}+ />+ </Dialog><TagEditorDialogopen={creatingTag()}mode={{ type: 'create', initialScope: 'user' }}diff --git a/apps/web/src/lib/core/component/ForwardToChannel.tsx b/apps/web/src/lib/core/component/ForwardToChannel.tsxindex d7c29b6483..79911ef835 100644--- a/apps/web/src/lib/core/component/ForwardToChannel.tsx+++ b/apps/web/src/lib/core/component/ForwardToChannel.tsx@@ -570,9 +570,6 @@ export function ForwardToChannel(props: ForwardToChannelProps) {}><div class="shrink-0 pr-2 flex items-center gap-2">- <Show when={selectedOptions().length > 0}>- <span class="text-sm text-ink-extra-muted">can</span>- </Show><ShareOptionseditPermissionEnabled={props.editPermissionEnabled}allowedAccessLevels={props.allowedAccessLevels}diff --git a/apps/web/src/lib/core/component/Resize/Resize.tsx b/apps/web/src/lib/core/component/Resize/Resize.tsxindex 4134ec8998..df797d227f 100644--- a/apps/web/src/lib/core/component/Resize/Resize.tsx+++ b/apps/web/src/lib/core/component/Resize/Resize.tsx@@ -588,11 +588,11 @@ function Gutter(props: GutterProps) {onLostPointerCapture={onPointerUp}onKeyDown={props.resizable ? onKeyDown : undefined}>- {/* Spaced panels can omit the divider while retaining resize feedback. */}+ {/* Match the enclosing Surface border; spaced panels can omit the divider. */}<Show when={props.showDivider}><divclass={cn(- 'absolute border-edge-frame touch:hidden',+ 'absolute border-edge touch:hidden',horizontal() ? 'border-l-[1px]' : 'border-t-[1px]')}style={barStyle('1px')}diff --git a/apps/web/src/lib/core/component/Toast/Toast.test.tsx b/apps/web/src/lib/core/component/Toast/Toast.test.tsxnew file mode 100644index 0000000000..95cd5b62c3--- /dev/null+++ b/apps/web/src/lib/core/component/Toast/Toast.test.tsx@@ -0,0 +1,162 @@+import { toaster } from '@kobalte/core/toast';+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { toast } from './Toast';+import { ToastRegion } from './ToastRegion';++const mobile = vi.hoisted(() => ({ value: false }));+vi.mock('@core/mobile/isMobile', () => ({ isMobile: () => mobile.value }));+vi.mock('@core/component/UploadProgress/UploadProgressIndicator', () => ({+ UploadProgressIndicator: () => null,+}));++beforeEach(() => {+ mobile.value = false;+ vi.useFakeTimers();+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ disconnect() {}+ }+ );+});+afterEach(() => {+ toaster.clear();+ cleanup();+ vi.clearAllTimers();+ vi.useRealTimers();+ vi.unstubAllGlobals();+});++it('keeps three desktop notices and queues the next until a slot opens', () => {+ render(() => <ToastRegion />);+ const first = toast.success('First saved', { stack: true });+ toast.success('Second saved', { stack: true });+ toast.success('Third saved', { stack: true });+ toast.success('Fourth saved', { stack: true });+ expect(screen.getByText('First saved')).toBeTruthy();+ expect(screen.getByText('Third saved')).toBeTruthy();+ expect(screen.queryByText('Fourth saved')).toBeNull();+ toast.dismiss(first!);+ expect(screen.queryByText('First saved')).toBeNull();+ expect(screen.getByText('Fourth saved')).toBeTruthy();+});++it('keeps persistent prompts separate from transient notices', () => {+ render(() => <ToastRegion />);+ toast.custom(+ { title: 'Reconnect account' },+ { persistent: true, region: 'prompt-region' }+ );+ toast.success('Saved', { stack: true });+ vi.advanceTimersByTime(5000);+ expect(+ screen+ .getByText('Saved')+ .closest('[data-macro-toast]')+ ?.hasAttribute('data-closed')+ ).toBe(true);+ expect(screen.getByText('Reconnect account')).toBeTruthy();+});++it('pauses the entire list while a user is reading it', () => {+ render(() => <ToastRegion />);+ toast.success('Reading this notice', { stack: true, duration: 1000 });+ const list = screen.getByText('Reading this notice').closest('ol')!;+ vi.advanceTimersByTime(300);+ fireEvent.pointerMove(list);+ vi.advanceTimersByTime(5000);+ expect(+ screen+ .getByText('Reading this notice')+ .closest('[data-macro-toast]')+ ?.hasAttribute('data-opened')+ ).toBe(true);+ fireEvent.pointerLeave(list);+ vi.advanceTimersByTime(800);+ expect(+ screen+ .getByText('Reading this notice')+ .closest('[data-macro-toast]')+ ?.hasAttribute('data-closed')+ ).toBe(true);+});++it('keeps keyboard-focused actions alive until focus leaves the list', () => {+ render(() => <ToastRegion />);+ toast.success('Keyboard notice', {+ stack: true,+ duration: 1000,+ actions: [{ label: 'Undo', onClick: vi.fn() }],+ });+ const action = screen.getByRole('button', { name: 'Undo' });+ fireEvent.focusIn(action);+ vi.advanceTimersByTime(5000);+ expect(+ screen+ .getByText('Keyboard notice')+ .closest('[data-macro-toast]')+ ?.hasAttribute('data-opened')+ ).toBe(true);+ fireEvent.focusOut(action, { relatedTarget: document.body });+ vi.advanceTimersByTime(1100);+ expect(+ screen+ .getByText('Keyboard notice')+ .closest('[data-macro-toast]')+ ?.hasAttribute('data-closed')+ ).toBe(true);+});++it('preserves actions and only reports explicit close as a user dismissal', () => {+ render(() => <ToastRegion />);+ const action = vi.fn();+ const onUserDismiss = vi.fn();+ toast.custom(+ {+ title: 'Action required',+ content: () => 'Reconnect to continue syncing.',+ actions: [{ label: 'Reconnect', onClick: action }],+ },+ { persistent: true, onUserDismiss }+ );+ fireEvent.click(screen.getByRole('button', { name: 'Reconnect' }));+ expect(action).toHaveBeenCalledOnce();+ expect(onUserDismiss).not.toHaveBeenCalled();+ fireEvent.click(screen.getByRole('button', { name: 'Close' }));+ expect(onUserDismiss).toHaveBeenCalledOnce();+ expect(+ screen+ .getByText('Action required')+ .closest('[data-macro-toast]')+ ?.hasAttribute('data-closed')+ ).toBe(true);+});++it('does not nest buttons inside the dismiss button', () => {+ render(() => <ToastRegion />);+ toast.success('Accessible notice', { stack: true });+ const close = screen.getByRole('button', { name: 'Close' });+ expect(close.querySelector('button')).toBeNull();+});++it('keeps only the latest transient notice on mobile', () => {+ mobile.value = true;+ render(() => <ToastRegion />);+ toast.success('Older mobile notice', { stack: true });+ toast.success('Latest mobile notice', { stack: true });+ expect(screen.queryByText('Older mobile notice')).toBeNull();+ expect(screen.getByText('Latest mobile notice')).toBeTruthy();+});++it('keeps mobile prompt descriptions and close actions accessible', () => {+ mobile.value = true;+ render(() => <ToastRegion />);+ toast.custom(+ { title: 'Mobile prompt', content: () => 'Helpful details' },+ { persistent: true }+ );+ expect(screen.getByText('Helpful details')).toBeTruthy();+ expect(screen.getByRole('button', { name: 'Close' })).toBeTruthy();+});diff --git a/apps/web/src/lib/core/component/Toast/Toast.tsx b/apps/web/src/lib/core/component/Toast/Toast.tsxindex b378952a2a..af8a367536 100644--- a/apps/web/src/lib/core/component/Toast/Toast.tsx+++ b/apps/web/src/lib/core/component/Toast/Toast.tsx@@ -1,22 +1,13 @@+import './toast.css';import { isMobile } from '@core/mobile/isMobile';import CheckIcon from '@icon/system/regular/check.svg';import ExclamationIcon from '@icon/system/regular/exclamation-mark.svg';import Spinner from '@icon/system/regular/spinner.svg';import XIcon from '@icon/system/regular/x.svg';import { Toast, toaster } from '@kobalte/core/toast';-import { Button, cn, Surface } from '@ui';+import { Button, cn } from '@ui';import type { Component, JSX } from 'solid-js';-import {- createEffect,- createSignal,- For,- Match,- on,- onCleanup,- onMount,- Show,- Switch,-} from 'solid-js';+import { createSignal, For, onCleanup, onMount, Show } from 'solid-js';import { Dynamic } from 'solid-js/web';export enum ToastType {@@ -26,85 +17,11 @@ export enum ToastType {LOADING = 'loading',}-interface ToastStyle {- background: string;- /** Accent color for icon and icon background */- accent: string;- /** Border color class for animated border (Tailwind class, e.g. 'border-success') */- borderColor: string;- /** Text color for title */- titleText: string;- /** Text color for subtext/description */- subtitleText: string;- /** Icon component */- icon: Component<{ class?: string }>;- /** Action button styles */- button: {- background: string;- hover: string;- text: string;- };- /** Close button hover text color */- closeButtonHover: string;-}--const TOAST_STYLES: Record<ToastType, ToastStyle> = {- [ToastType.SUCCESS]: {- background: 'bg-success-bg',- accent: 'bg-success',- borderColor: 'var(--color-success)',- titleText: 'text-success-ink',- subtitleText: 'text-success-ink/70',- icon: CheckIcon,- button: {- background: 'bg-success',- hover: 'hover:bg-success/80',- text: 'text-success-ink',- },- closeButtonHover: 'hover:text-success-ink hover:bg-success-hover',- },- [ToastType.FAILURE]: {- background: 'bg-failure-bg',- accent: 'bg-failure',- titleText: 'text-failure-ink',- borderColor: 'var(--color-failure)',- subtitleText: 'text-failure-ink/70',- icon: ExclamationIcon,- button: {- background: 'bg-failure',- hover: 'hover:bg-failure/80',- text: 'text-failure-ink',- },- closeButtonHover: 'hover:text-failure-ink hover:bg-failure-hover',- },- [ToastType.ALERT]: {- background: 'bg-alert/10',- accent: 'bg-alert',- borderColor: 'var(--color-alert)',- titleText: 'text-alert-ink',- subtitleText: 'text-alert-ink/70',- icon: ExclamationIcon,- button: {- background: 'bg-alert',- hover: 'hover:bg-alert/80',- text: 'text-alert-ink',- },- closeButtonHover: 'hover:text-alert-ink hover:bg-alert/10',- },- [ToastType.LOADING]: {- background: 'bg-accent/10',- accent: 'bg-accent',- borderColor: 'var(--color-edge)',- titleText: 'text-ink',- subtitleText: 'text-ink-muted',- icon: Spinner,- button: {- background: 'bg-accent',- hover: 'hover:bg-accent/80',- text: 'text-surface',- },- closeButtonHover: 'hover:text-accent hover:bg-accent/10',- },+const TOAST_STYLES = {+ [ToastType.SUCCESS]: { icon: CheckIcon, color: 'var(--color-success)' },+ [ToastType.FAILURE]: { icon: ExclamationIcon, color: 'var(--color-failure)' },+ [ToastType.ALERT]: { icon: ExclamationIcon, color: 'var(--color-alert)' },+ [ToastType.LOADING]: { icon: Spinner, color: 'var(--color-ink-muted)' },};/** A single entry in the actions row — icon and label rendered as a button */@@ -119,7 +36,7 @@ interface ToastAction {*/interface ToastOptions {subtext?: string;- /** Auto-dismiss duration in ms. When omitted, the toast uses a default 3s timer. */+ /** Auto-dismiss duration in ms. When omitted, the toast uses a default 4.5s timer. */duration?: number;/** When true, don't render this toast on mobile. */hideOnMobile?: boolean;@@ -134,7 +51,7 @@ interface ToastActionOptions extends ToastOptions {/*** Config for a fully custom toast.* Replaces the icon, title, and accent color of the standard layout while- * still using the shared Surface chrome and progress/dismiss machinery.+ * still using the shared toast chrome and dismissal behavior.*/export interface CustomToastConfig {title: string;@@ -159,8 +76,8 @@ const recentToasts: Map<string, ToastMessage> = new Map();const THROTTLE_DURATION = 3000;/**- * The currently-visible toast in the main region. Each new toast dismisses the- * previous one immediately so transient notifications never stack.+ * Most recently created desktop toast. Desktop notifications queue through+ * the region limit; unlike mobile, new notifications do not replace this one.*/let activeToastId: number | undefined;/**@@ -184,6 +101,7 @@ function setActiveToastId(region: string, toastId: number | undefined): void {}function dismissActiveToast(region: string): boolean {+ if (region !== 'mobile-toast-region') return false;const activeId = getActiveToastId(region);if (activeId === undefined) return false;@@ -193,8 +111,7 @@ function dismissActiveToast(region: string): boolean {}/**- * Hand the region's single visible slot to a new toast, and report whether it- * displaced one (so the newcomer can skip its entrance animation).+ * Replace the mobile region's single visible slot. Desktop toasts stack.** Persistent toasts opt out of the slot entirely: they are prompts the user is* expected to answer, so a passing "Copied" must not tear one down, and a@@ -270,24 +187,13 @@ function alert(return createToast(message, ToastType.ALERT, options);}-function ActionButtons(props: { actions: ToastAction[]; mobile?: boolean }) {+function ActionButtons(props: { actions: ToastAction[] }) {return (<For each={props.actions}>{(action) => (- <Button- size={props.mobile ? 'sm' : 'md'}- onClick={action.onClick}- variant="outline"- class="px-2 py-1 bg-surface"- depth={4}- >+ <Button size="sm" onClick={action.onClick} variant="ghost"><Show when={action.icon}>- {(icon) => (- <Dynamic- component={icon()}- class="size-[1em] touch:min-h-0! touch:min-w-0!"- />- )}+ {(icon) => <Dynamic component={icon()} class="size-3.5" />}</Show>{action.label}</Button>@@ -296,31 +202,6 @@ function ActionButtons(props: { actions: ToastAction[]; mobile?: boolean }) {);}-function ToastBodyWrapper(props: {- mobile?: boolean;- accentColor: string;- children: JSX.Element;-}) {- return (- <Show- when={props.mobile}- fallback={- <Surface- highlightColor={props.accentColor}- hideBorder- class="relative w-[90vw] sm:w-md p-2 sm:p-3 rounded-xl glass bg-toast"- >- {props.children}- </Surface>- }- >- <div class="island relative w-full p-2 rounded-xl bg-toast">- {props.children}- </div>- </Show>- );-}-function ToastContent(props: {toastId: number;toastType?: ToastType;@@ -328,265 +209,106 @@ function ToastContent(props: {subtext?: string;actions?: ToastAction[];persistent?: boolean;- /** When provided, drives the auto-dismiss timer AND shows the progress bar. */duration?: number;embed?: Component;custom?: CustomToastConfig;- /** Render the mobile variant (no highlight border, text-xs, simplified). */- mobile?: boolean;- /** Avoid entrance motion when this toast is replacing another toast. */- skipOpenAnimation?: boolean;- /** Called when this toast is removed from the DOM, so callers can clean up tracking. */onDismiss?: () => void;- /** Called at a user close gesture, before the exit animation begins. */onUserDismiss?: () => void;}) {- const styles = () => (props.toastType ? TOAST_STYLES[props.toastType] : null);- // Two actions beside the title squeeze it to a few characters; like the- // stacked custom layout, they get their own row under the description.- const stackActions = () => (props.actions?.length ?? 0) > 1;-- const accentColor = () => {- if (props.custom?.color) return props.custom.color;- return styles()?.borderColor ?? 'var(--color-edge)';- };-- // progress: 1 = full time remaining, 0 = expired.- // Only meaningful (and only rendered) when props.duration is explicitly set.- const [progress, setProgress] = createSignal(1);-- const showProgress = () => false;-- const [isHovered, setIsHovered] = createSignal(false);-- let elapsed = 0;-- onCleanup(() => props.onDismiss?.());-+ const style = () =>+ props.toastType ? TOAST_STYLES[props.toastType] : undefined;+ const icon = () => props.custom?.icon ?? style()?.icon;+ const actions = () => props.custom?.actions ?? props.actions;+ const [height, setHeight] = createSignal<number>();+ let surface!: HTMLDivElement;++ // The content keeps its natural height even when an older card is tucked+ // into the stack. This makes expansion work with async/custom content too.onMount(() => {- // Persistent toasts never auto-dismiss- if (props.persistent) return;-- const duration = props.duration ?? 3000;- let lastTime: number | null = null;- let rafId: number;-- const update = () => {- const currentTime = performance.now();-- if (lastTime === null) {- lastTime = currentTime;- }-- // Only accumulate time when not hovered- if (!isHovered()) {- elapsed += currentTime - lastTime;- }- lastTime = currentTime;-- const remaining = Math.max(0, 1 - elapsed / duration);- setProgress(remaining);-- if (remaining > 0) {- rafId = requestAnimationFrame(update);- } else {- toaster.dismiss(props.toastId);- }- };-- rafId = requestAnimationFrame(update);- onCleanup(() => cancelAnimationFrame(rafId));+ const measure = () => setHeight(surface.offsetHeight);+ measure();+ const observer = new ResizeObserver(measure);+ observer.observe(surface);+ onCleanup(() => observer.disconnect());});-- // Reset timer when user starts hovering- createEffect(- on(isHovered, (hovered) => {- if (hovered && !props.persistent) {- elapsed = 0;- setProgress(1);- }- })- );+ onCleanup(() => props.onDismiss?.());return (<ToasttoastId={props.toastId}- class={cn(- `relative overflow-visible pointer-events-auto- transition-[transform,opacity] duration-100 ease-in data-closed:opacity-0 data-[swipe=move]:translate-x-(--kb-toast-swipe-move-x)- data-[swipe=move]:transition-none- data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:ease-out data-[swipe=cancel]:duration-200- data-[swipe=end]:data-[swipe-direction=right]:animate-swipe-out- data-[swipe=end]:data-[swipe-direction=left]:animate-swipe-out-left`,- !props.skipOpenAnimation && 'data-opened:animate-slide-in',- props.mobile && 'w-full'- )}- persistent={true}- onMouseEnter={() => setIsHovered(true)}- onMouseLeave={() => setIsHovered(false)}+ data-macro-toast+ data-toast-id={props.toastId}+ class="macro-toast"+ style={{ '--toast-height': height() ? `${height()}px` : undefined }}+ persistent={props.persistent}+ duration={props.duration ?? 4500}onSwipeEnd={() => props.onUserDismiss?.()}onEscapeKeyDown={(event) => {if (!event.defaultPrevented) props.onUserDismiss?.();}}>- <ToastBodyWrapper mobile={props.mobile} accentColor={accentColor()}>- <Switch>- {/* ── Embed layout ── */}- <Match when={props.embed}>- {(embed) => (+ <div ref={surface} class="macro-toast-surface">+ <div class="macro-toast-content flex items-center gap-2.5">+ <Show+ when={props.embed}+ fallback={<>- <Dynamic component={embed()} />- <Toast.CloseButton class="absolute top-2 right-2 z-user-highlight">- <Button variant="ghost" size="icon-sm">- <XIcon />- </Button>- </Toast.CloseButton>- </>- )}- </Match>-- {/* ── Custom layout ── */}- <Match when={props.custom}>- {(customConfig) => {- // A persistent prompt on mobile can't borrow the transient- // one-line treatment: with the body and close button stripped it- // reduces to a bare title that never goes away. Give it the full- // card — description, close button, and its actions on their own- // row so the tap targets aren't fighting a truncated title.- const stacked = () => Boolean(props.mobile && props.persistent);- const showContent = () =>- Boolean(customConfig().content) && (!props.mobile || stacked());- return (- <>- <div class="flex items-center gap-2 justify-between">- <Show when={customConfig().icon && !props.mobile}>- {(_) => {- const icon = customConfig().icon!;- return (- <div class="size-5 flex shrink-0 justify-center items-center rounded-full p-0.75">- <Dynamic component={icon} />- </div>- );- }}- </Show>- <Toast.Title- class={cn(- 'font-semibold grow shrink truncate text-left flex items-center',- props.mobile ? 'text-xs' : 'text-ink',- stacked() && 'text-sm'- )}- >- {customConfig().title}- </Toast.Title>- <Show when={customConfig().actions?.length && !stacked()}>- <ActionButtons- actions={customConfig().actions!}- mobile={props.mobile}- />- </Show>- <Show when={!props.mobile || props.persistent}>- <Toast.CloseButton- as={Button}- variant="ghost"- size="icon-sm"- onClick={() => props.onUserDismiss?.()}- >- <XIcon />- </Toast.CloseButton>- </Show>- </div>- <Show when={showContent()}>+ <Show when={icon()}>+ {(Icon) => (<div- class={cn(- 'my-2',- props.mobile && 'text-xs text-ink-muted'- )}+ class="flex size-5 shrink-0 items-center justify-center"+ style={{ color: props.custom?.color ?? style()?.color }}+ data-icon-motion="none">- {customConfig().content?.()}- </div>- </Show>- <Show when={stacked() && customConfig().actions?.length}>- <div class="flex justify-end gap-2">- <ActionButtons actions={customConfig().actions!} mobile />+ <Dynamic+ component={Icon()}+ class={cn(+ 'size-4',+ props.toastType === ToastType.LOADING &&+ 'motion-safe:animate-spin'+ )}+ /></div>- </Show>- </>- );- }}- </Match>-- {/* ── Standard layout ── */}- <Match when={styles()}>- {(s) => (- <>- <div class="flex items-center gap-2 justify-between">- <div- class="size-5 flex shrink-0 justify-center items-center rounded-full p-0.75"- style={{ 'background-color': s().borderColor }}- >- <Dynamic- component={s().icon}- class={cn(- 'size-3.5 text-surface',- props.toastType === ToastType.LOADING- ? 'animate-spin'- : ''- )}- />- </div>- <Toast.Title- class={cn(- 'font-semibold grow shrink truncate text-left',- props.mobile ? 'text-xs' : 'text-ink'- )}- >- {props.message}+ )}+ </Show>+ <div class="min-w-0 flex-1">+ <Toast.Title class="text-[13px] font-medium leading-5 text-ink [overflow-wrap:anywhere]">+ {props.custom?.title ?? props.message}</Toast.Title>- <Show when={props.actions?.length && !stackActions()}>- <ActionButtons- actions={props.actions!}- mobile={props.mobile}- />- </Show>- <Show when={!props.mobile}>- <Toast.CloseButton>- <Button variant="ghost" size="icon-sm">- <XIcon />- </Button>- </Toast.CloseButton>+ <Show when={props.custom?.content || props.subtext}>+ <Toast.Description class="mt-1 text-xs leading-[1.55] text-ink-muted [overflow-wrap:anywhere]">+ {props.custom?.content+ ? props.custom.content()+ : props.subtext}+ </Toast.Description></Show></div>- <Show when={props.subtext && (!props.mobile || stackActions())}>- <Toast.Description- class={cn(- 'ml-7 text-ink-extra-muted',- props.mobile ? 'text-xs' : 'text-sm'- )}- >- {props.subtext}- </Toast.Description>- </Show>- <Show when={stackActions()}>- <div class="mt-2 ml-7 flex flex-wrap gap-2">- <ActionButtons actions={props.actions!} mobile />- </div>- </Show></>+ }+ >+ {(Embed) => (+ <div class="min-w-0 flex-1">+ <Dynamic component={Embed()} />+ </div>)}- </Match>- </Switch>-- {/* Progress bar — only rendered when an explicit duration was passed */}- <Show when={showProgress()}>- <div- class="absolute bottom-0 h-1 left-0"- style={{- 'background-color': accentColor(),- width: `${(1 - progress()) * 100}%`,- }}- />- </Show>- </ToastBodyWrapper>+ </Show>+ <Show when={actions()?.length}>+ <div class="flex shrink-0 flex-col items-end gap-1.5">+ <ActionButtons actions={actions()!} />+ </div>+ </Show>+ <Toast.CloseButton+ as={Button}+ variant="ghost"+ size="icon-xs"+ aria-label="Close"+ class="macro-toast-corner-close shrink-0"+ onClick={() => props.onUserDismiss?.()}+ >+ <XIcon class="size-3.5" />+ </Toast.CloseButton>+ </div>+ </div></Toast>);}@@ -609,7 +331,7 @@ async function promise<T>(const useMobile = isMobile();const region = useMobile ? 'mobile-toast-region' : 'toast-region';- const skipOpenAnimation = dismissActiveToast(region);+ dismissActiveToast(region);const toastId = toaster.show((props) => (@@ -619,8 +341,6 @@ async function promise<T>(message={options.loading}subtext={options.subtext}persistent={true}- mobile={useMobile}- skipOpenAnimation={skipOpenAnimation}onDismiss={() => clearTrackedToast(region, props.toastId)}/>),@@ -682,7 +402,7 @@ function createToast(const useMobile = isMobile();const region = useMobile ? 'mobile-toast-region' : 'toast-region';- const skipOpenAnimation = dismissActiveToast(region);+ dismissActiveToast(region);const toastId = toaster.show((props) => (@@ -692,11 +412,7 @@ function createToast(message={message}subtext={subtext}actions={actions}- // Pass duration only when explicitly provided — this is what gates the progress bar.- // When undefined, ToastContent falls back to its own default dismiss timing internally.duration={duration}- mobile={useMobile}- skipOpenAnimation={skipOpenAnimation}onDismiss={() => {clearTrackedToast(region, props.toastId);}}@@ -739,7 +455,7 @@ function embed(const useMobile = isMobile();const region =options?.region ?? (useMobile ? 'mobile-toast-region' : 'toast-region');- const skipOpenAnimation = replaceActiveToast(region, options?.persistent);+ replaceActiveToast(region, options?.persistent);const toastId = toaster.show((props) => (<ToastContent@@ -747,8 +463,6 @@ function embed(embed={component}persistent={options?.persistent}duration={options?.duration}- mobile={useMobile}- skipOpenAnimation={skipOpenAnimation}onDismiss={() => clearTrackedToast(region, props.toastId)}/>),@@ -762,8 +476,8 @@ function embed(/*** Show a toast with a fully custom title, icon, accent color, body content,- * and actions row — while still using the shared Surface chrome and- * progress/dismiss machinery.+ * and actions row — while still using the shared toast chrome and+ * dismissal behavior.*/function custom(config: CustomToastConfig,@@ -778,7 +492,7 @@ function custom(const useMobile = isMobile();const region =options?.region ?? (useMobile ? 'mobile-toast-region' : 'toast-region');- const skipOpenAnimation = replaceActiveToast(region, options?.persistent);+ replaceActiveToast(region, options?.persistent);const toastId = toaster.show((props) => (<ToastContent@@ -786,8 +500,6 @@ function custom(custom={config}persistent={options?.persistent}duration={options?.duration}- mobile={useMobile}- skipOpenAnimation={skipOpenAnimation}onUserDismiss={options?.onUserDismiss}onDismiss={() => {clearTrackedToast(region, props.toastId);diff --git a/apps/web/src/lib/core/component/Toast/ToastRegion.tsx b/apps/web/src/lib/core/component/Toast/ToastRegion.tsxindex 96c0563d1e..29ca4da718 100644--- a/apps/web/src/lib/core/component/Toast/ToastRegion.tsx+++ b/apps/web/src/lib/core/component/Toast/ToastRegion.tsx@@ -9,34 +9,38 @@ export function ToastRegion() {<Portal>{/*Desktop stack, bottom-right. Persistent prompts get their own region- capped at one visible card. Upload progress sits nearest the corner.+ capped at one visible card. Ordinary notices form an expandable three-card stack. Upload progress sits nearest the corner.*/}- <div class="fixed bottom-2 right-2 m-0 p-2 sm:p-4 list-none outline-none pointer-events-none z-toast-region flex flex-col items-end gap-2">+ <div class="fixed bottom-5 right-5 m-0 w-[380px] max-w-[calc(100vw-32px)] list-none outline-none pointer-events-none z-toast-region flex flex-col items-stretch gap-4"><Toast.Region+ class="macro-toast-region"regionId="reminder-region"duration={Infinity}limit={1}pauseOnInteraction={false}swipeDirection="right">- <Toast.List class="flex flex-col gap-2" />+ <Toast.List class="macro-toast-list" /></Toast.Region><Toast.Region+ class="macro-toast-region"regionId="prompt-region"duration={Infinity}limit={1}pauseOnInteraction={false}swipeDirection="right">- <Toast.List class="flex flex-col gap-2" />+ <Toast.List class="macro-toast-list" /></Toast.Region><Toast.Region+ class="macro-toast-region"regionId="toast-region"- duration={Infinity}- pauseOnInteraction={false}+ limit={3}+ duration={4500}+ pauseOnInteractionswipeDirection="right">- <Toast.List class="flex flex-col gap-2" />+ <Toast.List class="macro-toast-list" data-stack /></Toast.Region><Show when={!isMobile()}><UploadProgressIndicator />@@ -51,36 +55,40 @@ export function ToastRegion() {queued until it is answered.*/}<div- class="fixed left-1/2 -translate-x-1/2 w-full max-w-[420px] px-(--mobile-chrome-gutter) pointer-events-none z-toast-region flex flex-col gap-2"+ class="fixed left-1/2 -translate-x-1/2 w-full max-w-[420px] px-(--mobile-chrome-gutter) pointer-events-none z-toast-region flex flex-col gap-5"style={{bottom: 'calc(var(--mobile-content-inset-bottom, 0px) + 12px)',}}><Toast.Region+ class="macro-toast-region"regionId="mobile-reminder-region"duration={Infinity}limit={1}pauseOnInteraction={false}swipeDirection="left">- <Toast.List class="flex flex-col gap-2" />+ <Toast.List class="macro-toast-list" /></Toast.Region><Toast.Region+ class="macro-toast-region"regionId="mobile-prompt-region"duration={Infinity}limit={1}pauseOnInteraction={false}swipeDirection="left">- <Toast.List class="flex flex-col gap-2" />+ <Toast.List class="macro-toast-list" /></Toast.Region><Toast.Region+ class="macro-toast-region"regionId="mobile-toast-region"- duration={Infinity}- pauseOnInteraction={false}+ limit={1}+ duration={4500}+ pauseOnInteractionswipeDirection="left">- <Toast.List class="flex flex-col gap-2" />+ <Toast.List class="macro-toast-list" /></Toast.Region><Show when={isMobile()}><div class="flex justify-center">diff --git a/apps/web/src/lib/core/component/Toast/toast.css b/apps/web/src/lib/core/component/Toast/toast.cssnew file mode 100644index 0000000000..dde0f5eba8--- /dev/null+++ b/apps/web/src/lib/core/component/Toast/toast.css@@ -0,0 +1,143 @@+.macro-toast-list {+ display: flex;+ flex-direction: column;+ gap: 16px;+ transition: gap 240ms cubic-bezier(0.2, 0.7, 0.3, 1);+ width: 100%;+ outline: none;+ pointer-events: auto;+}++/* Empty regions must not leave invisible gaps between notification groups. */+.macro-toast-region:has(> .macro-toast-list:empty) {+ display: none;+}++.macro-toast {+ position: relative;+ overflow: visible;+ width: 100%;+ max-height: var(--toast-height, 1000px);+ border-radius: 14px;+ pointer-events: auto;+ transform-origin: bottom center;+ box-shadow: 0 2px 4px rgb(0 0 0 / 4%), 0 8px 24px -12px rgb(0 0 0 / 10%);+ transition: max-height 240ms cubic-bezier(0.2, 0.7, 0.3, 1),+ margin 240ms cubic-bezier(0.2, 0.7, 0.3, 1),+ width 240ms cubic-bezier(0.2, 0.7, 0.3, 1),+ transform 240ms cubic-bezier(0.2, 0.7, 0.3, 1);+}++[data-theme-light='false'] .macro-toast {+ box-shadow: 0 3px 10px rgb(0 0 0 / 20%), 0 20px 48px -12px rgb(0 0 0 / 50%);+}++.macro-toast-surface {+ position: relative;+ box-sizing: border-box;+ padding: 14px;+ border: 1px solid var(--color-edge-muted);+ border-radius: inherit;+ background: var(--color-toast);+ color: var(--color-ink);+}++/* A subtle gradient and shaded lower edge give dark notices a raised surface. */+[data-theme-light='false'] .macro-toast-surface {+ background: linear-gradient(+ to bottom,+ color-mix(in oklch, var(--color-toast), var(--color-ink) 3%),+ var(--color-toast)+ );+ border-color: color-mix(in oklch, var(--color-ink) 8%, transparent);+ box-shadow: inset 0 -1px 0 rgb(0 0 0 / 20%);+}++.macro-toast-content {+ transition: opacity 160ms ease;+}++.macro-toast[data-opened] {+ animation: macro-toast-in 300ms cubic-bezier(0.16, 1, 0.3, 1);+}++.macro-toast[data-closed] {+ animation: macro-toast-out 160ms ease-in forwards;+ pointer-events: none;+}++/* Older notices peek behind the newest. Focusing any action opens the stack+ just like hovering, so tucked-away controls remain keyboard accessible. */+@media (hover: hover) {+ .macro-toast-list[data-stack]:not(:hover):not(:focus-within) {+ gap: 0;+ }++ .macro-toast-list[data-stack]:not(:hover):not(:focus-within) > .macro-toast:not(:last-child) {+ overflow: hidden;+ max-height: 10px;+ margin: 0 6px -1px;+ width: calc(100% - 12px);+ border-radius: 14px 14px 0 0;+ }++ .macro-toast-list[data-stack]:not(:hover):not(:focus-within) > .macro-toast:nth-last-child(3) {+ margin-inline: 12px;+ width: calc(100% - 24px);+ }++ .macro-toast-list[data-stack]:not(:hover):not(:focus-within) > .macro-toast:not(:last-child) .macro-toast-content {+ opacity: 0;+ pointer-events: none;+ }+}++.macro-toast[data-swipe='move'] {+ transform: translateX(var(--kb-toast-swipe-move-x));+ transition: none;+ animation: none;+}++.macro-toast[data-swipe='cancel'] {+ transform: translateX(0);+}++.macro-toast[data-swipe='end'] {+ animation: macro-toast-swipe-out 160ms ease-out forwards;+}++@keyframes macro-toast-in {+ from { opacity: 0; max-height: 0; transform: translateY(12px) scale(0.97); }+ to { opacity: 1; max-height: var(--toast-height, 200px); transform: translateY(0) scale(1); }+}++@keyframes macro-toast-out {+ to { opacity: 0; max-height: 0; transform: translateY(6px) scale(0.98); }+}++@keyframes macro-toast-swipe-out {+ from { opacity: 1; transform: translateX(var(--kb-toast-swipe-end-x)); }+ to { opacity: 0; transform: translateX(var(--kb-toast-swipe-end-x)) scale(0.96); }+}++@media (prefers-reduced-motion: reduce) {+ .macro-toast,+ .macro-toast-list,+ .macro-toast-content {+ animation: none !important;+ transition: none !important;+ }+}++/* The close button straddles the corner on every notification. */+.macro-toast .macro-toast-corner-close {+ position: absolute;+ top: 0;+ right: 0;+ transform: translate(50%, -50%);+ z-index: 1;+ border: 1px solid var(--color-edge-muted);+ border-radius: 50%;+ background: var(--color-toast);+ box-shadow: 0 2px 6px rgb(0 0 0 / 12%);+}diff --git a/apps/web/src/lib/core/component/TopBar/ShareButton.tsx b/apps/web/src/lib/core/component/TopBar/ShareButton.tsxindex dfc7007821..1b2f4b6352 100644--- a/apps/web/src/lib/core/component/TopBar/ShareButton.tsx+++ b/apps/web/src/lib/core/component/TopBar/ShareButton.tsx@@ -1561,7 +1561,7 @@ export function ShareModal(props: ShareModalProps) {}toast.success('Updated team access', {- subtext: `The owner's team can ${getTeamShareScopeCopy(scope).toLowerCase()} this ${itemNoun}`,+ subtext: `The owner's team can ${scope} this ${itemNoun}`,});analytics.track('share_entity', {entityType: props.itemType,@@ -2291,16 +2291,25 @@ export function ShareOptions(props: {const optionsList: { value: string; label: string }[] = [];// Always add view option- optionsList.push({ value: 'view', label: accessLevelText('view') });+ optionsList.push({+ value: 'view',+ label: `Can ${accessLevelText('view').toLowerCase()}`,+ });// Add comment option if applicableif (blockName !== 'md' || ENABLE_MARKDOWN_COMMENTS) {- optionsList.push({ value: 'comment', label: accessLevelText('comment') });+ optionsList.push({+ value: 'comment',+ label: `Can ${accessLevelText('comment').toLowerCase()}`,+ });}// Add edit option if enabledif (editPermissionEnabled()) {- optionsList.push({ value: 'edit', label: accessLevelText('edit') });+ optionsList.push({+ value: 'edit',+ label: `Can ${accessLevelText('edit').toLowerCase()}`,+ });}// Add no access option if not hidden@@ -2326,7 +2335,10 @@ export function ShareOptions(props: {const currentValueText = createMemo(() => {const value = currentValue();if (value === 'none') return accessLevelText(null);- return accessLevelText(value as AccessLevel);+ return (+ options().find((option) => option.value === value)?.label ??+ accessLevelText(value as AccessLevel)+ );});const CurrentIcon = createMemo(() => {diff --git a/apps/web/src/lib/core/component/TopBar/linkShare.test.ts b/apps/web/src/lib/core/component/TopBar/linkShare.test.tsindex efb7be1e74..6ba9a50440 100644--- a/apps/web/src/lib/core/component/TopBar/linkShare.test.ts+++ b/apps/web/src/lib/core/component/TopBar/linkShare.test.ts@@ -103,16 +103,16 @@ describe('buildLinkShareScopePayload', () => {describe('link share copy', () => {it('provides None, Public, and Team selector options', () => {expect(LINK_SHARE_SCOPE_OPTIONS).toEqual([- { value: 'NONE', label: 'None' },- { value: 'PUBLIC', label: 'Public' },- { value: 'TEAM', label: 'Team' },+ { value: 'NONE', label: 'Only people with access' },+ { value: 'PUBLIC', label: 'Anyone with the link' },+ { value: 'TEAM', label: 'Team members with the link' },]);});it('explains public links', () => {expect(getLinkShareScopeCopy('PUBLIC')).toEqual({- label: 'Public',- title: 'Public link',+ label: 'Anyone with the link',+ title: 'Anyone with the link',description: 'Anyone with the link can access this item.',});});@@ -120,40 +120,38 @@ describe('link share copy', () => {it('distinguishes team links from explicit team or channel sharing', () => {const copy = getLinkShareScopeCopy('TEAM');- expect(copy.title).toBe('Team link');+ expect(copy.title).toBe('Team members with the link');expect(copy.description).toContain("Members of the owner's team");- expect(copy.description).toContain(- 'does not share it directly with a team or channel'- );+ expect(copy.description).toContain('Others need to be added separately');});});describe('team share payload', () => {it('lists None plus the allowed team levels', () => {expect(TEAM_SHARE_SCOPE_OPTIONS).toEqual([- { value: 'NONE', label: 'None' },- { value: 'view', label: 'View' },- { value: 'comment', label: 'Comment' },- { value: 'edit', label: 'Edit' },+ { value: 'NONE', label: 'No team access' },+ { value: 'view', label: 'Can view' },+ { value: 'comment', label: 'Can comment' },+ { value: 'edit', label: 'Can edit' },]);});it('limits calls to None and View', () => {expect(teamShareScopeOptionsForItem('call')).toEqual([- { value: 'NONE', label: 'None' },- { value: 'view', label: 'View' },+ { value: 'NONE', label: 'No team access' },+ { value: 'view', label: 'Can view' },]);expect(teamShareScopeOptionsForItem('document')).toEqual([- { value: 'NONE', label: 'None' },- { value: 'view', label: 'View' },- { value: 'comment', label: 'Comment' },- { value: 'edit', label: 'Edit' },+ { value: 'NONE', label: 'No team access' },+ { value: 'view', label: 'Can view' },+ { value: 'comment', label: 'Can comment' },+ { value: 'edit', label: 'Can edit' },]);expect(teamShareScopeOptionsForItem('project')).toEqual([- { value: 'NONE', label: 'None' },- { value: 'view', label: 'View' },- { value: 'comment', label: 'Comment' },- { value: 'edit', label: 'Edit' },+ { value: 'NONE', label: 'No team access' },+ { value: 'view', label: 'Can view' },+ { value: 'comment', label: 'Can comment' },+ { value: 'edit', label: 'Can edit' },]);});diff --git a/apps/web/src/lib/core/component/TopBar/linkShare.ts b/apps/web/src/lib/core/component/TopBar/linkShare.tsindex 16684356b9..338eeba623 100644--- a/apps/web/src/lib/core/component/TopBar/linkShare.ts+++ b/apps/web/src/lib/core/component/TopBar/linkShare.ts@@ -85,29 +85,28 @@ export type ShareStatus = {const LINK_SHARE_SCOPE_COPY: Record<LinkShareScope, LinkShareScopeCopy> = {NONE: {- label: 'None',- title: 'Link sharing off',- description:- 'Only people and channels you explicitly share with can access this item.',+ label: 'Only people with access',+ title: 'Only people with access',+ description: 'The link only works for people who already have access.',},PUBLIC: {- label: 'Public',- title: 'Public link',+ label: 'Anyone with the link',+ title: 'Anyone with the link',description: 'Anyone with the link can access this item.',},TEAM: {- label: 'Team',- title: 'Team link',+ label: 'Team members with the link',+ title: 'Team members with the link',description:- "Members of the owner's team with the link can access this item. This does not share it directly with a team or channel.",+ "Members of the owner's team can open this link. Others need to be added separately.",},};const TEAM_SHARE_COPY: Record<TeamShareScope, string> = {- NONE: 'None',- view: 'View',- comment: 'Comment',- edit: 'Edit',+ NONE: 'No team access',+ view: 'Can view',+ comment: 'Can comment',+ edit: 'Can edit',};export const LINK_SHARE_SCOPE_OPTIONS = (diff --git a/apps/web/src/lib/core/constant/featureFlags.ts b/apps/web/src/lib/core/constant/featureFlags.tsindex d5aaede565..faf02d09c3 100644--- a/apps/web/src/lib/core/constant/featureFlags.ts+++ b/apps/web/src/lib/core/constant/featureFlags.ts@@ -171,10 +171,11 @@ export const enableTasksReviews = defineFlag({default: onInDev,});-/** Gantt layouts stay hidden until enabled remotely or with a local override. */+/** Gantt is visible in local previews; deployed apps retain the remote rollout. */export const enableGantt = defineFlag({key: 'enable-gantt',env: 'ENABLE_GANTT',+ default: LOCAL_ONLY || undefined,});export const ENABLE_PDF_MODIFICATION_DATA_AUTOSAVE = defineFlag({diff --git a/docs/agent-guide/ai-chat.md b/docs/agent-guide/ai-chat.mdindex adc0f8d06f..0de6d363f3 100644--- a/docs/agent-guide/ai-chat.md+++ b/docs/agent-guide/ai-chat.md@@ -2192,3 +2192,5 @@ Linear and Jira imports name their tracker ("Linear import plan ready · 40tasks · 3 projects", "Jira import finished"). The row never shows thereport's error text. The row stays on one line andtruncates on phones.++The desktop Agents sidebar New menu offers Conversation, Work agent, Coding agent, and Routine, with short descriptions. Conversation opens the existing composer; Work agent and Coding agent open the agent editor with that kind preselected, including when a runtime setup page was previously open. Routine opens its unsaved composer. Canceling creation returns to the existing management flow.diff --git a/docs/agent-guide/calendar.md b/docs/agent-guide/calendar.mdindex 1ea161e734..3a5fc895e3 100644--- a/docs/agent-guide/calendar.md+++ b/docs/agent-guide/calendar.md@@ -1378,3 +1378,5 @@ not create another copy while the existing operation is unresolved. Events withnative details that cannot be safely copied are rejected before any invitations.For an Outlook invitation you attend, `Open in Outlook` below the RSVP controlsopens the actual occurrence so you can clear your own response there.++Calendar's New menus explain Event, Call, and Booking link with icons and muted descriptions. Call and Booking link keep their existing feature gates. Booking link opens the personal Scheduling workspace with an unsaved link editor; canceling creates nothing. The URL request is consumed once after the profile is ready.diff --git a/docs/agent-guide/crm.md b/docs/agent-guide/crm.mdindex 2dafe88f31..7492a44db0 100644--- a/docs/agent-guide/crm.md+++ b/docs/agent-guide/crm.md@@ -379,3 +379,5 @@ properties. `Prepare export` fetches every page and shows a count and three-rowit does not download. `Download CSV` saves the prepared snapshot using the selectedcolumns. Changing scope requires preparing again. Cancel stops preparation. CSV uses UTF-8,quoted fields, original date timestamps and spreadsheet formula escaping.++The existing CRM New menus use icons and muted descriptions for Company, Contact, and Pipeline. Pipeline availability and permissions are unchanged.diff --git a/docs/agent-guide/documents.md b/docs/agent-guide/documents.mdindex e2d541e4bf..e49c5a01f9 100644--- a/docs/agent-guide/documents.md+++ b/docs/agent-guide/documents.md@@ -3037,3 +3037,7 @@ Task @mention pills display the same circular completion/status icon as taskrows. The icon updates in place as preview data changes; unknown status usesan empty circle, and subtype-only previews use their completion flag. See[tasks](tasks.md#task-status-icons) for states and the browser regression.++Sharing labels describe their audience: Only people with access, Anyone with the link, and Team members with the link. Permission choices say Can view, Can comment, and Can edit. Copying a restricted link still does not grant access. The existing immediately opening dialog and its deferred loading remain unchanged.++Drive's existing New controls open a wide menu with icons and short descriptions for creation and uploads, while preserving the current destination and feature gates.diff --git a/docs/agent-guide/email.md b/docs/agent-guide/email.mdindex fc23173188..bf96273a35 100644--- a/docs/agent-guide/email.md+++ b/docs/agent-guide/email.md@@ -1086,3 +1086,5 @@ must resume only after the preserved queue is readable. Repeat while another tabholds the cache owner lock; recovery must never steal the lock or erase its queue.Storage/schema failures that cannot prove preservation show recovery/updateinstructions instead of repeatedly reopening potentially damaged storage.++Date-grouped email lists start directly with today's messages; Today is not shown as a leading group heading. Older date headings remain visible and ordering still uses the server's thread activity timestamp.diff --git a/docs/agent-guide/images/creation-menu-descriptions.png b/docs/agent-guide/images/creation-menu-descriptions.pngnew file mode 100644index 0000000000..14b44bf18bBinary files /dev/null and b/docs/agent-guide/images/creation-menu-descriptions.png differdiff --git a/docs/agent-guide/images/joined-view-tabs.png b/docs/agent-guide/images/joined-view-tabs.pngnew file mode 100644index 0000000000..3f561eb9ceBinary files /dev/null and b/docs/agent-guide/images/joined-view-tabs.png differdiff --git a/docs/agent-guide/images/toast-stack.png b/docs/agent-guide/images/toast-stack.pngnew file mode 100644index 0000000000..dd23c48860Binary files /dev/null and b/docs/agent-guide/images/toast-stack.png differdiff --git a/docs/agent-guide/tasks.md b/docs/agent-guide/tasks.mdindex 2cbcc23102..0f88d6a166 100644--- a/docs/agent-guide/tasks.md+++ b/docs/agent-guide/tasks.md@@ -25,7 +25,7 @@ the rows and hovering a submenu hands focus to it as usual. The mobile drawer haAI box.The desktop sidebar's Search icon, immediately left of collapse, opens thesearch field above New. It shares the current Tasks or Projects list query.-The desktop sidebar and toolbar `New` menus offer `Task`, `Project` (when+The desktop sidebar and toolbar `New` menus offer `Task`, `Subtask`, `Project` (whenProjects is enabled), and `Tag`. Task and Project open their existing composers;Tag opens the tag editor, with personal scope selected and team sharing availablewhen the user has a team. The Projects list uses the same menu. Mobile creation@@ -73,8 +73,8 @@ same drawer. Mobile supports List only. Opening a Board or Gantt link, orrestoring either layout, automatically selects List and replaces that host'slayout URL parameter without adding history or clearing search, sorting,grouping, or filters. Desktop supports List and Board, plus Gantt when the-PostHog `enable-gantt` flag is enabled. This flag also gates project-task and-Projects collection timelines. When the flag is disabled or still loading,+PostHog `enable-gantt` flag is enabled, or when running the local hot-reload+preview. This flag also gates project-task and Projects collection timelines. When the flag is disabled or still loading,saved Gantt layouts and Gantt URLs render List without clearing the selectedlayout, so enabling the flag restores Gantt. The local override is`VITE_ENABLE_GANTT=true` (or `false` to force it off).@@ -963,3 +963,7 @@ mention, including completing and reopening without a reload:`bunx playwright test --config src/lib/core/component/LexicalMarkdown/component/decorator/browser-test/playwright.config.ts task-status.browser.e2e.ts`.++The Task, Subtask, Project, and Tag entries use a wide menu with original icons and muted descriptions. Subtask opens a parent-task picker, then the normal task composer. Saving includes the selected Parent task property; if that link cannot be confirmed, keep the created task and show a warning instead of asking the user to create it again. Canceling either step creates nothing.++diff --git a/docs/agent-guide/toasts.md b/docs/agent-guide/toasts.mdnew file mode 100644index 0000000000..1ebc54cdef--- /dev/null+++ b/docs/agent-guide/toasts.md@@ -0,0 +1,27 @@+# Toast notifications++Desktop notifications appear at the bottom right. Up to three ordinary notices+are mounted at once; additional notices queue until a slot opens. Older notices+peek behind the front card. Hover the stack or focus one of its controls to+expand it and pause dismissal. Moving away resumes the remaining time.++Ordinary notices dismiss after 4.5 seconds unless the caller specifies a duration.+Persistent prompts and reminders keep their separate, single-card queues and+remain until answered or dismissed. A new success notice does not replace a+persistent reconnect prompt. Mobile keeps one transient notice at a time above+the dock and preserves full descriptions and accessible close buttons.++All toasts place actions to the right of the message, centered vertically. The+close button floats halfway over the top-right corner; stacked cards leave room+for it when expanded. Close, Escape while focused,+and swipe dismiss a notice. Closing a persistent prompt can record a real+user dismissal; do not dismiss a real reconnect prompt merely to clear a test+screenshot. Motion follows the system's reduced-motion preference.++Use `/app/debug/ui?ui=toast` to preview success, an expandable stack, and a+persistent prompt. Demo actions do not change account state. Demo notices are+removed when their preview unmounts.++Backend-free desktop/phone coverage: `bunx playwright test --config src/components/view-shell/browser-test/playwright.config.ts` from `apps/web`. The fixture uses only local callbacks and demo notices.++diff --git a/docs/agent-guide/ui-conventions.md b/docs/agent-guide/ui-conventions.mdindex 3f362d92fd..06fc7ed4a6 100644--- a/docs/agent-guide/ui-conventions.md+++ b/docs/agent-guide/ui-conventions.md@@ -59,11 +59,7 @@ draw a full 1px frame edge, menus keep the glass cast shadow, and`ComposerSurface` (composers and settings cards) keeps the wide `composer-shadow`halo. Touch surfaces retain their existing shadows.-Tabs are separate pills, like Linear's view tabs: unselected pills use the-outline Button frame, and the selected pill takes the pressed fill, flat, the-same state as a pressed (`aria-pressed`) Button. There is no track and no-separate active tint, except the agent composer's Chat/Code switch-(`variant="track"`). Touch keeps each surface's existing tab treatment.+Desktop view tabs share one rounded track, with a small inset and a fully rounded selected pill. The selected pill uses the pressed fill and a subtle edge; tabs have no internal dividers. Wrapping preset choices can remain separate pills. Keep the existing touch-specific tab treatment and the agent composer's sliding track.Reuse `Button`, `Input`, `InputGroup`, `Tabs`, `ComposerSurface`, `menu-surface`, and`elevated-surface` instead of introducing one-off surface styling. Every menu,@@ -191,3 +187,7 @@ hover feedback, respecting reduced motion. Control layouts and hit targets areindependent of glyph geometry. See the [icon guide](../../apps/web/src/components/icon/system/README.md).++++On desktop, multiple splits have a small close button nested into each frame’s top-left corner, outside the topbar. A lone detail view keeps its Return to list action, and touch layouts keep header controls.