desktop: Home hides subdirectory sessions and mixes unrelated global projects
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 70/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start with the two files the report names: home/sessions/records.ts (the pathKey exact-match filter) and home/sessions/controller.tsx (directories(project), which merges project.worktree with project.sandboxes). Reproduce via the local session and worktree APIs, then make matching segment-aware for the selected project while excluding unrelated entries from a shared global inventory, preserving Git worktrees and nested projects. Done when the child session appears under its project and the non-Git project no longer lists unrelated conversations.
由索引模型根据 Issue 内容生成。
描述
Description
Summary
The Desktop Home project filter can both hide sessions whose working directory is a normal subdirectory of the selected project and display sessions from an unrelated project when the selected non-Git project uses a shared global worktree inventory.
This makes existing conversations appear lost and undermines separation between work and personal projects. The affected session metadata and messages remain available through the local API.
Environment
- opencode version:
opencode v2.3.0(verified on the reporting machine). The same symptoms were previously observed on Desktop 2.2.5. - OS: Windows 11,
Microsoft Windows NT 10.0.26200.0, x64. - Terminal: Desktop UI; diagnostic shell has
TERM=xterm-256color;TERM_PROGRAMandCOLORTERMare unset. - Shell: PowerShell 7.6.2;
ComSpec=C:\WINDOWS\system32\cmd.exe. - Install/channel: packaged Windows Desktop, standard release installation. No prerelease suffix in the reported version; the exact updater channel was not independently verified.
- Active plugins: configured globally:
opencode-supermemory,opencode-firecrawl,opencode-tavily,opencode-daytona,opencode-background-agents,opencode-vibeguard,opencode-notificator, and a localwhatsapp-notify.tsplugin. This lists configuration, not independently verified plugin runtime state. A plugin-disabled/clean-profile reproduction has not been performed.
Reproduction
The following paths and names are sanitized examples, not the reporter's real project data.
A. A child-directory session disappears from its own project filter
- Add an existing Git project at
C:\work\personal. - Create a conversation whose working directory is
C:\work\personal\android-app. - Verify that the session still has the personal project's
projectID, is not archived, and has readable message history. - Open Home and select the personal project.
- Observe that a root-directory session is listed, but the normal child-directory session is omitted.
The real affected Android-app session was confirmed through the session API with the correct project ID, a child working directory, and readable history. The corresponding folder and APK were also still present.
B. A shared global worktree inventory mixes unrelated projects
-
Have a non-Git project rooted at
C:\work\workrepresented byid: "global", plus a separate Git project atC:\work\personal. -
Reach a saved inventory state in which
GET /api/worktree?projectID=globalreturns both directories:[ {"directory":"C:\\work\\personal"}, {"directory":"C:\\work\\work"} ] -
Have separate root-directory conversations for those projects.
-
In Home, select the non-Git work project.
-
Observe personal conversations appearing in the work project's list.
The inventory state above was observed through the local API. The precise minimal sequence that first populated the shared inventory with both directories has not been isolated.
Expected Behavior
- Selecting a project should include its own ordinary subdirectory sessions, not only sessions whose directory exactly equals a root/worktree path.
- Selecting a non-Git project should not implicitly include every unrelated directory present in a shared
globalinventory. - Separately added nested projects and normal Git worktrees should retain their correct grouping.
- Showing a conversation should not require changing its working directory or moving its files.
Actual Behavior
- The Android-app conversation was absent from the personal Home list even though its session, project association, files, and messages still existed.
- The non-Git work project's Home list included personal conversations.
- There was no API deletion or archive operation associated with the missing conversation.
The shipped 2.3.0 renderer source map contains this exact-match filter in home/sessions/records.ts:
const selected = input.projectDirectories()
const directories = selected ? new Set(selected.map(pathKey)) : undefined
const sessions = directories
? input.sessions().filter((session) => directories.has(pathKey(session.location.directory)))
: input.sessions()
The corresponding helper in home/sessions/controller.tsx returns:
function directories(project: LocalProject) {
return [project.worktree, ...(project.sandboxes ?? [])]
}
The exact-match filter excludes ordinary child directories. When a shared global inventory supplies unrelated entries as sandboxes, returning all of them also allows cross-project root-directory matches.
Additional Context
- Both symptoms were observed on this installation before applying a local workaround. They reappeared after upgrading from 2.2.5 to 2.3.0, which replaced the locally modified renderer with the official one. This is not a request for the updater to preserve unsupported package modifications.
- A local renderer-only workaround limits a global selection to its selected canonical directory and allows segment-aware descendant matching for the selected project's own sessions, while excluding separately added nested projects and preserving Git worktree behavior.
- The workaround was tested against extracted packaged functions: 21 regression checks passed, including the real child session metadata; six additional repair-tool safety checks passed.
- After applying it, the Android-app session was observed in the personal Home UI tree. The final 2.3.0 work-project UI verification was interrupted by the machine locking and is not claimed as completed. Earlier 2.2.5 verification had confirmed the analogous work-child conversation visible and separate from personal conversations.
- Session IDs, project associations, parent relationships, and working directories were not changed by the workaround. Local checks preserved all 145 inventoried sessions, all preexisting messages in the two specifically checked conversations, and all 101 checked project files.
- A local workaround is not a durable fix because an official application update replaces the renderer. Please address the filtering/grouping behavior upstream.
- No private conversation content, account credentials, full user configuration, or private screenshots are attached.
Plugins
opencode-supermemory; opencode-firecrawl; opencode-tavily; opencode-daytona; opencode-background-agents; opencode-vibeguard; opencode-notificator; local whatsapp-notify.ts (configured; not independently isolated)
OpenCode version
2.3.0 (also observed on 2.2.5)
Steps to reproduce
The following paths and names are sanitized examples, not the reporter's real project data.
A. A child-directory session disappears from its own project filter
- Add an existing Git project at
C:\work\personal. - Create a conversation whose working directory is
C:\work\personal\android-app. - Verify that the session still has the personal project's
projectID, is not archived, and has readable message history. - Open Home and select the personal project.
- Observe that a root-directory session is listed, but the normal child-directory session is omitted.
The real affected Android-app session was confirmed through the session API with the correct project ID, a child working directory, and readable history. The corresponding folder and APK were also still present.
B. A shared global worktree inventory mixes unrelated projects
-
Have a non-Git project rooted at
C:\work\workrepresented byid: "global", plus a separate Git project atC:\work\personal. -
Reach a saved inventory state in which
GET /api/worktree?projectID=globalreturns both directories:[ {"directory":"C:\\work\\personal"}, {"directory":"C:\\work\\work"} ] -
Have separate root-directory conversations for those projects.
-
In Home, select the non-Git work project.
-
Observe personal conversations appearing in the work project's list.
The inventory state above was observed through the local API. The precise minimal sequence that first populated the shared inventory with both directories has not been isolated.
Screenshot
No response
Operating System
Windows 11 x64, Windows NT 10.0.26200.0
Terminal
OpenCode Desktop; diagnostics from PowerShell 7.6.2 (TERM=xterm-256color)
- 主要语言
- TypeScript
- 星标
- 227k
- 派生
- 30.7k
- 平均合并
- 3 小时 57 分钟
- 30 天内合并 PR
- 484
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
[Site] Active section detection should respect scroll-margin-top可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area/web reproduced type/bug
难度 2/5 1-3 小时 新手友好度 65/100
anomalyco/opencode#65384 · 1 条评论 ·
维护者通常 1 天内回复
-
area/cli type/feature version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#65379 · 1 条评论 ·
维护者通常 1 天内回复
-
Shell tool: no upper bound on the timeout a model can ask for, so one call can hold a turn for hours未关闭area/core platform/linux type/feature version/v2
难度 2/5 1-3 小时 新手友好度 75/100
anomalyco/opencode#65254 · 1 条评论 ·
维护者通常 1 天内回复
-
inference/go type/feature
难度 1/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#65148 · 1 条评论 ·
维护者通常 1 天内回复
-
area/providers type/feature version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#64845 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offers未关闭catalog provider provider-compatibility
难度 2/5 1-3 小时 新手友好度 62/100
lidge-jun/opencodex#9037 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
kind/bug triage/unresolved
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
effort:S P3 refactor
难度 2/5 1-3 小时 新手友好度 72/100
nightscout/nocturne#3735 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
wpilibsuite/systemcore-blocks-interface#641 ·
维护者通常 2 天内回复