You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[V2 compat] All legacy v1 session avatars render as "/" (sessions bound to project_id "global") #57067
After migrating from v1 (1.18.23) to V2 (Desktop 2.0.29 / CLI 2.0.27), every session
in the Desktop home/sidebar shows the same "/" avatar, regardless of project.
Environment
Linux x64 (Ubuntu 24.04), Desktop 2.0.29, CLI 2.0.27
All 48 v1-created sessions have project_id = 'global'; the global project row
has worktree = '/' and name = NULL.
Verified via backup comparison that v1 data already looked like this before
migration — so this is not migration data loss, but a V2 rendering regression
for legacy data.
ProjectAvatar fallback chain displayName = name || basename(worktree) || worktree
followed by first(...) yields '/' for this project, so every session avatar
becomes /.
session.directory is correct for all 48 sessions (e.g. /home/user/myproject),
so grouping/display could still be derived correctly.
Expected
Session avatars fall back to the session's directory basename (or the project matched
by worktree) instead of /.
Actual
All session avatars show /.
Notes
Project.resolve still assigns ID.global for directories without a git/hg root,
so new sessions in non-git directories appear to hit the same path.
User-side workaround I applied offline: remap session.project_id / session_v2.project_id by exact directory → project.worktree match
(fixed 43/48; 5 sessions whose directory has no project row remain on global).
Thanks for the detailed report and for working out the cause.
I couldn't reproduce this here. The / avatar only shows up in the Desktop/web app, and this sandbox has neither the app nor a browser, so a maintainer with the Desktop app will need to confirm it.
The code on the latest dev still matches what you describe. displayName() in packages/ui/src/data-display/project-avatar/project-avatar.tsx uses the project name, then the last part of the worktree path, then the worktree itself. For the global project (worktree /, no name) that gives /. The session tab and title bar only use the session's own directory when there is no project at all, so sessions in global never get that fallback.
Other issues about the same global root cause, most closely related first:
Your remap by directory is a reasonable workaround for now. As you noted, sessions whose directory has no project row stay on global even after such fixes.
Activity
opencode-agent commentedon Oct 19, 2026
Thanks for the detailed report and for working out the cause.
I couldn't reproduce this here. The
/avatar only shows up in the Desktop/web app, and this sandbox has neither the app nor a browser, so a maintainer with the Desktop app will need to confirm it.The code on the latest
devstill matches what you describe.displayName()inpackages/ui/src/data-display/project-avatar/project-avatar.tsxuses the project name, then the last part of the worktree path, then the worktree itself. For theglobalproject (worktree/, no name) that gives/. The session tab and title bar only use the session's own directory when there is no project at all, so sessions inglobalnever get that fallback.Other issues about the same
globalroot cause, most closely related first:globalsessions are never moved to their directory's project. PR fix(core): attribute migrated V1 sessions to the project of their directory #51935 proposes repairing that, including for databases that already finished migrating.globalcause, seen as migrated sessions missing from session lists.global, so new sessions can show the same/avatar.Your remap by directory is a reasonable workaround for now. As you noted, sessions whose directory has no project row stay on
globaleven after such fixes.