From 84c0af411b283750b75795d8fdb30262f31abbc6 Mon Sep 17 00:00:00 2001 From: rishabh998186 Date: Thu, 2 Oct 2025 12:57:31 +0530 Subject: [PATCH 01/13] feat: add auto-refresh functionality to UI Signed-off-by: rishabh998186 --- go/pkg/websocket/handler.go | 0 go/pkg/websocket/integration.go | 0 ui/src/app/layout.tsx | 31 ++++--- ui/src/components/AgentList.tsx | 4 + ui/src/components/AgentsProvider.tsx | 44 ++++++++-- ui/src/components/RefreshIndicator.tsx | 44 ++++++++++ ui/src/components/SettingsPanel.tsx | 115 +++++++++++++++++++++++++ ui/src/components/ui/switch.tsx | 29 +++++++ ui/src/contexts/SettingsContext.tsx | 76 ++++++++++++++++ ui/src/hooks/usePolling.ts | 104 ++++++++++++++++++++++ 10 files changed, 427 insertions(+), 20 deletions(-) create mode 100644 go/pkg/websocket/handler.go create mode 100644 go/pkg/websocket/integration.go create mode 100644 ui/src/components/RefreshIndicator.tsx create mode 100644 ui/src/components/SettingsPanel.tsx create mode 100644 ui/src/components/ui/switch.tsx create mode 100644 ui/src/contexts/SettingsContext.tsx create mode 100644 ui/src/hooks/usePolling.ts diff --git a/go/pkg/websocket/handler.go b/go/pkg/websocket/handler.go new file mode 100644 index 000000000..e69de29bb diff --git a/go/pkg/websocket/integration.go b/go/pkg/websocket/integration.go new file mode 100644 index 000000000..e69de29bb diff --git a/ui/src/app/layout.tsx b/ui/src/app/layout.tsx index 43f9c75e0..bad281c54 100644 --- a/ui/src/app/layout.tsx +++ b/ui/src/app/layout.tsx @@ -8,6 +8,7 @@ import { Footer } from "@/components/Footer"; import { ThemeProvider } from "@/components/ThemeProvider"; import { Toaster } from "@/components/ui/sonner"; import { AppInitializer } from "@/components/AppInitializer"; +import { SettingsProvider } from "@/contexts/SettingsContext"; const geistSans = Geist({ variable: "--font-geist-sans", @@ -21,20 +22,22 @@ export const metadata: Metadata = { export default function RootLayout({ children }: { children: React.ReactNode }) { return ( - - - - - -
-
{children}
-