Skip to content

Commit 628e3b8

Browse files
committed
fix: Always show conversation item actions
1 parent 152729f commit 628e3b8

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,15 @@
8787
<Sidebar.GroupContent>
8888
<Sidebar.Menu>
8989
{#each filteredConversations as conversation (conversation.id)}
90-
<Sidebar.MenuItem class="mb-1" onclick={handleMobileSidebarItemClick}>
90+
<Sidebar.MenuItem class="mb-1">
9191
<ChatSidebarConversationItem
9292
conversation={{
9393
id: conversation.id,
9494
name: conversation.name,
9595
lastModified: conversation.lastModified,
9696
currNode: conversation.currNode
9797
}}
98+
{handleMobileSidebarItemClick}
9899
isActive={currentChatId === conversation.id}
99100
onSelect={selectConversation}
100101
onEdit={editConversation}

tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
interface Props {
99
isActive?: boolean;
1010
conversation: DatabaseConversation;
11+
handleMobileSidebarItemClick?: () => void;
1112
onDelete?: (id: string) => void;
1213
onEdit?: (id: string, name: string) => void;
1314
onSelect?: (id: string) => void;
@@ -16,6 +17,7 @@
1617
1718
let {
1819
conversation,
20+
handleMobileSidebarItemClick,
1921
onDelete,
2022
onEdit,
2123
onSelect,
@@ -85,7 +87,9 @@
8587
: ''}"
8688
onclick={handleSelect}
8789
>
88-
<div class="text flex min-w-0 flex-1 items-center space-x-3">
90+
<!-- svelte-ignore a11y_click_events_have_key_events -->
91+
<!-- svelte-ignore a11y_no_static_element_interactions -->
92+
<div class="text flex min-w-0 flex-1 items-center space-x-3" onclick={handleMobileSidebarItemClick}>
8993
<div class="min-w-0 flex-1">
9094
<p class="truncate text-sm font-medium">{conversation.name}</p>
9195

@@ -178,5 +182,10 @@
178182
&:is(:hover) :global([data-slot='dropdown-menu-trigger']) {
179183
opacity: 1;
180184
}
185+
@media (max-width: 768px) {
186+
:global([data-slot='dropdown-menu-trigger']) {
187+
opacity: 1 !important;
188+
}
189+
}
181190
}
182191
</style>

tools/server/webui/src/lib/components/app/misc/ActionDropdown.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<DropdownMenu.Root bind:open>
3838
<DropdownMenu.Trigger
3939
class="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md p-0 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground {triggerClass}"
40+
onclick={(e) => e.stopPropagation()}
4041
>
4142
{#if triggerTooltip}
4243
<Tooltip.Root delayDuration={TOOLTIP_DELAY_DURATION}>
@@ -53,7 +54,7 @@
5354
{/if}
5455
</DropdownMenu.Trigger>
5556

56-
<DropdownMenu.Content {align} class="z-999 w-48">
57+
<DropdownMenu.Content {align} class="z-[999999] w-48">
5758
{#each actions as action, index (action.label)}
5859
{#if action.separator && index > 0}
5960
<DropdownMenu.Separator />

0 commit comments

Comments
 (0)