fix(ui): preserve upstream sidebar and selection behavior

This commit is contained in:
c_w_xiaohei
2026-08-26 02:36:07 +08:00
parent f329a22cf3
commit ceee7f350e
4 changed files with 60 additions and 1 deletions
@@ -55,4 +55,14 @@ describe('selectFolderIdsForProjection', () => {
expect([...selectFolderIdsForProjection(folders, { archivedBucket: true, searchQuery: 'matching' })])
.toEqual(['root', 'child']);
});
test('keeps a fuzzy folder match and its ancestor', () => {
const folders = [
{ id: 'root', name: 'Root', parentId: null, nodeCount: 0 },
{ id: 'child', name: 'Release Notes', parentId: 'root', nodeCount: 0 },
];
expect([...selectFolderIdsForProjection(folders, { archivedBucket: false, searchQuery: 'release-notes' })])
.toEqual(['root', 'child']);
});
});