Skip to content

Conversation

bhouston
Copy link
Member

Description

This PR refactors the SessionManager functionality into SessionTracker to reduce code duplication and simplify the codebase. The SessionTracker class now includes all the functionality that was previously in SessionManager, making it the single source of truth for browser session management.

Changes

  • Added methods from SessionManager to SessionTracker (createSession, closeSession, etc.)
  • Enhanced SessionTracker with proper cleanup handlers
  • Maintained compatibility with existing browserSessions map
  • Ensured proper session tracking and cleanup

Testing

  • All existing tests pass
  • The functionality has been preserved, just consolidated into a single class

Related Issues

Resolves #311

Notes

This is the first step in the refactoring. After this PR is merged, we can:

  1. Update any direct usages of SessionManager to use SessionTracker instead
  2. Remove the SessionManager class once all references are updated

This commit refactors the SessionTracker class to include the functionality from SessionManager.
It adds methods for creating, managing, and closing browser sessions, which were previously
handled by SessionManager. This reduces code duplication and simplifies the codebase.

Resolves #311
@bhouston
Copy link
Member Author

I've created a follow-up issue #313 to handle the removal of SessionManager once this PR is merged. That will complete the refactoring process.

@bhouston
Copy link
Member Author

This was incorrect.

@bhouston bhouston closed this Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor SessionManager into SessionTracker

1 participant