Problem
markSessionCompleted adds a sessionId to the unseenCompletedSessions Set. selectSession removes it when the user opens the session. However deleteSession updates the store and activeSessionId but never removes the deleted session's ID from unseenCompletedSessions.
Location
apps/web/src/hooks/workspace/use-workspace-sessions.ts:59,339-344,393-418
Impact
Small unbounded client-side memory growth of orphaned string IDs as sessions are created, completed, and deleted without being viewed.
Suggested fix
In deleteSession, also delete each removed session ID from unseenCompletedSessions.
Source: code investigation.
Problem
markSessionCompletedadds asessionIdto theunseenCompletedSessionsSet.selectSessionremoves it when the user opens the session. HoweverdeleteSessionupdates the store andactiveSessionIdbut never removes the deleted session's ID fromunseenCompletedSessions.Location
apps/web/src/hooks/workspace/use-workspace-sessions.ts:59,339-344,393-418Impact
Small unbounded client-side memory growth of orphaned string IDs as sessions are created, completed, and deleted without being viewed.
Suggested fix
In
deleteSession, also delete each removed session ID fromunseenCompletedSessions.Source: code investigation.