-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
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
- Refactor away the Session type
- Track browser instances directly within SessionTracker
- Move page tracking to SessionInfo
- Lazily create browser instances when the first session is created
- 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
Labels
No labels