From a52363231faacec860f19fd411ea1377202cd7ea Mon Sep 17 00:00:00 2001 From: Austin Pickett Date: Thu, 30 Apr 2026 19:53:41 -0400 Subject: [PATCH] refactor(plugins): move rescan button to page header, remove redundant title Use usePageHeader().setEnd to place the rescan button in the shared header bar. Remove the inline H2 title (already shown by the header) and the wrapper div. --- web/src/pages/PluginsPage.tsx | 45 ++++++++++++++--------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/web/src/pages/PluginsPage.tsx b/web/src/pages/PluginsPage.tsx index 60e65be149..c11fce2e51 100644 --- a/web/src/pages/PluginsPage.tsx +++ b/web/src/pages/PluginsPage.tsx @@ -10,7 +10,6 @@ import { Select, SelectOption } from "@nous-research/ui/ui/components/select"; import { Switch } from "@nous-research/ui/ui/components/switch"; import { Spinner } from "@nous-research/ui/ui/components/spinner"; import { CommandBlock } from "@nous-research/ui/ui/components/command-block"; -import { H2 } from "@/components/NouiTypography"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; @@ -19,6 +18,7 @@ import { Toast } from "@/components/Toast"; import { useI18n } from "@/i18n"; import { PluginSlot } from "@/plugins"; import { cn } from "@/lib/utils"; +import { usePageHeader } from "@/contexts/usePageHeader"; /** Select value for built-in memory (`config` uses empty string). Never use `""` — UI Select maps empty value to an empty label. */ const MEMORY_PROVIDER_BUILTIN = "__hermes_memory_builtin__"; @@ -38,6 +38,7 @@ export default function PluginsPage() { const { toast, showToast } = useToast(); const { t } = useI18n(); + const { setEnd } = usePageHeader(); const loadHub = useCallback(() => { return api @@ -56,6 +57,22 @@ export default function PluginsPage() { void loadHub().finally(() => setLoading(false)); }, [loadHub]); + useEffect(() => { + setEnd( + , + ); + return () => setEnd(null); + }, [loading, rescanBusy, setEnd, t.pluginsPage.refreshDashboard]); + const onInstall = async () => { const id = installId.trim(); if (!id) { @@ -136,32 +153,6 @@ export default function PluginsPage() {
- -
- -
- - -

{t.app.nav.plugins}

- - -

- {t.pluginsPage.headline} -

-
- - -
- {providers && (