diff --git a/tools/ui/src/lib/components/app/dialogs/DialogGroup.svelte b/tools/ui/src/lib/components/app/dialogs/DialogGroup.svelte
new file mode 100644
index 000000000..bc198768c
--- /dev/null
+++ b/tools/ui/src/lib/components/app/dialogs/DialogGroup.svelte
@@ -0,0 +1,103 @@
+
+
+
+ !open && close()} open={options !== null}>
+ {
+ event.preventDefault();
+ nameInput?.focus();
+ nameInput?.select();
+ }}
+ >
+
+
+ {#if group}
+
+ {:else}
+
+ {/if}
+
+ {group ? 'Rename group' : 'New group'}
+
+
+
+ {group ? 'Choose a new name for this group.' : 'Name a group to sort chats into.'}
+
+
+
+
+
+
diff --git a/tools/ui/src/lib/components/app/dialogs/DialogGroupPicker.svelte b/tools/ui/src/lib/components/app/dialogs/DialogGroupPicker.svelte
new file mode 100644
index 000000000..e541b793b
--- /dev/null
+++ b/tools/ui/src/lib/components/app/dialogs/DialogGroupPicker.svelte
@@ -0,0 +1,94 @@
+
+
+
+ !open && close()} open={options !== null}>
+
+ Move to group
+
+
+ {
+ if (event.key === 'Enter' && newGroupName) void createAndSelect();
+ }}
+ placeholder="Search or create a group"
+ size="sm"
+ />
+
+
+
+
+
+ {#if groups.length > 0}
+
+
+ {#each groups as group (group.id)}
+
+ {/each}
+ {:else if newGroupName}
+
No matching groups
+ {/if}
+
+
+
diff --git a/tools/ui/src/lib/components/app/dialogs/index.ts b/tools/ui/src/lib/components/app/dialogs/index.ts
index ca46ba753..5b3ca761d 100644
--- a/tools/ui/src/lib/components/app/dialogs/index.ts
+++ b/tools/ui/src/lib/components/app/dialogs/index.ts
@@ -177,6 +177,24 @@ export { default as DialogConversationDelete } from './DialogConversationDelete.
*/
export { default as DialogConversationRename } from './DialogConversationRename.svelte';
+/**
+ * **DialogGroup** - Name a new sidebar group, or rename one
+ *
+ * Opened through `uiStore.openGroupDialog()`, from the Recent heading's
+ * menus to create a group and from a group's menus to rename it. Mounted
+ * once, in the sidebar.
+ */
+export { default as DialogGroup } from './DialogGroup.svelte';
+
+/**
+ * **DialogGroupPicker** - Pick the group a chat moves to, on a phone
+ *
+ * Opened through `uiStore.openGroupPicker()` where a desktop menu shows the
+ * group submenu: a search that filters the groups and creates one with
+ * the typed name. Mounted once, in the sidebar.
+ */
+export { default as DialogGroupPicker } from './DialogGroupPicker.svelte';
+
/**
*
* CONTENT PREVIEW DIALOGS
diff --git a/tools/ui/src/lib/components/app/navigation/ContextMenuActions.svelte b/tools/ui/src/lib/components/app/navigation/ContextMenuActions.svelte
index ca0f7de60..dd68cb425 100644
--- a/tools/ui/src/lib/components/app/navigation/ContextMenuActions.svelte
+++ b/tools/ui/src/lib/components/app/navigation/ContextMenuActions.svelte
@@ -26,6 +26,6 @@
-
+ (open = false)} />
diff --git a/tools/ui/src/lib/components/app/navigation/DropdownMenuActions.svelte b/tools/ui/src/lib/components/app/navigation/DropdownMenuActions.svelte
index 7dd6ea6ad..158c55858 100644
--- a/tools/ui/src/lib/components/app/navigation/DropdownMenuActions.svelte
+++ b/tools/ui/src/lib/components/app/navigation/DropdownMenuActions.svelte
@@ -129,7 +129,7 @@
-
+ (open = false)} />
{/if}
diff --git a/tools/ui/src/lib/components/app/navigation/MenuActionsList.svelte b/tools/ui/src/lib/components/app/navigation/MenuActionsList.svelte
index c48076bb9..7a0ba8a4d 100644
--- a/tools/ui/src/lib/components/app/navigation/MenuActionsList.svelte
+++ b/tools/ui/src/lib/components/app/navigation/MenuActionsList.svelte
@@ -4,15 +4,18 @@
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import * as Tooltip from '$lib/components/ui/tooltip';
import { MenuKind } from '$lib/enums';
+ import { deviceStore } from '$lib/stores';
import type { MenuAction } from '$lib/types';
import type { Component } from 'svelte';
interface Props {
actions: MenuAction[];
kind: MenuKind;
+ /** Closes the menu, e.g. after a pick in a submenu. */
+ onClose: () => void;
}
- let { actions, kind }: Props = $props();
+ let { actions, kind, onClose }: Props = $props();
// both kits wrap the same bits-ui menu parts, so the rows render alike
let Menu = $derived(kind === MenuKind.CONTEXT ? ContextMenu : DropdownMenu);
@@ -23,7 +26,10 @@