Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: cover Ollama model-list warning (#6702)

[._.]/ Adam Eivy9151cfdb9271
diff --git a/client/src/components/settings/LocalLlmLibraryView.test.jsx b/client/src/components/settings/LocalLlmLibraryView.test.jsx
index 5e965e193f..4d59f90a1c 100644
--- a/client/src/components/settings/LocalLlmLibraryView.test.jsx
+++ b/client/src/components/settings/LocalLlmLibraryView.test.jsx
@@ -154,6 +154,36 @@ describe('LocalLlmLibraryView information architecture', () => {
});
});
+describe('LocalLlmLibraryView model-list diagnostics', () => {
+ it('shows an Ollama list failure and clears it after a successful empty refresh', async () => {
+ const emptyOllama = {
+ installed: true,
+ available: true,
+ modelCount: 0,
+ models: [],
+ };
+ getLocalLlmStatus.mockResolvedValueOnce({
+ backend: 'ollama',
+ ollama: { ...emptyOllama, modelsError: 'Ollama model list returned no data' },
+ lmstudio: { installed: false, available: false, modelCount: 0, models: [] },
+ });
+
+ await renderLibrary();
+
+ expect(screen.getByText(/Couldn't list Ollama models/)).toHaveTextContent('Ollama model list returned no data');
+
+ getLocalLlmStatus.mockResolvedValueOnce({
+ backend: 'ollama',
+ ollama: { ...emptyOllama, modelsError: null },
+ lmstudio: { installed: false, available: false, modelCount: 0, models: [] },
+ });
+ const progressHandler = socket.on.mock.calls.find(([event]) => event === 'localLlm:progress')[1];
+ act(() => progressHandler({ event: 'complete' }));
+
+ await waitFor(() => expect(screen.queryByText(/Couldn't list Ollama models/)).toBeNull());
+ });
+});
+
// The Ollama auto-upgrade banner lives beside the install that triggers it. Its
// only entry point is a model install, which is a Model Library action — before
// the view split the banner rendered inside the Runtimes panel, where the flow