diff --git a/frontend/src/lib/components/sessions/SessionPicker.svelte b/frontend/src/lib/components/sessions/SessionPicker.svelte index 160b408fb7..26442879d7 100644 --- a/frontend/src/lib/components/sessions/SessionPicker.svelte +++ b/frontend/src/lib/components/sessions/SessionPicker.svelte @@ -3,8 +3,6 @@ import Checkbox from '$lib/components/common/checkbox/Checkbox.svelte' import { Button } from '$lib/components/common' import SidebarSectionHeader from '$lib/components/sidebar/SidebarSectionHeader.svelte' - import ScrollFade from '$lib/components/ScrollFade.svelte' - import { SIDEBAR_FADE_FROM } from '$lib/components/sidebar/sidebarChrome' import { Archive, ArchiveRestore, @@ -785,7 +783,7 @@ {:else}
@@ -922,300 +920,301 @@ {/if} {/if} {#if !collapsible || !sectionCollapsed.val} -
-
- {#snippet vline()} - - - - {/snippet} - {#snippet sessionRow(session, indented, treeDepth)} - {@const runtime = getRuntime(session.id)} - {@const status = runtime - ? getSessionChatStatus(runtime) - : (getSessionChatPeek(session.id)?.status ?? 'idle')} - {@const isSelected = session.id === activeRowId} - {@const isEditing = editingId === session.id} - {@const unread = unreadFor(session)} - {@const draft = hasDraft(session)} - {@const isChecked = selectedIds.includes(session.id)} -
- {#if treeDepth !== undefined} - {#each Array(treeDepth) as _}{@render vline()}{/each} - {/if} - {#if selectionMode} - - - { - toggleSelected(session.id, shiftHeldOnClick) - shiftHeldOnClick = false - }} - onClick={(e) => (shiftHeldOnClick = e.shiftKey)} - class="shrink-0 !w-4 !h-4 !p-0" - title={session.summary ?? 'Untitled session'} + + { + toggleSelected(session.id, shiftHeldOnClick) + shiftHeldOnClick = false + }} + onClick={(e) => (shiftHeldOnClick = e.shiftKey)} + class="shrink-0 !w-4 !h-4 !p-0" + title={session.summary ?? 'Untitled session'} + /> + + {/if} + {#if isEditing} + + {#if treeDepth === undefined} + - - {/if} - {#if isEditing} - - {#if treeDepth === undefined} - - {/if} - { - if (e.key === 'Enter') commitRename() - else if (e.key === 'Escape') cancelRename() - }, - onblur: commitRename - }} + {/if} + { + if (e.key === 'Enter') commitRename() + else if (e.key === 'Escape') cancelRename() + }, + onblur: commitRename + }} + /> + + {:else} + - -
- startRename(session) - }, - ...(session.archived - ? // No Unarchive when the workspace is gone — it can't persist - // (putSession guard) and reconcile would re-archive it. - isUnavailableFork(session) - ? [] - : [ - { - displayName: 'Unarchive', - icon: ArchiveRestore, - action: () => setSessionArchived(session.id, false) - } - ] +
+ startRename(session) + }, + ...(session.archived + ? // No Unarchive when the workspace is gone — it can't persist + // (putSession guard) and reconcile would re-archive it. + isUnavailableFork(session) + ? [] : [ { - displayName: 'Archive', - icon: Archive, - action: () => { - setSessionArchived(session.id, true) - leaveArchivedHomeDraft([session.id]) - } + displayName: 'Unarchive', + icon: ArchiveRestore, + action: () => setSessionArchived(session.id, false) } - ]), - { - displayName: 'Delete', - icon: Trash2, - type: 'delete', - action: () => (pendingDelete = session) - } - ]} - > - {#snippet buttonReplacement()} - - - - {/snippet} - -
- {/if} -
- {/snippet} - {#if workspaceTree} - {#each workspaceTreeItems as item, wi (item.workspace.id)} - {#if !hiddenWorkspaceIds.has(item.workspace.id)} - {@const wsSessions = sessionsByWorkspace.get(item.workspace.id) ?? []} - {@const collapsed = isWorkspaceCollapsed(item.workspace.id)} - {@const collapsible = item.hasChildren || wsSessions.length > 0} - -
0 && item.depth === 0 ? 'mt-3' : '', - browsedWorkspaceId === item.workspace.id - ? sidebarClasses.selectedBg - : 'hover:bg-surface-hover' - )} +
0 && item.depth === 0 ? 'mt-3' : '', + browsedWorkspaceId === item.workspace.id + ? sidebarClasses.selectedBg + : 'hover:bg-surface-hover' + )} + > + {#each Array(item.depth) as _}{@render vline()}{/each} + + {#if collapsible} - {#if collapsible} - - {/if} -
- {#if !collapsed} - {#each wsSessions as session (session.id)} - {@render sessionRow(session, true, item.depth + 1)} - {/each} {/if} +
+ {#if !collapsed} + {#each wsSessions as session (session.id)} + {@render sessionRow(session, true, item.depth + 1)} + {/each} {/if} - {/each} - {:else} - {#each displayGroups as group, groupIdx (group.key)} - {#if group.showHeader} - {@const groupWsId = group.workspaceId} - {@const groupWs = groupWsId - ? $userWorkspaces.find((w) => w.id === groupWsId) - : undefined} - -
0 ? 'mt-4' : '' - )} - title={group.label} - > - - {group.label} - - {#if groupWs?.is_dev_workspace} - - {/if} - {#if groupWsId} -
- {/if} - {#each group.sessions as session (session.id)} - {@render sessionRow(session, group.showHeader, undefined)} - {/each} +
0 ? 'mt-4' : '' + )} + title={group.label} + > + + {group.label} + + {#if groupWs?.is_dev_workspace} + + {/if} + {#if groupWsId} +
+ {/if} + {#each group.sessions as session (session.id)} + {@render sessionRow(session, group.showHeader, undefined)} {/each} - {/if} -
- - + {/each} + {/if}
{#if selectionMode} -
+ +
diff --git a/frontend/src/lib/components/sidebar/sidebarChrome.ts b/frontend/src/lib/components/sidebar/sidebarChrome.ts index 87e6ca4943..4c58202416 100644 --- a/frontend/src/lib/components/sidebar/sidebarChrome.ts +++ b/frontend/src/lib/components/sidebar/sidebarChrome.ts @@ -4,5 +4,3 @@ // across dark variants and to the instance accent tint (accentColor.ts). export const SIDEBAR_BG = 'var(--sidebar-bg-light)' export const SIDEBAR_BG_DARK = 'var(--sidebar-bg-dark)' -// ScrollFade's colour stop for a scroller on the rail. -export const SIDEBAR_FADE_FROM = 'from-[var(--sidebar-bg-light)] dark:from-[var(--sidebar-bg-dark)]' diff --git a/frontend/src/routes/(root)/(logged)/+layout.svelte b/frontend/src/routes/(root)/(logged)/+layout.svelte index 666d1c4b8a..488e8478c9 100644 --- a/frontend/src/routes/(root)/(logged)/+layout.svelte +++ b/frontend/src/routes/(root)/(logged)/+layout.svelte @@ -1316,11 +1316,9 @@ outside this layout, and their shortcut must reopen the URL that is their creden
- + {#if sessionsShown} -
+
{/if}