diff --git a/src/components/BreadcrumbBar.test.tsx b/src/components/BreadcrumbBar.test.tsx index 09469f93..65920925 100644 --- a/src/components/BreadcrumbBar.test.tsx +++ b/src/components/BreadcrumbBar.test.tsx @@ -245,6 +245,12 @@ describe('BreadcrumbBar — action buttons always right-aligned', () => { expect(actions).toBeInTheDocument() expect(actions).toHaveClass('ml-auto') }) + + it('does not render the unused backlinks or more-actions placeholders', () => { + render() + expect(screen.queryByRole('button', { name: 'Backlinks are coming soon' })).not.toBeInTheDocument() + expect(screen.queryByRole('button', { name: 'More note actions are coming soon' })).not.toBeInTheDocument() + }) }) describe('BreadcrumbBar — raw editor toggle', () => { diff --git a/src/components/BreadcrumbBar.tsx b/src/components/BreadcrumbBar.tsx index 58fe1472..a53732e3 100644 --- a/src/components/BreadcrumbBar.tsx +++ b/src/components/BreadcrumbBar.tsx @@ -8,10 +8,8 @@ import { TooltipProvider } from '@/components/ui/tooltip' import { GitBranch, Code, - CursorText, Sparkle, SlidersHorizontal, - DotsThree, Trash, Archive, ArrowUUpLeft, @@ -214,14 +212,6 @@ function DiffAction({ ) } -function PlaceholderAction({ copy, children }: { copy: ActionTooltipCopy; children: ReactNode }) { - return ( - - {children} - - ) -} - function AIChatAction({ showAIChat, onToggleAIChat }: Pick) { const copy: ActionTooltipCopy = { label: showAIChat ? 'Close the AI panel' : 'Open the AI panel', @@ -481,16 +471,10 @@ function BreadcrumbActions({ onToggleDiff={onToggleDiff} /> {!forceRawMode && } - - - - - - ) } diff --git a/src/components/NoteList.rendering.test.tsx b/src/components/NoteList.rendering.test.tsx index 515de246..8677695b 100644 --- a/src/components/NoteList.rendering.test.tsx +++ b/src/components/NoteList.rendering.test.tsx @@ -295,6 +295,35 @@ describe('NoteList rendering', () => { } }) + it('keeps the note-list search input full width and shows only an inline spinner while loading', () => { + vi.useFakeTimers() + try { + renderNoteList({ + entries: [ + makeEntry({ path: '/vault/a.md', filename: 'a.md', title: 'Alpha Strategy' }), + makeEntry({ path: '/vault/b.md', filename: 'b.md', title: 'Beta Note' }), + ], + }) + + fireEvent.click(screen.getByTitle('Search notes')) + fireEvent.change(screen.getByPlaceholderText('Search notes...'), { target: { value: 'strategy' } }) + + const searchInput = screen.getByPlaceholderText('Search notes...') + expect(searchInput).toHaveClass('pr-8') + expect(searchInput.parentElement).toHaveClass('relative', 'flex-1') + expect(screen.getByTestId('note-list-search-loading')).toBeInTheDocument() + expect(screen.queryByText('Searching...')).not.toBeInTheDocument() + + act(() => { + vi.advanceTimersByTime(180) + }) + + expect(screen.queryByTestId('note-list-search-loading')).not.toBeInTheDocument() + } finally { + vi.useRealTimers() + } + }) + it('shows backlinks from outgoing links in entity view', () => { const entriesWithBacklink = mockEntries.map((entry) => entry.path === mockEntries[2].path ? { ...entry, outgoingLinks: ['Build Laputa App'] } : entry, diff --git a/src/components/note-list/NoteListHeader.tsx b/src/components/note-list/NoteListHeader.tsx index 30cc9c3b..f8245911 100644 --- a/src/components/note-list/NoteListHeader.tsx +++ b/src/components/note-list/NoteListHeader.tsx @@ -55,23 +55,23 @@ export function NoteListHeader({ title, typeDocument, isEntityView, listSort, li {searchVisible && ( - + onSearchChange(e.target.value)} onKeyDown={onSearchKeyDown} - className="h-8 text-[13px]" + className="h-8 pr-8 text-[13px]" /> - - {isSearching && ( - - - Searching... - - )} - + {isSearching && ( + + + + )} )}