fix(web): exclude worktree workspaces from recent workspaces list - #1865
Merged
bobleer merged 1 commit intoJul 29, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Worktree 工作区路径不应该出现在「最近的工作区」列表中。
Linked worktree directories (e.g.
BitFun-f85383a7at~/.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:mapWorkspaceStartupStateSnapshot(startup path)getRecentWorkspaces()(refresh path)Uses the existing
isLinkedWorktreeWorkspace()helper which checksworkspace.worktree && !workspace.worktree.isMain.Testing
global-state.test.tspasses (2/2)workspaceManager.test.tspasses (9/9)