revert: Remove debugging infrastructure while keeping bug fixes
Removed: - ErrorBoundary component and all error boundary wrapping - Debug console.log statements from useReasoningTranslation - Debug useEffect in DashboardPage - Dev mode Dockerfile (Dockerfile.kubernetes.dev) - Dev mode Tilt configuration - Enhanced vite watcher config (depth, awaitWriteFinish, HMR overlay) Kept actual bug fixes: - String() coercion in translation functions - useMemo/useCallback for formatters - Null guards in components - Basic vite ignored patterns (node_modules, dist, .git) - Conditional rendering in DashboardPage
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* - Trust-building (explain system reasoning)
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { RefreshCw, ExternalLink } from 'lucide-react';
|
||||
import { useTenant } from '../../stores/tenant.store';
|
||||
@@ -34,7 +34,6 @@ import { ActionQueueCard } from '../../components/dashboard/ActionQueueCard';
|
||||
import { OrchestrationSummaryCard } from '../../components/dashboard/OrchestrationSummaryCard';
|
||||
import { ProductionTimelineCard } from '../../components/dashboard/ProductionTimelineCard';
|
||||
import { InsightsGrid } from '../../components/dashboard/InsightsGrid';
|
||||
import { ErrorBoundary } from '../../components/ErrorBoundary';
|
||||
|
||||
export function NewDashboardPage() {
|
||||
const navigate = useNavigate();
|
||||
@@ -72,25 +71,6 @@ export function NewDashboardPage() {
|
||||
refetch: refetchInsights,
|
||||
} = useInsights(tenantId);
|
||||
|
||||
// Debug logging for data
|
||||
useEffect(() => {
|
||||
console.log('🔍 Dashboard Data:', {
|
||||
healthStatus: healthStatus,
|
||||
orchestrationSummary: orchestrationSummary,
|
||||
actionQueue: actionQueue,
|
||||
productionTimeline: productionTimeline,
|
||||
insights: insights,
|
||||
loading: {
|
||||
health: healthLoading,
|
||||
orchestration: orchestrationLoading,
|
||||
actionQueue: actionQueueLoading,
|
||||
timeline: timelineLoading,
|
||||
insights: insightsLoading
|
||||
}
|
||||
});
|
||||
}, [healthStatus, orchestrationSummary, actionQueue, productionTimeline, insights,
|
||||
healthLoading, orchestrationLoading, actionQueueLoading, timelineLoading, insightsLoading]);
|
||||
|
||||
// Mutations
|
||||
const approvePO = useApprovePurchaseOrder();
|
||||
const startBatch = useStartProductionBatch();
|
||||
@@ -167,12 +147,10 @@ export function NewDashboardPage() {
|
||||
{/* Main Dashboard Layout */}
|
||||
<div className="space-y-6">
|
||||
{/* SECTION 1: Bakery Health Status */}
|
||||
<ErrorBoundary componentName="HealthStatusCard">
|
||||
<HealthStatusCard healthStatus={healthStatus} loading={healthLoading} />
|
||||
</ErrorBoundary>
|
||||
{healthStatus && <HealthStatusCard healthStatus={healthStatus} loading={healthLoading} />}
|
||||
|
||||
{/* SECTION 2: What Needs Your Attention (Action Queue) */}
|
||||
<ErrorBoundary componentName="ActionQueueCard">
|
||||
{actionQueue && (
|
||||
<ActionQueueCard
|
||||
actionQueue={actionQueue}
|
||||
loading={actionQueueLoading}
|
||||
@@ -180,33 +158,33 @@ export function NewDashboardPage() {
|
||||
onViewDetails={handleViewDetails}
|
||||
onModify={handleModify}
|
||||
/>
|
||||
</ErrorBoundary>
|
||||
)}
|
||||
|
||||
{/* SECTION 3: What the System Did for You (Orchestration Summary) */}
|
||||
<ErrorBoundary componentName="OrchestrationSummaryCard">
|
||||
{orchestrationSummary && (
|
||||
<OrchestrationSummaryCard
|
||||
summary={orchestrationSummary}
|
||||
loading={orchestrationLoading}
|
||||
/>
|
||||
</ErrorBoundary>
|
||||
)}
|
||||
|
||||
{/* SECTION 4: Today's Production Timeline */}
|
||||
<ErrorBoundary componentName="ProductionTimelineCard">
|
||||
{productionTimeline && (
|
||||
<ProductionTimelineCard
|
||||
timeline={productionTimeline}
|
||||
loading={timelineLoading}
|
||||
onStart={handleStartBatch}
|
||||
onPause={handlePauseBatch}
|
||||
/>
|
||||
</ErrorBoundary>
|
||||
)}
|
||||
|
||||
{/* SECTION 5: Quick Insights Grid */}
|
||||
<ErrorBoundary componentName="InsightsGrid">
|
||||
{insights && (
|
||||
<div>
|
||||
<h2 className="text-2xl font-bold text-gray-900 mb-4">Key Metrics</h2>
|
||||
<InsightsGrid insights={insights} loading={insightsLoading} />
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
)}
|
||||
|
||||
{/* SECTION 6: Quick Action Links */}
|
||||
<div className="bg-white rounded-xl shadow-md p-6">
|
||||
|
||||
Reference in New Issue
Block a user