Skip to content

Refactor SessionTracker to consolidate Session and SessionInfo types #375

Closed
@bhouston

Description

@bhouston

Description

Currently, there's confusion in the SessionTracker class between the Session and SessionInfo types. Both have an ID field, which leads to confusion in the code.

Proposed Solution

  1. Refactor away the Session type
  2. Track browser instances directly within SessionTracker
  3. Move page tracking to SessionInfo
  4. Lazily create browser instances when the first session is created
  5. This ensures we don't initialize the browser unnecessarily if no sessions are created

Benefits

  • Clearer code organization
  • Less confusion between the two different IDs
  • More efficient resource management
  • Better separation of concerns

Implementation Notes

  • SessionTracker should maintain a single browser instance that it creates and manages
  • SessionInfo should track the page within that browser
  • The browser should be created lazily on first session creation
  • SessionTracker should handle browser shutdown when its lifecycle ends

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions