fix: address folder tree QA feedback — recursive filtering, folder creation, path display, remove flatten banner
1. Folder selection now recursively includes notes from subfolders 2. + button creates a new folder with inline rename (Tauri command + UI) 3. Note list items show full path when note is in a subdirectory 4. Remove flat vault migration banner and all related code (Rust commands, hook, component, smoke test) — subfolders are now first-class Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -715,7 +715,12 @@ describe('filterEntries — folder selection', () => {
|
||||
expect(result.find(e => e.title === 'Site')).toBeUndefined()
|
||||
})
|
||||
|
||||
it('filters by parent folder (non-recursive — direct children only)', () => {
|
||||
it('filters recursively — includes notes from subfolders', () => {
|
||||
const result = filterEntries(entries, { kind: 'folder', path: 'projects' })
|
||||
expect(result.map(e => e.title)).toEqual(['Note 1', 'Note 2', 'Site'])
|
||||
})
|
||||
|
||||
it('filters direct children', () => {
|
||||
const result = filterEntries(entries, { kind: 'folder', path: 'areas' })
|
||||
expect(result.map(e => e.title)).toEqual(['Health'])
|
||||
})
|
||||
|
||||
@@ -314,12 +314,8 @@ function applySubFilter(entries: VaultEntry[], subFilter: NoteListFilter): Vault
|
||||
}
|
||||
|
||||
function isInFolder(entryPath: string, folderRelPath: string): boolean {
|
||||
const sep = '/'
|
||||
const suffix = sep + folderRelPath + sep
|
||||
const dirEnd = entryPath.lastIndexOf(sep)
|
||||
if (dirEnd < 0) return false
|
||||
const entryDir = entryPath.slice(0, dirEnd + 1)
|
||||
return entryDir.endsWith(suffix)
|
||||
const needle = '/' + folderRelPath + '/'
|
||||
return entryPath.includes(needle) || entryPath.startsWith(folderRelPath + '/')
|
||||
}
|
||||
|
||||
function filterByKind(entries: VaultEntry[], selection: SidebarSelection, subFilter?: NoteListFilter): VaultEntry[] {
|
||||
|
||||
Reference in New Issue
Block a user