[GH-ISSUE #134] Sidebar: workspace chat list not visible until clicking folder chevron #61

Closed
opened 2026-10-18 14:02:32 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @PhilippeRoy on GitHub (Jul 12, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/134

Sidebar: workspace chat list is not visible until clicking the folder chevron

Describe the bug
When navigating to a workspace (either via URL or by clicking the workspace name in the sidebar), the chat list remains hidden. The user must click a small folder chevron icon to expand the workspace and see the chat list. Clicking the workspace name should also expand the workspace to show its chats.

To Reproduce

  1. Open the app with ?workspace=/some/path (or any workspace path)
  2. Notice the sidebar shows the workspace name but no chat list
  3. The chat list only appears after clicking the tiny folder chevron icon next to the workspace name

Expected behavior

  • When navigating to a workspace (clicking its name), the workspace should auto-expand to show the chat list
  • When loading a page with a ?workspace= URL parameter, that workspace should auto-expand

Technical details
The issue is in SidebarWorkspaceList.svelte. The openWorkspace() function navigates to the workspace URL but does not expand the workspace. The onMount also does not auto-expand the workspace from the URL.

Patch (source-level diff)

Two changes to cptr/frontend/src/lib/components/SidebarWorkspaceList.svelte:

Change 1 — openWorkspace() function:

function openWorkspace(e: MouseEvent, path: string) {
    if (e.metaKey || e.ctrlKey) return;
    e.preventDefault();
    // NEW: expand the workspace when clicking the name
    if (!expandedWorkspaces.has(path)) {
        const next = new Set(expandedWorkspaces);
        next.add(path);
        expandedWorkspaces = next;
        if (!wsChatsCache.has(path)) fetchWorkspaceChats(path);
    }
    goto(`/?workspace=${encodeURIComponent(path)}`);
    closeMobileSidebar();
}

Change 2 — inside onMount():

onMount(async () => {
    // ... existing sortable setup ...
    // ... existing socket listener ...

    // NEW: auto-expand the workspace from the URL on page load
    if (currentPath && !expandedWorkspaces.has(currentPath)) {
        const next = new Set(expandedWorkspaces);
        next.add(currentPath);
        expandedWorkspaces = next;
        await fetchWorkspaceChats(currentPath);
    }
});

For pipx installations (no source available):
Edit the compiled JS file at _app/immutable/nodes/0.<hash>.js:

  1. In function N(e,t){...} — add ,l(x).has(t)||O(t) after the goto() call
  2. In L(()=>{...}) — add ,l(D)&&!l(x).has(l(D))&&O(l(D)) before the closing })
  3. Bump the service worker version timestamp to force re-cache
Originally created by @PhilippeRoy on GitHub (Jul 12, 2026). Original GitHub issue: https://github.com/open-webui/computer/issues/134 # Sidebar: workspace chat list is not visible until clicking the folder chevron **Describe the bug** When navigating to a workspace (either via URL or by clicking the workspace name in the sidebar), the chat list remains hidden. The user must click a small folder chevron icon to expand the workspace and see the chat list. Clicking the workspace name should also expand the workspace to show its chats. **To Reproduce** 1. Open the app with `?workspace=/some/path` (or any workspace path) 2. Notice the sidebar shows the workspace name but no chat list 3. The chat list only appears after clicking the tiny folder chevron icon next to the workspace name **Expected behavior** - When navigating to a workspace (clicking its name), the workspace should auto-expand to show the chat list - When loading a page with a `?workspace=` URL parameter, that workspace should auto-expand **Technical details** The issue is in `SidebarWorkspaceList.svelte`. The `openWorkspace()` function navigates to the workspace URL but does not expand the workspace. The `onMount` also does not auto-expand the workspace from the URL. **Patch (source-level diff)** Two changes to `cptr/frontend/src/lib/components/SidebarWorkspaceList.svelte`: **Change 1 — `openWorkspace()` function:** ```typescript function openWorkspace(e: MouseEvent, path: string) { if (e.metaKey || e.ctrlKey) return; e.preventDefault(); // NEW: expand the workspace when clicking the name if (!expandedWorkspaces.has(path)) { const next = new Set(expandedWorkspaces); next.add(path); expandedWorkspaces = next; if (!wsChatsCache.has(path)) fetchWorkspaceChats(path); } goto(`/?workspace=${encodeURIComponent(path)}`); closeMobileSidebar(); } ``` **Change 2 — inside `onMount()`:** ```typescript onMount(async () => { // ... existing sortable setup ... // ... existing socket listener ... // NEW: auto-expand the workspace from the URL on page load if (currentPath && !expandedWorkspaces.has(currentPath)) { const next = new Set(expandedWorkspaces); next.add(currentPath); expandedWorkspaces = next; await fetchWorkspaceChats(currentPath); } }); ``` **For pipx installations (no source available):** Edit the compiled JS file at `_app/immutable/nodes/0.<hash>.js`: 1. In `function N(e,t){...}` — add `,l(x).has(t)||O(t)` after the `goto()` call 2. In `L(()=>{...})` — add `,l(D)&&!l(x).has(l(D))&&O(l(D))` before the closing `})` 3. Bump the service worker version timestamp to force re-cache
Author
Owner

@tjbck commented on GitHub (Jul 12, 2026):

This is currently intended but we're open to discussions here!

<!-- gh-comment-id:4950269281 --> @tjbck commented on GitHub (Jul 12, 2026): This is currently intended but we're open to discussions here!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/computer#61
No description provided.