From df101ceeda8ab64eb6880b99976775e2b9725715 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Mon, 9 Mar 2026 05:13:06 +0000 Subject: [PATCH] fix(Settings): hide AI Assistant from navigation until installed --- admin/docs/release-notes.md | 12 ++++++++++++ admin/inertia/layouts/SettingsLayout.tsx | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/admin/docs/release-notes.md b/admin/docs/release-notes.md index b234c8e..9dc4db6 100644 --- a/admin/docs/release-notes.md +++ b/admin/docs/release-notes.md @@ -1,5 +1,17 @@ # Release Notes +## Unreleased + +### Features +- **AI Assistant**: Added improved user guidance for troubleshooting GPU pass-through issues +- **Settings**: Nomad now automatically performs nightly checks for available app updates, and users can select and apply updates from the Apps page in Settings + +### Bug Fixes +- **Settings**: Fixed an issue where the AI Assistant settings page would be shown in navigation even if the AI Assistant was not installed, thus causing 404 errors when clicked +- **Security**: Path traversal and SSRF mitigations + +### Improvements + ## Version 1.28.0 - March 5, 2026 ### Features diff --git a/admin/inertia/layouts/SettingsLayout.tsx b/admin/inertia/layouts/SettingsLayout.tsx index b670e75..cf0b086 100644 --- a/admin/inertia/layouts/SettingsLayout.tsx +++ b/admin/inertia/layouts/SettingsLayout.tsx @@ -13,12 +13,15 @@ import { import { usePage } from '@inertiajs/react' import StyledSidebar from '~/components/StyledSidebar' import { getServiceLink } from '~/lib/navigation' +import useServiceInstalledStatus from '~/hooks/useServiceInstalledStatus' +import { SERVICE_NAMES } from '../../constants/service_names' export default function SettingsLayout({ children }: { children: React.ReactNode }) { const { aiAssistantName } = usePage<{ aiAssistantName: string }>().props + const aiAssistantInstallStatus = useServiceInstalledStatus(SERVICE_NAMES.OLLAMA) const navigation = [ - { name: aiAssistantName, href: '/settings/models', icon: IconWand, current: false }, + ...(aiAssistantInstallStatus.isInstalled ? [{ name: aiAssistantName, href: '/settings/models', icon: IconWand, current: false }] : []), { name: 'Apps', href: '/settings/apps', icon: IconTerminal2, current: false }, { name: 'Benchmark', href: '/settings/benchmark', icon: IconChartBar, current: false }, { name: 'Content Explorer', href: '/settings/zim/remote-explorer', icon: IconZoom, current: false },