fix(dashboard): disable SSE in demo mode and remove unused hooks
- Skip SSE connection in demo mode (MSW doesn't support SSE). - Remove unused `useProjectEvents` and related real-time hooks from `Dashboard`. - Temporarily disable activity feed SSE until a global endpoint is available.
This commit is contained in:
@@ -247,6 +247,15 @@ export function useProjectEvents(
|
||||
* Connect to SSE endpoint
|
||||
*/
|
||||
const connect = useCallback(() => {
|
||||
// In frontend demo mode (MSW), SSE is not supported - skip connection
|
||||
if (config.demo.enabled) {
|
||||
if (config.debug.api) {
|
||||
console.log('[SSE] Demo mode enabled - SSE connections disabled');
|
||||
}
|
||||
updateConnectionState('disconnected');
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent connection if not authenticated or no project ID
|
||||
/* istanbul ignore next -- early return guard, tested via connection state */
|
||||
if (!isAuthenticated || !accessToken || !projectId) {
|
||||
|
||||
Reference in New Issue
Block a user