diff --git a/src/components/BreadcrumbBar.test.tsx b/src/components/BreadcrumbBar.test.tsx index 6528af9b..5cd34c8f 100644 --- a/src/components/BreadcrumbBar.test.tsx +++ b/src/components/BreadcrumbBar.test.tsx @@ -24,6 +24,7 @@ const baseEntry: VaultEntry = { relationships: {}, icon: null, color: null, + order: null, } const archivedEntry: VaultEntry = { diff --git a/src/components/DynamicPropertiesPanel.tsx b/src/components/DynamicPropertiesPanel.tsx index fd250518..30e190b0 100644 --- a/src/components/DynamicPropertiesPanel.tsx +++ b/src/components/DynamicPropertiesPanel.tsx @@ -139,7 +139,7 @@ function AddPropertyForm({ onAdd, onCancel }: { onAdd: (key: string, value: stri ) } -function TypeRow({ isA, onNavigate }: { isA?: string; onNavigate?: (target: string) => void }) { +function TypeRow({ isA, onNavigate }: { isA?: string | null; onNavigate?: (target: string) => void }) { if (!isA) return null return (
diff --git a/src/components/NoteList.test.tsx b/src/components/NoteList.test.tsx index 0897e9c7..e8beb7db 100644 --- a/src/components/NoteList.test.tsx +++ b/src/components/NoteList.test.tsx @@ -276,6 +276,8 @@ describe('getSortComparator', () => { owner: null, cadence: null, archived: false, + trashed: false, + trashedAt: null, modifiedAt: null, createdAt: null, fileSize: 100, @@ -352,6 +354,8 @@ describe('NoteList sort controls', () => { owner: null, cadence: null, archived: false, + trashed: false, + trashedAt: null, modifiedAt: null, createdAt: null, fileSize: 100, @@ -486,6 +490,7 @@ const trashedEntry: VaultEntry = { relationships: {}, icon: null, color: null, + order: null, } const expiredTrashedEntry: VaultEntry = { @@ -509,6 +514,7 @@ const expiredTrashedEntry: VaultEntry = { relationships: {}, icon: null, color: null, + order: null, } const entriesWithTrashed = [...mockEntries, trashedEntry, expiredTrashedEntry] diff --git a/src/components/NoteList.tsx b/src/components/NoteList.tsx index 7ca55c14..9c99b54f 100644 --- a/src/components/NoteList.tsx +++ b/src/components/NoteList.tsx @@ -1,6 +1,5 @@ import { useState, useMemo, useCallback, memo } from 'react' import type { VaultEntry, SidebarSelection, ModifiedFile } from '../types' -import { cn } from '@/lib/utils' import { Input } from '@/components/ui/input' import { MagnifyingGlass, Plus, CaretDown, CaretRight, Warning, @@ -254,7 +253,7 @@ function NoteListInner({ entries, selection, selectedNote, allContent, modifiedF )}
- {isEntityView ? ( + {isEntityView && selection.kind === 'entity' ? ( ) : ( diff --git a/src/components/Sidebar.test.tsx b/src/components/Sidebar.test.tsx index 74af71a7..d74e56f6 100644 --- a/src/components/Sidebar.test.tsx +++ b/src/components/Sidebar.test.tsx @@ -571,19 +571,19 @@ describe('Sidebar', () => { { path: '/vault/type/project.md', filename: 'project.md', title: 'Project', isA: 'Type', aliases: [], belongsTo: [], relatedTo: [], status: null, owner: null, cadence: null, - archived: false, modifiedAt: 1700000000, createdAt: null, fileSize: 200, snippet: '', + archived: false, trashed: false, trashedAt: null, modifiedAt: 1700000000, createdAt: null, fileSize: 200, snippet: '', relationships: {}, icon: null, color: null, order: 5, }, { path: '/vault/type/topic.md', filename: 'topic.md', title: 'Topic', isA: 'Type', aliases: [], belongsTo: [], relatedTo: [], status: null, owner: null, cadence: null, - archived: false, modifiedAt: 1700000000, createdAt: null, fileSize: 200, snippet: '', + archived: false, trashed: false, trashedAt: null, modifiedAt: 1700000000, createdAt: null, fileSize: 200, snippet: '', relationships: {}, icon: null, color: null, order: 0, }, { path: '/vault/type/person.md', filename: 'person.md', title: 'Person', isA: 'Type', aliases: [], belongsTo: [], relatedTo: [], status: null, owner: null, cadence: null, - archived: false, modifiedAt: 1700000000, createdAt: null, fileSize: 200, snippet: '', + archived: false, trashed: false, trashedAt: null, modifiedAt: 1700000000, createdAt: null, fileSize: 200, snippet: '', relationships: {}, icon: null, color: null, order: 1, }, ] diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 64c05ed9..82dd9958 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -133,7 +133,7 @@ function buildCustomizeArgs(typeEntry: VaultEntry, prop: 'icon' | 'color', value function SortableSection({ group, sectionProps }: { group: SectionGroup - sectionProps: Omit + sectionProps: Omit & { entries: VaultEntry[]; collapsed: Record; onToggle: (type: string) => void } }) { const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: group.type }) diff --git a/src/components/TabBar.test.tsx b/src/components/TabBar.test.tsx index 06203147..e9a568e6 100644 --- a/src/components/TabBar.test.tsx +++ b/src/components/TabBar.test.tsx @@ -8,8 +8,9 @@ function makeEntry(path: string, title: string): VaultEntry { path, filename: `${title}.md`, title, isA: 'Note', aliases: [], belongsTo: [], relatedTo: [], status: null, owner: null, cadence: null, archived: false, + trashed: false, trashedAt: null, modifiedAt: null, createdAt: null, fileSize: 0, - snippet: '', relationships: {}, icon: null, color: null, + snippet: '', relationships: {}, icon: null, color: null, order: null, } } diff --git a/src/hooks/useEntryActions.ts b/src/hooks/useEntryActions.ts index 0d069661..ef0bb39f 100644 --- a/src/hooks/useEntryActions.ts +++ b/src/hooks/useEntryActions.ts @@ -4,7 +4,7 @@ import type { VaultEntry } from '../types' interface EntryActionsConfig { entries: VaultEntry[] updateEntry: (path: string, updates: Partial) => void - handleUpdateFrontmatter: (path: string, key: string, value: unknown) => Promise + handleUpdateFrontmatter: (path: string, key: string, value: string | number | boolean | string[]) => Promise handleDeleteProperty: (path: string, key: string) => Promise setToastMessage: (msg: string | null) => void }