Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

feat: add DebugPanel for live state inspection

Bosch46e0d2075918
diff --git a/dashboard/src/App.tsx b/dashboard/src/App.tsx
index b0105ef9..4e5c7084 100644
--- a/dashboard/src/App.tsx
+++ b/dashboard/src/App.tsx
@@ -8,6 +8,7 @@ import {
} from "react-router-dom";
import { useAppStore } from "./stores/useAppStore";
import { NavBar } from "./components/molecules";
+import { DebugPanel } from "./components/atoms";
import {
MonitoringPage,
ProfilesPage,
@@ -81,6 +82,7 @@ function AppContent() {
<Route path="/settings" element={<SettingsPage />} />
</Routes>
</main>
+ <DebugPanel />
</div>
);
}
diff --git a/dashboard/src/components/atoms/DebugPanel.tsx b/dashboard/src/components/atoms/DebugPanel.tsx
new file mode 100644
index 00000000..d2f163c5
--- /dev/null
+++ b/dashboard/src/components/atoms/DebugPanel.tsx
@@ -0,0 +1,46 @@
+import { useState } from "react";
+import { useAppStore } from "../../stores/useAppStore";
+
+export default function DebugPanel() {
+ const [open, setOpen] = useState(false);
+ const store = useAppStore();
+
+ if (!open) {
+ return (
+ <button
+ onClick={() => setOpen(true)}
+ className="fixed bottom-2 right-2 z-50 rounded bg-yellow-500 px-2 py-1 text-xs text-black"
+ >
+ 🐛 Debug
+ </button>
+ );
+ }
+
+ return (
+ <div className="fixed bottom-2 right-2 z-50 max-h-96 w-80 overflow-auto rounded border border-yellow-500 bg-black/90 p-2 text-xs text-green-400 font-mono">
+ <div className="flex justify-between mb-2">
+ <span className="text-yellow-500 font-bold">Debug Panel</span>
+ <button onClick={() => setOpen(false)} className="text-white">
+ ✕
+ </button>
+ </div>
+ <div className="space-y-1">
+ <div>instances: {store.instances?.length ?? "null"}</div>
+ <div>profiles: {store.profiles?.length ?? "null"}</div>
+ <div>agents: {store.agents?.length ?? "null"}</div>
+ <div>tabsChartData: {store.tabsChartData?.length ?? "null"}</div>
+ <div>serverChartData: {store.serverChartData?.length ?? "null"}</div>
+ <div>memoryChartData: {store.memoryChartData?.length ?? "null"}</div>
+ <div>selectedAgentId: {store.selectedAgentId ?? "null"}</div>
+ <div>profilesLoading: {String(store.profilesLoading)}</div>
+ <div>instancesLoading: {String(store.instancesLoading)}</div>
+ <div className="mt-2 text-yellow-500">Instances:</div>
+ {store.instances?.map((i) => (
+ <div key={i.id} className="ml-2 text-gray-400">
+ {i.id}: {i.status} ({i.profileName})
+ </div>
+ ))}
+ </div>
+ </div>
+ );
+}
diff --git a/dashboard/src/components/atoms/index.ts b/dashboard/src/components/atoms/index.ts
index 1e37dd85..2bce5948 100644
--- a/dashboard/src/components/atoms/index.ts
+++ b/dashboard/src/components/atoms/index.ts
@@ -7,3 +7,4 @@ export { default as Modal } from "./Modal";
export { default as Toolbar } from "./Toolbar";
export { default as EmptyState } from "./EmptyState";
export { default as ErrorBoundary } from "./ErrorBoundary";
+export { default as DebugPanel } from "./DebugPanel";