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:
2026-01-06 02:29:00 +01:00
parent 192237e69b
commit 70009676a3
2 changed files with 13 additions and 11 deletions

View File

@@ -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) {