diff --git a/src/App.test.tsx b/src/App.test.tsx index 62878a47..c7f8c2cd 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -517,10 +517,16 @@ describe('App', () => { render() - await waitFor(() => { - expect(screen.queryByTestId('vault-loading-skeleton')).not.toBeInTheDocument() - }) - expect(screen.getByText('Select a note to start editing')).toBeInTheDocument() + expect(await screen.findByTestId('sidebar-loading-favorites', {}, { timeout: 5000 })).toBeInTheDocument() + expect(screen.queryByTestId('vault-loading-skeleton')).not.toBeInTheDocument() + expect(screen.getByTestId('sidebar-top-nav')).toHaveTextContent('Inbox') + expect(screen.getByTestId('sidebar-loading-views')).toBeInTheDocument() + expect(screen.getByTestId('sidebar-loading-types')).toBeInTheDocument() + expect(screen.getByTestId('sidebar-loading-folders')).toBeInTheDocument() + expect(screen.getByTestId('note-list-loading-skeleton')).toBeInTheDocument() + expect(screen.getByTestId('breadcrumb-title-skeleton')).toBeInTheDocument() + expect(screen.getByTestId('editor-content-skeleton')).toBeInTheDocument() + expect(screen.queryByText('Select a note to start editing')).not.toBeInTheDocument() expect(screen.getByTestId('status-vault-reloading')).toHaveAccessibleName('Reloading vault from disk') await act(async () => { fireEvent.keyDown(window, { key: 'p', code: 'KeyP', metaKey: true }) @@ -535,6 +541,9 @@ describe('App', () => { await waitFor(() => { expect(screen.queryByTestId('vault-loading-skeleton')).not.toBeInTheDocument() + expect(screen.queryByTestId('note-list-loading-skeleton')).not.toBeInTheDocument() + expect(screen.queryByTestId('breadcrumb-title-skeleton')).not.toBeInTheDocument() + expect(screen.queryByTestId('editor-content-skeleton')).not.toBeInTheDocument() expect(screen.queryByTestId('status-vault-reloading')).not.toBeInTheDocument() expect(screen.getAllByText('Test Project').length).toBeGreaterThan(0) }) diff --git a/src/App.tsx b/src/App.tsx index dc6f3930..16cd6ab8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1609,17 +1609,7 @@ function App() { ) } - // Show the full skeleton only while app-level vault capabilities are unknown. - if (!noteWindowParams && onboarding.state.status === 'ready' && gitRepoState === 'checking') { - return ( - - ) - } + const isVaultContentLoading = !noteWindowParams && onboarding.state.status === 'ready' && vault.isLoading return (
@@ -1627,7 +1617,7 @@ function App() { {sidebarVisible && ( <>
- +
@@ -1638,7 +1628,7 @@ function App() { {effectiveSelection.kind === 'filter' && effectiveSelection.filter === 'pulse' ? ( handleSetViewMode('all')} locale={appLocale} /> ) : ( - + )}
@@ -1648,6 +1638,7 @@ function App() { locale?: AppLocale + loadingTitle?: boolean } const DISABLED_ICON_STYLE = { opacity: 0.4, cursor: 'not-allowed' } as const @@ -615,6 +616,16 @@ function FilenameCrumb({ entry, locale = 'en', onRenameFilename }: Pick