Skip to content

bug(app): blank sidebar panel when navigating directly to a project URL #16837

Closed as not planned

Description

@minhhieugma

Description

When opening the app by navigating directly to a project URL (e.g. clicking a session link from another tab, reloading a project page, or deep-linking), the sidebar panel renders completely blank — no project name, no branch, no session list, no New Session button.

The root cause is in the layout's auto-select createEffect in packages/app/src/pages/layout.tsx. It skips execution when state.autoselect is false, which is always the case when a dir param is already present in the URL (i.e. on direct navigation). This means layout.projects.open() is never called, so layout.projects.list() stays empty, currentProject() returns undefined, and the SidebarPanel renders blank.

The fix is a second createEffect that detects when the URL contains a directory that is not yet in the open projects list and calls openProject(dir, false) to register it without triggering a navigation.

Plugins

No response

OpenCode version

1.2.24

Steps to reproduce

  1. Open opencode web (e.g. opencode web --port 4097)
  2. From the home screen, click on a project to open it — this sets the URL to /<base64-dir>/session
  3. Copy that URL and open it in a new tab (or press Ctrl+R to reload)
  4. Observe: the left sidebar shows no project name, no sessions, no New Session button — completely blank
  5. Refreshing with Ctrl+R does NOT fix it (unlike the workspace-deletion bug in Missing sidebar content #12335)

Expected: the sidebar correctly displays the project corresponding to the directory in the URL.

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

Microsoft Edge

Activity

  1. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    on May 3, 2026
  2. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions