Skip to content

Commit f7a2b8f

Browse files
committed
fix(app): show global-project sessions in web Home (anomalyco#46444)
1 parent bbd72fb commit f7a2b8f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎packages/app/src/pages/home/home-sessions-controller.tsx‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,14 @@ function buildHomeSessionRecords(input: {
254254
projectByID: () => Map<string, LocalProject>
255255
}) {
256256
const directories = new Set(input.projectDirectories().map(pathKey))
257-
const sessions = input.sessions().filter((session) => directories.has(pathKey(session.directory)))
257+
const sessions = input.sessions().filter((session) => {
258+
// Sessions outside any git repo belong to the global project, whose
259+
// worktree is forced to "/" and which never accumulates sandboxes — so
260+
// their real directory (e.g. C:/Users/Raphael) never matches the filter
261+
// and they silently vanish from Home (#46444). Keep them visible.
262+
if (session.projectID === "global") return true
263+
return directories.has(pathKey(session.directory))
264+
})
258265
return [...new Map(sessions.map((session) => [session.id, session] as const)).values()]
259266
.sort(compareSessionTime)
260267
.flatMap((session) => {

0 commit comments

Comments
 (0)