From fe1bee14ed1e509b5430b8b5f4ea06647336e4c8 Mon Sep 17 00:00:00 2001
From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com>
Date: Sat, 25 Jul 2026 01:35:48 +0530
Subject: [PATCH] feat(models-selection-panel): enhance refresh button with
spinner for loading state
---
.../settings/model-connections/models-selection-panel.tsx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/surfsense_web/components/settings/model-connections/models-selection-panel.tsx b/surfsense_web/components/settings/model-connections/models-selection-panel.tsx
index e31459c9e..a24cf1504 100644
--- a/surfsense_web/components/settings/model-connections/models-selection-panel.tsx
+++ b/surfsense_web/components/settings/model-connections/models-selection-panel.tsx
@@ -2,6 +2,7 @@ import { RefreshCw } from "lucide-react";
import { useState } from "react";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
+import { Spinner } from "@/components/ui/spinner";
import {
capability,
capabilityLabels,
@@ -124,8 +125,10 @@ export function ModelsSelectionPanel({
type="button"
onClick={onRefresh}
disabled={isRefreshing || isRefreshDisabled}
+ className="relative"
>
- {isRefreshing ? "Refreshing..." : "Refresh"}
+ Reload models
+ {isRefreshing ? : null}
) : null}