diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 15c778b2..3215c16e 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -7,6 +7,7 @@ import Wizard from './components/OnboardingWizard/Wizard';
import MainDashboard from './components/MainDashboard/MainDashboard';
import SEODashboard from './components/SEODashboard/SEODashboard';
import ContentPlanningDashboard from './components/ContentPlanningDashboard/ContentPlanningDashboard';
+import FacebookWriter from './components/FacebookWriter/FacebookWriter';
import { apiClient } from './api/client';
@@ -180,7 +181,9 @@ const App: React.FC = () => {
} />
} />
} />
+ } />
} />
+ } />
diff --git a/frontend/src/components/ContentPlanningDashboard/components/ContentStrategyBuilder.tsx b/frontend/src/components/ContentPlanningDashboard/components/ContentStrategyBuilder.tsx
index 22b6f443..826e7883 100644
--- a/frontend/src/components/ContentPlanningDashboard/components/ContentStrategyBuilder.tsx
+++ b/frontend/src/components/ContentPlanningDashboard/components/ContentStrategyBuilder.tsx
@@ -622,8 +622,8 @@ const ContentStrategyBuilder: React.FC = () => {
suggestions={suggestions}
observabilityHooks={{
onChatExpanded: () => console.log("Strategy assistant opened"),
- onMessageSent: (message) => console.log("Strategy message sent", { message }),
- onFeedbackGiven: (messageId, type) => console.log("Strategy feedback", { messageId, type })
+ onMessageSent: (message: any) => console.log("Strategy message sent", { message }),
+ onFeedbackGiven: (messageId: string, type: string) => console.log("Strategy feedback", { messageId, type })
}}
>
diff --git a/frontend/src/components/ContentPlanningDashboard/components/SystemStatusIndicator.tsx b/frontend/src/components/ContentPlanningDashboard/components/SystemStatusIndicator.tsx
index 6b2583a7..ccf8d685 100644
--- a/frontend/src/components/ContentPlanningDashboard/components/SystemStatusIndicator.tsx
+++ b/frontend/src/components/ContentPlanningDashboard/components/SystemStatusIndicator.tsx
@@ -23,8 +23,7 @@ import {
Card,
CardContent,
CardHeader,
- Avatar,
- Badge
+ Avatar
} from '@mui/material';
import {
CheckCircle as HealthyIcon,
@@ -98,6 +97,7 @@ const SystemStatusIndicator: React.FC = ({ className
const [error, setError] = useState(null);
const [dashboardOpen, setDashboardOpen] = useState(false);
const [chartData, setChartData] = useState([]);
+ const [cachePerf, setCachePerf] = useState<{ hits: number; misses: number; hit_rate: number } | null>(null);
const fetchStatus = async () => {
setLoading(true);
@@ -137,6 +137,9 @@ const SystemStatusIndicator: React.FC = ({ className
const result = await response.json();
if (result.status === 'success') {
setDetailedStats(result.data);
+ if (result.data?.cache_performance) {
+ setCachePerf(result.data.cache_performance);
+ }
// Generate chart data
const chartData = result.data.top_endpoints.slice(0, 5).map((endpoint: any, index: number) => ({
@@ -156,10 +159,16 @@ const SystemStatusIndicator: React.FC = ({ className
useEffect(() => {
fetchStatus();
-
+ // Prime cache performance occasionally even when dashboard is closed
+ fetchDetailedStats();
+
// Refresh every 30 seconds
const interval = setInterval(fetchStatus, 30000);
- return () => clearInterval(interval);
+ const cacheInterval = setInterval(fetchDetailedStats, 60000);
+ return () => {
+ clearInterval(interval);
+ clearInterval(cacheInterval);
+ };
}, []);
useEffect(() => {
@@ -239,56 +248,46 @@ const SystemStatusIndicator: React.FC = ({ className
);
}
+ const total = statusData?.recent_requests ?? 0;
+ const failed = statusData?.recent_errors ?? 0;
+ const passed = Math.max(0, total - failed);
+
return (
<>
-
-
-
-
- {statusData ? getStatusIcon(statusData.status) : }
-
-
-
-
-
+
-
-
-
-
-
- {/* Debug button to test dashboard opening */}
-
-
-
-
- {error && (
-
- {error}
-
- )}
-
+ {statusData ? getStatusIcon(statusData.status) : }
+
+ { e.stopPropagation(); fetchStatus(); fetchDetailedStats(); }}
+ sx={{ ml: 0.5, color: 'rgba(255,255,255,0.9)' }}
+ >
+
+
+
+
{/* Enhanced Monitoring Dashboard */}
- {statusChips.length > 0 && (
-
- {statusChips.map((chip, index) => (
-
- ))}
-
- )}
+
+ {statusChips.length > 0 && (
+
+ {statusChips.map((chip, index) => (
+
+ ))}
+
+ )}
+ {rightContent}
+
);
diff --git a/frontend/src/components/shared/types.ts b/frontend/src/components/shared/types.ts
index a10e95f0..457ee86f 100644
--- a/frontend/src/components/shared/types.ts
+++ b/frontend/src/components/shared/types.ts
@@ -83,6 +83,7 @@ export interface DashboardHeaderProps {
color: string;
icon: React.ReactElement;
}>;
+ rightContent?: React.ReactNode;
}
export interface LoadingSkeletonProps {