mirror of
https://github.com/stablyai/orca.git
synced 2026-10-25 08:04:05 +00:00
fix(sidebar): preserve filtered folder workspace rows
This commit is contained in:
@@ -6943,6 +6943,7 @@ const WorktreeList = React.memo(function WorktreeList({
|
||||
workspaceHostScope: 'all'
|
||||
}) &&
|
||||
worktrees.length === 0 &&
|
||||
visibleFolderWorkspacesForRows.length === 0 &&
|
||||
placeholderRepoIds.size === 0 &&
|
||||
importedWorktreesByRepo.size === 0
|
||||
// Why: host filters own Project Group rows; only workspace filters may replace those rows with Clear Filters.
|
||||
|
||||
@@ -783,6 +783,20 @@ describe('WorktreeList project-group host filtering', () => {
|
||||
expect(container.textContent).not.toContain('No workspaces found')
|
||||
})
|
||||
|
||||
it('keeps a selected-host folder-only owner group visible under workspace filters', async () => {
|
||||
setHostFilteredWorktreeListState([hostFilteredFolderWorkspace()])
|
||||
worktreeListStore.state = {
|
||||
...worktreeListStore.state,
|
||||
hideDefaultBranchWorkspace: true
|
||||
}
|
||||
|
||||
const container = await renderHostFilteredWorktreeList()
|
||||
|
||||
expect(container.textContent).toContain('Runtime project group')
|
||||
expect(container.textContent).toContain('Runtime folder workspace')
|
||||
expect(container.textContent).not.toContain('No workspaces found')
|
||||
})
|
||||
|
||||
it('still lets a workspace filter replace empty project-group headers', async () => {
|
||||
setHostFilteredWorktreeListState([])
|
||||
worktreeListStore.state = {
|
||||
|
||||
Reference in New Issue
Block a user