Skip to content

[HN-062] unseenCompletedSessions Set not cleaned on session deletion #463

Description

@Inakitajes

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions