Skip to content

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

debug: add global error handlers and navigation logging

Bosch84052cf91994
diff --git a/dashboard/src/App.tsx b/dashboard/src/App.tsx
index 189a95fd..b0105ef9 100644
--- a/dashboard/src/App.tsx
+++ b/dashboard/src/App.tsx
@@ -1,5 +1,11 @@
import { useEffect } from "react";
-import { HashRouter, Routes, Route, Navigate } from "react-router-dom";
+import {
+ HashRouter,
+ Routes,
+ Route,
+ Navigate,
+ useLocation,
+} from "react-router-dom";
import { useAppStore } from "./stores/useAppStore";
import { NavBar } from "./components/molecules";
import {
@@ -12,6 +18,12 @@ import * as api from "./services/api";
function AppContent() {
const { setInstances, setProfiles, setAgents } = useAppStore();
+ const location = useLocation();
+
+ // Log navigation for debugging
+ useEffect(() => {
+ console.log("📍 Navigation:", location.pathname);
+ }, [location]);
// Initial load
useEffect(() => {
diff --git a/dashboard/src/main.tsx b/dashboard/src/main.tsx
index 15753afa..78a16e35 100644
--- a/dashboard/src/main.tsx
+++ b/dashboard/src/main.tsx
@@ -2,9 +2,22 @@ import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import App from "./App";
+import { ErrorBoundary } from "./components/atoms";
+
+// Global error handlers for debugging
+window.onerror = (message, source, lineno, colno, error) => {
+ console.error("💥 Global error:", { message, source, lineno, colno, error });
+ return false;
+};
+
+window.onunhandledrejection = (event) => {
+ console.error("💥 Unhandled promise rejection:", event.reason);
+};
createRoot(document.getElementById("root")!).render(
<StrictMode>
- <App />
+ <ErrorBoundary>
+ <App />
+ </ErrorBoundary>
</StrictMode>,
);