-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Description
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
- Open opencode web (e.g.
opencode web --port 4097) - From the home screen, click on a project to open it — this sets the URL to
/<base64-dir>/session - Copy that URL and open it in a new tab (or press Ctrl+R to reload)
- Observe: the left sidebar shows no project name, no sessions, no New Session button — completely blank
- 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
Operating System
Windows 11
Terminal
Microsoft Edge