Spaces:
Paused

dushyantsingh0 commited on
Commit
affec8a
·
1 Parent(s): 945bd17

backend stabilization

Browse files
frontend/packages/shared/src/hooks/useDashboard.ts CHANGED
@@ -471,6 +471,11 @@ export const useDashboardHydration = (workspaceId?: string) => {
471
  }
472
  };
473
  hydrationListeners.add(listener);
 
 
 
 
 
474
  return () => { hydrationListeners.delete(listener); };
475
  }, [wsKey]);
476
 
 
471
  }
472
  };
473
  hydrationListeners.add(listener);
474
+ // Sync immediately on mount to catch any state changes that happened between init and effect
475
+ setData(globalHydrationMap[wsKey] || { stats: null, reports: null, queue: [], escalations: null, insights: null });
476
+ setLoading(globalHydrationLoading);
477
+ setError(globalHydrationError);
478
+
479
  return () => { hydrationListeners.delete(listener); };
480
  }, [wsKey]);
481
 
services/ticket_service.py CHANGED
@@ -159,7 +159,8 @@ class TicketService:
159
  stats["performance"] = {
160
  "avg_resolution_hours": round(avg_res, 1),
161
  "csat_score": round(avg_csat, 1),
162
- "rated_count": rated_count
 
163
  }
164
 
165
  # 5. SLA Breach Calculation (using consolidated window)
 
159
  stats["performance"] = {
160
  "avg_resolution_hours": round(avg_res, 1),
161
  "csat_score": round(avg_csat, 1),
162
+ "rated_count": rated_count,
163
+ "sla_breached_count": 0
164
  }
165
 
166
  # 5. SLA Breach Calculation (using consolidated window)