Skip to content

fix(web): exclude worktree workspaces from recent workspaces list - #1865

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/exclude-worktree-from-recent-workspaces
Jul 29, 2026
Merged

fix(web): exclude worktree workspaces from recent workspaces list#1865
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/exclude-worktree-from-recent-workspaces

Conversation

@bobleer

@bobleer bobleer commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Worktree 工作区路径不应该出现在「最近的工作区」列表中。

Linked worktree directories (e.g. BitFun-f85383a7 at ~/.bitfun/worktrees/...) were showing up in both the Welcome page recent workspaces list and the nav sidebar workspace switcher menu. These are temporary working directories created by code sessions and should not appear in recent history.

Changes

In src/web-ui/src/shared/types/global-state.ts:

  • Filter out linked worktree workspaces (non-main) in mapWorkspaceStartupStateSnapshot (startup path)
  • Filter out linked worktree workspaces in getRecentWorkspaces() (refresh path)

Uses the existing isLinkedWorktreeWorkspace() helper which checks workspace.worktree && !workspace.worktree.isMain.

Testing

  • TypeScript type check passes
  • global-state.test.ts passes (2/2)
  • workspaceManager.test.ts passes (9/9)

Linked worktree directories (non-main) were appearing in the recent
workspaces list shown on the Welcome page and in the nav workspace
switcher menu. These are temporary working directories and should not
pollute the recent history.

Filter them out at the data source level using the existing
isLinkedWorktreeWorkspace helper, in both the startup state snapshot
and the getRecentWorkspaces API call.
@bobleer
bobleer merged commit b12c8ff into GCWing:main Jul 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant