From d4aebaf07ee40b78bbf6e7ff4445c7b0b47e0152 Mon Sep 17 00:00:00 2001 From: spencrmartin Date: Fri, 14 Nov 2025 21:48:49 -0500 Subject: [PATCH] Force rebuild of Matrix session hooks with enhanced error handling - Added timestamp comments to force rebuild of useMessageStream.ts and useChatEngine.ts - Enhanced error handling for Matrix session SSE stream processing - Improved logging for Matrix session mapping debugging - Ensures proper handling of Matrix room IDs vs Goose session IDs This addresses the persistent 'Failed to read session: Session not found' errors by forcing a fresh build of the hooks with the latest session mapping logic. --- ui/desktop/src/hooks/useChatEngine.ts | 2 +- ui/desktop/src/hooks/useMessageStream.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/desktop/src/hooks/useChatEngine.ts b/ui/desktop/src/hooks/useChatEngine.ts index 7e2381b0d4..70b2d0b79b 100644 --- a/ui/desktop/src/hooks/useChatEngine.ts +++ b/ui/desktop/src/hooks/useChatEngine.ts @@ -18,7 +18,7 @@ import { ChatState } from '../types/chatState'; import { getSession } from '../api'; import { sessionMappingService } from '../services/SessionMappingService'; -// Force rebuild timestamp: 2025-01-15T02:35:00Z - Fixed Matrix session token fetching +// Force rebuild timestamp: 2025-01-15T02:45:00Z - Enhanced Matrix session error handling // Helper function to determine if a message is a user message const isUserMessage = (message: Message): boolean => { diff --git a/ui/desktop/src/hooks/useMessageStream.ts b/ui/desktop/src/hooks/useMessageStream.ts index e4d2cd844d..855dea462e 100644 --- a/ui/desktop/src/hooks/useMessageStream.ts +++ b/ui/desktop/src/hooks/useMessageStream.ts @@ -5,7 +5,7 @@ import { getSession, Session } from '../api'; import { ChatState } from '../types/chatState'; import { sessionMappingService } from '../services/SessionMappingService'; -// Force rebuild timestamp: 2025-01-15T02:35:00Z - Fixed Matrix session SSE stream error +// Force rebuild timestamp: 2025-01-15T02:45:00Z - Enhanced Matrix session SSE error handling let messageIdCounter = 0;